net.sourceforge.chart2d
Class Area

java.lang.Object
  |
  +--net.sourceforge.chart2d.Area
Direct Known Subclasses:
FontArea, GraphArea, PieArea

class Area
extends java.lang.Object

An Advanced Bordered Area. Allows auto and manual resizing and auto and manual positioning. Contains many public static variables for use when extending this class.

Basic Sizing and Colors:
The typical bordered area class will simply paint a border of a specified thickness within an area, where the inner edges of the area touch the outer edges of the border. This class can do much more. Each border can be set to a different thickness and color. This introduces the problem of handling the corners of the borders. If the left border has color green, and the top border has color red, which color is the top left corner? Each corner can be associated with any adjacent border.

Inner Space And Gaps:
Sometimes, some space between the thing bordered and the border is desired. That is, if bordering some text, then having some space between the text and the border may be desirable. The thickness of the gap between the the left, right, top, and bottom borders may each be individually set. The location and size of this inner space may be obtained directly.

Resizing And Growing Borders And Gaps:
The borders and gaps can automatically grow when the size is changed. In order to maintain the look of zooming in on something, the borders and gaps can grow with the resizing of the area. For example, if the area grows in the horizontal direction, then the left and right borders and gaps will grow respective of the amount of change in the area width, depending on this classes settings. If keeping any of the borders equal to any of the others is desireable, such as a "grow only when all grow" policy, then any border may be associated with any other border. The sizes of the associated borders will be equal to the least of them.

More Basics:
This area can have a background color, or no background at all. And each border and gap can be set to not exist, individually.

Locating: Automatically and Manually:
Sometimes the size of component to be bordered cannot be known until after the borders and gaps have been calculated (relevant when using growing borders and gaps). This class allows the available space, after subtracting borders and gaps, to obtained. The size of the component to be bordered can then be calculated, making sure it fits within this space. The size of the component can be passed to this class, this class will place the gaps and borderes around the component for a (near) perfect fit. This means that where to place this bordered area within the maximum area is an open question. This class allows options of automatic centering (both horizontally and vertically, justifying to the left, right, top, and/or bottom edges of the maximum area, and doing nothing such that the area can be manually set, and any combination thereof.

Examples:

Details Of Growing:
Growing is based on "model" sizes. By default, everything has a model size (the area, the borders, and the gaps). The defaults currently are the first maximum size setting for the area, 2 (for all borders), and 2 (for all gaps). Growing is accomplished by dividing the maximum area size by the model area size and applying this ratio the border and gap thicknesses. If growing in the horizontal direction, the width sizes are used. If growing in the vertical direction, the height sizes are used. If growing in both directions, then both are calculated and the lesser is used. However, all of these values can be changed. Ideally, one would set the model area size to your normal viewing size, and all of the inner components model sizes (borders and thicknesses) to the best sizes at this model area size. However, just setting the model area size to the normal viewing size of the area most likely will be sufficient. Generally, the initial size is the normal size, do set the model size to the initial size, use the resetAreaModel method before setting the maximum size. When you set the maximum size, the area model size will automatically reset itself to this size.

Notes:


Field Summary
(package private) static int BETWEEN
          Indicates the betweem.
(package private) static int BOTTOM
          Indicates the bottom.
(package private) static int CENTER
          Indicates the center.
(package private) static int CENTERED
          Indicates the centered.
(package private) static float[] CONTINUOUS
          Indicates the continuous.
(package private) static float[] DASHED
          Indicates the dashed.
(package private) static float[] DOTTED
          Indicates the dotted.
(package private) static int FLOAT
          Indicates float.
(package private) static int HEIGHT
          Indicates the height.
(package private) static int HORIZONTAL
          Indicates the horizontal.
(package private) static int INTEGER
          Indicates integer.
(package private) static int LABELSBOTTOM
          Indicates the labels bottom.
(package private) static int LABELSLEFT
          Indicates the labels left.
(package private) static int LEFT
          Indicates the left.
(package private) static int LEFTBOTTOM
          Indicates the right bottom.
(package private) static int LEFTRIGHT
          Indicates the left right.
(package private) static int LEFTTOP
          Indicates the left top.
(package private) static int LESSER
          Indicates the lesser.
(package private) static int MAX
          Indicates the maximum.
(package private) static int MAXMODEL
          Indicates the model or maximum model.
(package private) static int MIN
          Indicates the minimum.
(package private) static int RIGHT
          Indicates the right.
(package private) static int RIGHTBOTTOM
          Indicates the right bottom.
(package private) static int RIGHTTOP
          Indicates the right top.
(package private) static int TOP
          Indicates the top.
(package private) static int TOPBOTTOM
          Indicates the top bottom.
(package private) static int VERTICAL
          Indicates the vertical.
(package private) static int WIDTH
          Indicates the width.
 
Constructor Summary
(package private) Area()
          Creates a new Area.
 
Method Summary
(package private)  int applyRatio(int model, float ratio)
          Applies the given ratio to the given integer.
(package private)  boolean getAreaNeedsUpdate()
          Indicates whether some property of this class has changed.
(package private)  boolean getAutoSize(int which)
          Returns the auto sizing properties.
(package private)  java.awt.Color getBackgroundColor()
          Returns the color of the background.
(package private)  boolean getBackgroundExistence()
          Returns whether there exists a background or not.
(package private)  java.awt.Color getBorderColor()
          Returns the color of the border (each border).
(package private)  java.awt.Color getBorderColor(int which)
          Returns the color of the border (specific border).
(package private)  boolean getBorderExistence()
          Gets whether there exists borders.
(package private)  boolean getBorderExistence(int which)
           
(package private)  int getBorderThickness()
          Returns the thickness of the border.
(package private)  int getBorderThickness(int which)
          Returns the thickness of a border.
(package private)  int getBorderThicknessModel()
          Gets the thickness of the border model.
(package private)  int getBorderThicknessModel(int which)
          Gets the thickness of a border model.
(package private)  int getGapThickness()
          Returns the thickness of one of the gaps.
(package private)  int getGapThicknessModel()
          Gets the thickness of the gap model.
(package private)  int getJustifications(int which)
          Returns the current justifications for the minimum area.
(package private)  float getRatio(int which)
          Returns the specified ratio.
(package private)  boolean getResetAreaModel()
          Returns whether the max model will be reset, in the next max sizing.
(package private)  java.awt.Dimension getSize(int which)
          Returns the size of the area.
(package private)  java.awt.Point getSizeLocation(int which)
          Returns the location of the area.
(package private)  java.awt.Dimension getSpaceSize(int which)
          Returns the size of the space area.
(package private)  java.awt.Point getSpaceSizeLocation(int which)
          Returns the space area location.
(package private)  void paintComponent(java.awt.Graphics2D g2D)
          Paints this bordered area.
(package private)  void resetAreaModel(boolean reset)
          Resets the model for this class.
(package private)  void setAutoJustifys(boolean horizontal, boolean vertical)
          Adjusts settings to enable/disable auto justification of a minimum area that is less than a maximum area.
(package private)  void setAutoSizes(boolean maxModel, boolean min)
          Adjusts the settings that allow automatic (or default) sizing.
(package private)  void setBackgroundColor(java.awt.Color color)
          Adjusts the color of the background.
(package private)  void setBackgroundExistence(boolean existence)
          Adjusts whether there exists a background or not.
(package private)  void setBorderAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)
          Associates border thicknesses with other border thicknesses.
(package private)  void setBorderColor(java.awt.Color color)
          Sets the color of the border (each border).
(package private)  void setBorderColors(java.awt.Color left, java.awt.Color right, java.awt.Color top, java.awt.Color bottom)
          Sets the color of each border, individually.
(package private)  void setBorderCornerAssociations(int leftTop, int leftBottom, int rightTop, int rightBottom)
          Associates each corner with one border.
(package private)  void setBorderExistence(boolean existences)
          Adjusts whether there exists borders.
(package private)  void setBorderExistences(boolean left, boolean right, boolean top, boolean bottom)
          Adjusts whether there exists borders, each individually.
(package private)  void setBorderThicknessModel(int thickness)
          Adjusts the thickness of the border models.
(package private)  void setBorderThicknessModels(int left, int right, int top, int bottom)
          Adjusts the thickness of the border models.
(package private)  void setCustomRatio(int which, boolean customize, float ratio)
          Specifies whether to customize a particular ratio, overriding the calculation of it.
(package private)  void setGapAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)
          Associates gap thicknesses with other gap thicknesses.
(package private)  void setGapExistence(boolean existence)
          Adjusts whether there exists gaps.
(package private)  void setGapExistences(boolean left, boolean right, boolean top, boolean bottom)
          Adjusts whether there exists gaps, each individually.
(package private)  void setGapThicknessModel(int thickness)
          Adjusts the thickness of the gap models.
(package private)  void setGapThicknessModels(int left, int right, int top, int bottom)
          Adjusts the thickness of the gap models.
(package private)  void setJustifications(int horizontal, int vertical)
          Adjusts the actual justifications of minimum areas that are less than maximum areas.
(package private)  void setLockRatios(boolean lock)
          Makes such that the widh and the heighh ratios are the same as the lesser ratio.
(package private)  void setSize(int which, java.awt.Dimension size)
          Sets the sizes of the areas.
(package private)  void setSizeLocation(int which, java.awt.Point location)
          Sets the location of a size/area.
(package private)  void setSpaceSize(int which, java.awt.Dimension size)
          Sets the size of the space; that is the area less the borders and gaps.
(package private)  void setSpaceSizeLocation(int which, java.awt.Point location)
          Sets the location of an internal space area of a size area.
(package private)  void updateArea()
          Updates this area.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX

static final int MAX
Indicates the maximum.

MAXMODEL

static final int MAXMODEL
Indicates the model or maximum model.

MIN

static final int MIN
Indicates the minimum.

WIDTH

static final int WIDTH
Indicates the width.

HEIGHT

static final int HEIGHT
Indicates the height.

LESSER

static final int LESSER
Indicates the lesser.

LEFT

static final int LEFT
Indicates the left.

RIGHT

static final int RIGHT
Indicates the right.

TOP

static final int TOP
Indicates the top.

BOTTOM

static final int BOTTOM
Indicates the bottom.

CENTER

static final int CENTER
Indicates the center.

LEFTRIGHT

static final int LEFTRIGHT
Indicates the left right.

LEFTTOP

static final int LEFTTOP
Indicates the left top.

LEFTBOTTOM

static final int LEFTBOTTOM
Indicates the right bottom.

RIGHTTOP

static final int RIGHTTOP
Indicates the right top.

RIGHTBOTTOM

static final int RIGHTBOTTOM
Indicates the right bottom.

TOPBOTTOM

static final int TOPBOTTOM
Indicates the top bottom.

HORIZONTAL

static final int HORIZONTAL
Indicates the horizontal.

VERTICAL

static final int VERTICAL
Indicates the vertical.

CENTERED

static final int CENTERED
Indicates the centered.

BETWEEN

static final int BETWEEN
Indicates the betweem.

LABELSBOTTOM

static final int LABELSBOTTOM
Indicates the labels bottom.

LABELSLEFT

static final int LABELSLEFT
Indicates the labels left.

CONTINUOUS

static float[] CONTINUOUS
Indicates the continuous.

DASHED

static float[] DASHED
Indicates the dashed.

DOTTED

static float[] DOTTED
Indicates the dotted.

FLOAT

static int FLOAT
Indicates float.

INTEGER

static int INTEGER
Indicates integer.
Constructor Detail

Area

Area()
Creates a new Area.
Method Detail

setSizeLocation

void setSizeLocation(int which,
                     java.awt.Point location)
Sets the location of a size/area.
Parameters:
which - Which area to relocate. MAX is the only possible accepted value.
location - The new point of the top left of the area. The outer edges of the left and top borders will touch this. Must not be null.

setSpaceSizeLocation

void setSpaceSizeLocation(int which,
                          java.awt.Point location)
Sets the location of an internal space area of a size area.
Parameters:
which - Which space area to relocate. MIN is the only possible value. If horizontal justification is true, then the x value will be ignored. If vertical justification is true, then the y value will be ignored.
location - The new point of the top left of the space area. The inner edges of the top and left gaps will touch this. Must not be null.

setAutoJustifys

void setAutoJustifys(boolean horizontal,
                     boolean vertical)
Adjusts settings to enable/disable auto justification of a minimum area that is less than a maximum area.
Parameters:
horizontal - If true, then horizontal justification is enabled.
vertical - If true, then vertical justification is enabled.

setJustifications

void setJustifications(int horizontal,
                       int vertical)
Adjusts the actual justifications of minimum areas that are less than maximum areas. Justifications effect the locations of minimum areas. Either are only respected when their auto justification is enabled. For example, if horizontal justify is center, then the minimum area will be horizontally centered within the maximum area.
Parameters:
horizontal - Sets the horizontal justification for the minimum area. Possible values are LEFT, RIGHT and CENTER.
vertical - Sets the vertical justification for the minimum area. Possible values are LEFT, RIGHT and CENTER.

setAutoSizes

void setAutoSizes(boolean maxModel,
                  boolean min)
Adjusts the settings that allow automatic (or default) sizing. Both are on the maximum size which is required, and must be set to be useful.
Parameters:
maxModel - If true, then the maximum model size will always be equal to the maximum size. This disables growing because it keeps the resizing ratios at 1. If false, then maximum model is constant; so if the maximum size changes then the ratios will adjust accordingly.
min - If true, then the minimum size will be kept equal to the maximum size. This means that the borders' outer edges will touch the maximum size.

setLockRatios

void setLockRatios(boolean lock)
Makes such that the widh and the heighh ratios are the same as the lesser ratio. If you want components to grow only if all of them grow, then lock ratios, true, will cause this.
Parameters:
lock - True causes all the ratios to equal the lesser ratio.

setCustomRatio

void setCustomRatio(int which,
                    boolean customize,
                    float ratio)
Specifies whether to customize a particular ratio, overriding the calculation of it.
Parameters:
which - Which ratio to customize.
customize - Whether to customize the ratio.
ratio - The custom ratio.

setSize

void setSize(int which,
             java.awt.Dimension size)
Sets the sizes of the areas. If setting the maximum size and if resetAreaModel was called previously, then the maximum model size will be made equal to the maximum size; this ensures that all the default sizes of borders and gaps will be used at this maximum size; at this maximum size the resizing ratio will be 1.
Parameters:
which - Which size to change. Possible values are MAX and MAXMODEL.
size - The new size. Must not be null.

setSpaceSize

void setSpaceSize(int which,
                  java.awt.Dimension size)
Sets the size of the space; that is the area less the borders and gaps.
Parameters:
which - Which space size to change. Possible values are MIN.
size - The new size. Must not be null.

setBackgroundExistence

void setBackgroundExistence(boolean existence)
Adjusts whether there exists a background or not.
Parameters:
existence - If true, then there is.

setBackgroundColor

void setBackgroundColor(java.awt.Color color)
Adjusts the color of the background. Doesn't change the background's existence.
Parameters:
color - The color of the background.

setBorderExistences

void setBorderExistences(boolean left,
                         boolean right,
                         boolean top,
                         boolean bottom)
Adjusts whether there exists borders, each individually. If a border does not exist, then its is not used in calculations or in painting.
Parameters:
left - If true, then the left border does exist.
right - If true, then the right border does exist.
top - If true, then the top border does exist.
bottom - If true, then the bottom border does exist.

setBorderExistence

void setBorderExistence(boolean existences)
Adjusts whether there exists borders. If borders do not exist, then they are not used in calculations or in painting.
Parameters:
existences - If true, then the borders do not exist.

setBorderThicknessModels

void setBorderThicknessModels(int left,
                              int right,
                              int top,
                              int bottom)
Adjusts the thickness of the border models. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Parameters:
left - The model thickness for the left border.
right - The model thickness for the right border.
top - The model thickness for the top border.
bottom - The model thickness for the bottom border.

setBorderThicknessModel

void setBorderThicknessModel(int thickness)
Adjusts the thickness of the border models. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Parameters:
thickness - The model thickness for the border.

setBorderCornerAssociations

void setBorderCornerAssociations(int leftTop,
                                 int leftBottom,
                                 int rightTop,
                                 int rightBottom)
Associates each corner with one border. The corner will take on the same color as the border associated with it.
Parameters:
leftTop - The border to associate with the leftTop corner. Possible values are LEFT and TOP.
rightTop - The border to associate with the rightTop corner. Possible values are RIGHT and TOP.
leftBottomThe - border to associate with the leftBottom corner. Possible values are LEFT and BOTTOM.
rightBottom - The border to associate with the rightBottom corner. Possible values are RIGHT and BOTTOM.

setBorderAssociations

void setBorderAssociations(boolean leftRight,
                           boolean leftTop,
                           boolean leftBottom,
                           boolean rightTop,
                           boolean rightBottom,
                           boolean topBottom)
Associates border thicknesses with other border thicknesses. Each possible association between the four borders can be represented by setting six booleans. When a border is associated with another border, then their thickness is equal to the lesser thickness between the two.
Parameters:
leftRight - If true, then associates the left and right borders.
leftTop - If true, then associates the left and top borders.
leftBottom - If true, then associates the left and bottom borders.
rightTop - If true, then associates the right and top borders.
rightBottom - If true, then associates the right and bottom borders.
topBottom - If true, then associates the top and bottom borders.

setBorderColors

void setBorderColors(java.awt.Color left,
                     java.awt.Color right,
                     java.awt.Color top,
                     java.awt.Color bottom)
Sets the color of each border, individually.
Parameters:
left - The color of the left border.
right - The color of the right border.
top - The color of the top border.
bottom - The color of the bottom border.

setBorderColor

void setBorderColor(java.awt.Color color)
Sets the color of the border (each border).
Parameters:
color - The color of the border.

setGapExistences

void setGapExistences(boolean left,
                      boolean right,
                      boolean top,
                      boolean bottom)
Adjusts whether there exists gaps, each individually. If a gap does not exist, then its is not used in calculations.
Parameters:
left - If true, then the left gap does exist.
right - If true, then the right gap does exist.
top - If true, then the top gap does exist.
bottom - If true, then the bottom gap does exist.

setGapExistence

void setGapExistence(boolean existence)
Adjusts whether there exists gaps. If a gap does not exist, then its is not used in calculations. This is equivalent to calling setGapExistences (boolean, boolean, boolean, boolean).
Parameters:
existence - If true, then the gap exists.

setGapThicknessModels

void setGapThicknessModels(int left,
                           int right,
                           int top,
                           int bottom)
Adjusts the thickness of the gap models. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Parameters:
left - The model thickness for the left gap.
right - The model thickness for the right gap.
top - The model thickness for the top gap.
bottom - The model thickness for the bottom gap.

setGapThicknessModel

void setGapThicknessModel(int thickness)
Adjusts the thickness of the gap models. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Parameters:
thickness - The model thickness for the gap.

setGapAssociations

void setGapAssociations(boolean leftRight,
                        boolean leftTop,
                        boolean leftBottom,
                        boolean rightTop,
                        boolean rightBottom,
                        boolean topBottom)
Associates gap thicknesses with other gap thicknesses. Each possible association between the four gaps can be represented by setting six booleans. When a gap is associated with another gap, then their thickness is equal to the lesser thickness between the two.
Parameters:
leftRight - If true, then associates the left and right gaps.
leftTop - If true, then associates the left and top gaps.
leftBottom - If true, then associates the left and bottom gaps.
rightTop - If true, then associates the right and top gaps.
rightBottom - If true, then associates the right and bottom gaps.
topBottom - If true, then associates the top and bottom gaps.

getSpaceSizeLocation

java.awt.Point getSpaceSizeLocation(int which)
Returns the space area location. The space area is the area within the bordered area. It is the area (max or min) less borderss and gaps. Updates everything before returning the value.
Parameters:
which - Which space area location to return. Posible values are MAX and MIN.
Returns:
The location of the space area.

getAutoSize

boolean getAutoSize(int which)
Returns the auto sizing properties. Both the max model area size and the min area size can be auto sized. Autosizing is based on the max area size. If autosizing, then the area is equal to the max area size.
Parameters:
which - Which auto size property to return. Possible values are MAXMODEL and MIN.
Returns:
True, if this area is auto sizing.

getSize

java.awt.Dimension getSize(int which)
Returns the size of the area. The area size is the dimension enclosing the border. Updates everything before returning the value.
Parameters:
which - Which size to return. Possible values are MAX, MAXMODEL, and MIN.
Returns:
The size of the area.

getSizeLocation

java.awt.Point getSizeLocation(int which)
Returns the location of the area. The location is the top left corner of the area enclosing the border. Updates everything before returning the value.
Parameters:
which - Which size location to return. Possible values are MAX and MIN.
Returns:
The loation of the area.

getSpaceSize

java.awt.Dimension getSpaceSize(int which)
Returns the size of the space area. The size of the space area is the area size less the borders and gaps. Updates everything before returning the value.
Parameters:
which - Which space area size to return. Possible values are MAX and MIN.
Returns:
The size of the space area.

getRatio

float getRatio(int which)
Returns the specified ratio. Ratios area based on maximum area size divided by model area size. The width ratio uses the area widths. The height ratio uses the area heights. And the lesser ratio returns the lesser of these two. Updates everything before returning the value.
Parameters:
which - Which ratio to return. Possible values are WIDTH, HEIGHT, and LESSER.
Returns:
The ratio; value is between 0 and 1.

getJustifications

int getJustifications(int which)
Returns the current justifications for the minimum area. Justifications are used only when justifications are enabled. Justifications auto locate the minimum area within the maximum area. This is only used when auto minimum area sizing is disabled.
Parameters:
which - Which justification to return. Possible values are HORIZONTAL and VERTICAL.
Returns:
The justification. Possible values for a horizontal justification are LEFT, RIGHT, and CENTER; values for a vertical justification are TOP, BOTTOM, and CENTER.

getBackgroundExistence

boolean getBackgroundExistence()
Returns whether there exists a background or not.
Returns:
If there is, then true.

getBackgroundColor

java.awt.Color getBackgroundColor()
Returns the color of the background.
Returns:
The color of the background.

getBorderExistence

boolean getBorderExistence()
Gets whether there exists borders. All must exist for this to return true.
Returns:
If true, then the borders do not exist.

getBorderExistence

boolean getBorderExistence(int which)

getBorderColor

java.awt.Color getBorderColor()
Returns the color of the border (each border).
Returns:
The color of the border.

getBorderColor

java.awt.Color getBorderColor(int which)
Returns the color of the border (specific border).
Parameters:
which - Which border you want the color of (BOTTOM, TOP, LEFT, RIGHT).
Returns:
The color of the chosen border.

getGapThicknessModel

int getGapThicknessModel()
Gets the thickness of the gap model. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Returns:
The model thickness for the gap.

getGapThickness

int getGapThickness()
Returns the thickness of one of the gaps. Should be used only when all gaps have same thickness model.
Returns:
The thickness of the gap.

getBorderThicknessModel

int getBorderThicknessModel()
Gets the thickness of the border model. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Returns:
The model thickness for the border.

getBorderThicknessModel

int getBorderThicknessModel(int which)
Gets the thickness of a border model. These values will be applied to a ratio to determine their final thicknesses. The ratio is the maximum size divided by the maximum model size. More information is in the introductory notes for this class.
Returns:
The model thickness for this border.

getBorderThickness

int getBorderThickness(int which)
Returns the thickness of a border.
Returns:
The thickness of the particular border.

getBorderThickness

int getBorderThickness()
Returns the thickness of the border.
Returns:
The thickness of the border.

getAreaNeedsUpdate

boolean getAreaNeedsUpdate()
Indicates whether some property of this class has changed.
Returns:
True if some property has changed.

applyRatio

int applyRatio(int model,
               float ratio)
Applies the given ratio to the given integer.
Parameters:
model - The integer.
ratio - The ratio.
Returns:
The ratio multiplied by the integer.

getResetAreaModel

boolean getResetAreaModel()
Returns whether the max model will be reset, in the next max sizing.
Returns:
True if the max model size needs to be reset.

updateArea

void updateArea()
Updates this area. This area maintains many variables. Calling this methods assures they are all updates with respect to eachother.

resetAreaModel

void resetAreaModel(boolean reset)
Resets the model for this class. The model is used for shrinking and growing of its components based on the maximum size of this class. If this method is called, then the next time the maximum size is set, this classes model maximum size will be made equal to the new maximum size. Effectively what this does is ensure that whenever this objects maximum size is equal to the one given, then all of the components will take on their default model sizes. Note: This is only useful when auto model max sizing is disabled.
Parameters:
reset - True causes the max model size to be set upon the next max sizing.

paintComponent

void paintComponent(java.awt.Graphics2D g2D)
Paints this bordered area. Paints borders and background if they exist. Updates everything before painting.
Parameters:
g2D - The graphics context for calculations and painting.