| java.lang.Object net.sourceforge.chart2d.Area
All known Subclasses: net.sourceforge.chart2d.GraphArea, net.sourceforge.chart2d.FontArea, net.sourceforge.chart2d.PieArea,
Area | class Area (Code) | | 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:
- No Growing And Border Encloses Maximum Area:
setAutoSizes (true, true);
- Growing And Border Encloses Maximum Area:
setAutoSizes (false, true);
- No Growing, Border Encloses Minimum Area, And Centered:
setAutoSizes (true, false);
setAutoJustifys (true, true);
setJustifications (CENTER, CENTER);
- Growing, Border Encloses Minimum Area, And Manually Located:
setAutoSizes (false, false);
setAutoJustifys (false, false);
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:
- This class assumes no null values. Pass zero based values intead. For
example,
new Point() instead of null .
- Both Growing and shrinking are supported, and are the same. When
is written, in these comments, gowing and shrinking is meant.
|
Field Summary | |
final static int | BETWEEN Indicates the betweem. | final static int | BOTTOM Indicates the bottom. | final static int | CENTER Indicates the center. | final static int | CENTERED Indicates the centered. | static float[] | CONTINUOUS Indicates the continuous. | static float[] | DASHED Indicates the dashed. | static float[] | DOTTED Indicates the dotted. | final static int | HEIGHT Indicates the height. | final static int | HORIZONTAL Indicates the horizontal. | final static int | LABELSBOTTOM Indicates the labels bottom. | final static int | LABELSLEFT Indicates the labels left. | final static int | LEFT Indicates the left. | final static int | LEFTBOTTOM Indicates the right bottom. | final static int | LEFTRIGHT Indicates the left right. | final static int | LEFTTOP Indicates the left top. | final static int | LESSER Indicates the lesser. | final static int | MAX Indicates the maximum. | final static int | MAXMODEL Indicates the model or maximum model. | final static int | MIN Indicates the minimum. | static int | NONE Indicates none. | final static int | RIGHT Indicates the right. | final static int | RIGHTBOTTOM Indicates the right bottom. | final static int | RIGHTTOP Indicates the right top. | final static int | TOP Indicates the top. | final static int | TOPBOTTOM Indicates the top bottom. | final static int | VERTICAL Indicates the vertical. | final static int | WIDTH Indicates the width. |
Constructor Summary | |
| Area() Creates a new Area. |
Method Summary | |
final int | applyRatio(int model, float ratio) Applies the given ratio to the given integer.
Parameters: model - The integer. Parameters: ratio - The ratio. | final boolean | getAreaNeedsUpdate() Indicates whether some property of this class has changed. | final boolean | getAutoSize(int which) Returns the auto sizing properties. | final Color | getBackgroundColor() Returns the color of the background. | final boolean | getBackgroundExistence() Returns whether there exists a background or not. | final Color | getBorderColor() Returns the color of the border (each border). | final 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). | final boolean | getBorderExistence() Gets whether there exists borders. | final boolean | getBorderExistence(int which) | final int | getBorderThickness(int which) Returns the thickness of a border. | final int | getBorderThickness() Returns the thickness of the border. | final int | getBorderThicknessModel() Gets the thickness of the border model. | final int | getBorderThicknessModel(int which) Gets the thickness of a border model. | final boolean | getGapExistence() Gets whether there exists gaps. | final boolean | getGapExistence(int which) | final int | getGapThickness() Returns the thickness of one of the gaps. | final int | getGapThickness(int which) Returns the thickness of one of the gaps. | final int | getGapThicknessModel() Gets the thickness of the gap model. | final int | getJustifications(int which) Returns the current justifications for the minimum area. | int | getLightSource() Gets the source of light for gradient paint of the background. | final int | getOffsetThickness() Returns the thickness of a border + the gap. | final float | getRatio(int which) Returns the specified ratio. | final boolean | getResetAreaModel() Returns whether the max model will be reset, in the next max sizing. | final Dimension | getSize(int which) Returns the size of the area. | final Point | getSizeLocation(int which) Returns the location of the area. | final Dimension | getSpaceSize(int which) Returns the size of the space area. | final Point | getSpaceSizeLocation(int which) Returns the space area location. | void | paintComponent(Graphics2D g2D) Paints this bordered area. | final void | resetAreaModel(boolean reset) Resets the model for this class. | final void | setAutoJustifys(boolean horizontal, boolean vertical) Adjusts settings to enable/disable auto justification of a minimum area
that is less than a maximum area. | final void | setAutoSizes(boolean maxModel, boolean min) Adjusts the settings that allow automatic (or default) sizing. | final void | setBackgroundColor(Color color) Adjusts the color of the background. | final void | setBackgroundExistence(boolean existence) Adjusts whether there exists a background or not. | final void | setBorderAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom) Associates border thicknesses with other border thicknesses. | final void | setBorderColor(Color color) Sets the color of the border (each border). | final void | setBorderColors(Color left, Color right, Color top, Color bottom) Sets the color of each border, individually. | final void | setBorderCornerAssociations(int leftTop, int leftBottom, int rightTop, int rightBottom) Associates each corner with one border. | final void | setBorderExistence(boolean existences) Adjusts whether there exists borders. | final void | setBorderExistences(boolean left, boolean right, boolean top, boolean bottom) Adjusts whether there exists borders, each individually. | final void | setBorderThicknessModel(int thickness) Adjusts the thickness of the border models. | final void | setBorderThicknessModels(int left, int right, int top, int bottom) Adjusts the thickness of the border models. | final void | setCustomRatio(int which, boolean customize, float ratio) Specifies whether to customize a particular ratio, overriding the
calculation of it. | final void | setGapAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom) Associates gap thicknesses with other gap thicknesses. | final void | setGapExistence(boolean existence) Adjusts whether there exists gaps. | final void | setGapExistences(boolean left, boolean right, boolean top, boolean bottom) Adjusts whether there exists gaps, each individually. | final void | setGapThicknessModel(int thickness) Adjusts the thickness of the gap models. | final void | setGapThicknessModels(int left, int right, int top, int bottom) Adjusts the thickness of the gap models. | final void | setJustifications(int horizontal, int vertical) Adjusts the actual justifications of minimum areas that are less than
maximum areas. | void | setLightSource(int source) Sets the source of light for gradient paint of the background. | final void | setLockRatios(boolean lock) Makes such that the widh and the heighh ratios are the same as the
lesser ratio. | final void | setSize(int which, Dimension size) Sets the sizes of the areas. | final void | setSizeLocation(int which, Point location) Sets the location of a size/area.
Parameters: which - Which area to relocate. | final void | setSpaceSize(int which, Dimension size) Sets the size of the space; that is the area less the borders and gaps.
Parameters: which - Which space size to change. | final void | setSpaceSizeLocation(int which, Point location) Sets the location of an internal space area of a size area.
Parameters: which - Which space area to relocate. | final void | updateArea() Updates this area. |
BETWEEN | final static int BETWEEN(Code) | | Indicates the betweem.
|
BOTTOM | final static int BOTTOM(Code) | | Indicates the bottom.
|
CENTER | final static int CENTER(Code) | | Indicates the center.
|
CENTERED | final static int CENTERED(Code) | | Indicates the centered.
|
CONTINUOUS | static float[] CONTINUOUS(Code) | | Indicates the continuous.
|
DASHED | static float[] DASHED(Code) | | Indicates the dashed.
|
DOTTED | static float[] DOTTED(Code) | | Indicates the dotted.
|
HEIGHT | final static int HEIGHT(Code) | | Indicates the height.
|
HORIZONTAL | final static int HORIZONTAL(Code) | | Indicates the horizontal.
|
LABELSBOTTOM | final static int LABELSBOTTOM(Code) | | Indicates the labels bottom.
|
LABELSLEFT | final static int LABELSLEFT(Code) | | Indicates the labels left.
|
LEFT | final static int LEFT(Code) | | Indicates the left.
|
LEFTBOTTOM | final static int LEFTBOTTOM(Code) | | Indicates the right bottom.
|
LEFTRIGHT | final static int LEFTRIGHT(Code) | | Indicates the left right.
|
LEFTTOP | final static int LEFTTOP(Code) | | Indicates the left top.
|
LESSER | final static int LESSER(Code) | | Indicates the lesser.
|
MAX | final static int MAX(Code) | | Indicates the maximum.
|
MAXMODEL | final static int MAXMODEL(Code) | | Indicates the model or maximum model.
|
MIN | final static int MIN(Code) | | Indicates the minimum.
|
NONE | static int NONE(Code) | | Indicates none.
|
RIGHT | final static int RIGHT(Code) | | Indicates the right.
|
RIGHTBOTTOM | final static int RIGHTBOTTOM(Code) | | Indicates the right bottom.
|
RIGHTTOP | final static int RIGHTTOP(Code) | | Indicates the right top.
|
TOP | final static int TOP(Code) | | Indicates the top.
|
TOPBOTTOM | final static int TOPBOTTOM(Code) | | Indicates the top bottom.
|
VERTICAL | final static int VERTICAL(Code) | | Indicates the vertical.
|
WIDTH | final static int WIDTH(Code) | | Indicates the width.
|
Area | Area()(Code) | | Creates a new Area.
|
applyRatio | final int applyRatio(int model, float ratio)(Code) | | Applies the given ratio to the given integer.
Parameters: model - The integer. Parameters: ratio - The ratio. The ratio multiplied by the integer. |
getAreaNeedsUpdate | final boolean getAreaNeedsUpdate()(Code) | | Indicates whether some property of this class has changed.
True if some property has changed. |
getAutoSize | final boolean getAutoSize(int which)(Code) | | 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 areMAXMODEL and MIN. True, if this area is auto sizing. |
getBackgroundColor | final Color getBackgroundColor()(Code) | | Returns the color of the background.
The color of the background. |
getBackgroundExistence | final boolean getBackgroundExistence()(Code) | | Returns whether there exists a background or not.
If there is, then true. |
getBorderColor | final Color getBorderColor()(Code) | | Returns the color of the border (each border).
The color of the border. |
getBorderColor | final Color getBorderColor(int which)(Code) | | Returns the color of the border (specific border).
Parameters: which - Which border you want the color of (BOTTOM, TOP, LEFT, RIGHT). The color of the chosen border. |
getBorderExistence | final boolean getBorderExistence()(Code) | | Gets whether there exists borders. All must exist for this to return true.
If true, then the borders do not exist. |
getBorderExistence | final boolean getBorderExistence(int which)(Code) | | |
getBorderThickness | final int getBorderThickness(int which)(Code) | | Returns the thickness of a border.
The thickness of the particular border. |
getBorderThickness | final int getBorderThickness()(Code) | | Returns the thickness of the border.
The thickness of the border. |
getBorderThicknessModel | final int getBorderThicknessModel()(Code) | | 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.
The model thickness for the border. |
getBorderThicknessModel | final int getBorderThicknessModel(int which)(Code) | | 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.
The model thickness for this border. |
getGapExistence | final boolean getGapExistence()(Code) | | Gets whether there exists gaps. All must exist for this to return true.
If true, then the gaps do not exist. |
getGapExistence | final boolean getGapExistence(int which)(Code) | | |
getGapThickness | final int getGapThickness()(Code) | | Returns the thickness of one of the gaps. Should be used only when all
gaps have same thickness model.
The thickness of the gap. |
getGapThickness | final int getGapThickness(int which)(Code) | | Returns the thickness of one of the gaps. Should be used only when all
gaps have same thickness model.
Parameters: which - Which gap to return the thickness of. The thickness of the gap. |
getGapThicknessModel | final int getGapThicknessModel()(Code) | | 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.
The model thickness for the gap. |
getJustifications | final int getJustifications(int which)(Code) | | 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 HORIZONTALand VERTICAL. The justification. Possible values for a horizontaljustification are LEFT, RIGHT, and CENTER; values for a verticaljustification are TOP, BOTTOM, and CENTER. |
getLightSource | int getLightSource()(Code) | | Gets the source of light for gradient paint of the background.
Possible values for the source parameter are: LEFT, RIGHT, TOP, BOTTOM, and NONE.
Which side the light is coming from. |
getOffsetThickness | final int getOffsetThickness()(Code) | | Returns the thickness of a border + the gap.
The thickness of the border + the gap. |
getRatio | final float getRatio(int which)(Code) | | 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, andLESSER. The ratio; value is between 0 and 1. |
getResetAreaModel | final boolean getResetAreaModel()(Code) | | Returns whether the max model will be reset, in the next max sizing.
True if the max model size needs to be reset. |
getSize | final Dimension getSize(int which)(Code) | | 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, andMIN. The size of the area. |
getSizeLocation | final Point getSizeLocation(int which)(Code) | | 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. The loation of the area. |
getSpaceSize | final Dimension getSpaceSize(int which)(Code) | | 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 andMIN. The size of the space area. |
getSpaceSizeLocation | final Point getSpaceSizeLocation(int which)(Code) | | 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 MAXand MIN. The location of the space area. |
paintComponent | void paintComponent(Graphics2D g2D)(Code) | | Paints this bordered area. Paints borders and background if they exist.
Updates everything before painting.
Parameters: g2D - The graphics context for calculations and painting. |
resetAreaModel | final void resetAreaModel(boolean reset)(Code) | | 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 maxsizing. |
setAutoJustifys | final void setAutoJustifys(boolean horizontal, boolean vertical)(Code) | | 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 isenabled. Parameters: vertical - If true, then vertical justification is enabled. |
setAutoSizes | final void setAutoSizes(boolean maxModel, boolean min)(Code) | | 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 alwaysbe equal to the maximum size. This disables growing because it keeps theresizing ratios at 1. If false, then maximum model is constant; so if themaximum size changes then the ratios will adjust accordingly. Parameters: min - If true, then the minimum size will be kept equal tothe maximum size. This means that the borders' outer edges will touchthe maximum size. |
setBackgroundColor | final void setBackgroundColor(Color color)(Code) | | Adjusts the color of the background. Doesn't change the background's
existence.
Parameters: color - The color of the background. |
setBackgroundExistence | final void setBackgroundExistence(boolean existence)(Code) | | Adjusts whether there exists a background or not.
Parameters: existence - If true, then there is. |
setBorderAssociations | final void setBorderAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)(Code) | | 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 rightborders. Parameters: leftTop - If true, then associates the left and top borders. Parameters: leftBottom - If true, then associates the left and bottomborders. Parameters: rightTop - If true, then associates the right and top borders. Parameters: rightBottom - If true, then associates the right and bottomborders. Parameters: topBottom - If true, then associates the top and bottomborders. |
setBorderColor | final void setBorderColor(Color color)(Code) | | Sets the color of the border (each border).
Parameters: color - The color of the border. |
setBorderColors | final void setBorderColors(Color left, Color right, Color top, Color bottom)(Code) | | Sets the color of each border, individually.
Parameters: left - The color of the left border. Parameters: right - The color of the right border. Parameters: top - The color of the top border. Parameters: bottom - The color of the bottom border. |
setBorderCornerAssociations | final void setBorderCornerAssociations(int leftTop, int leftBottom, int rightTop, int rightBottom)(Code) | | 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. Parameters: rightTop - The border to associate with the rightTop corner.Possible values are RIGHT and TOP. Parameters: leftBottomThe - border to associate with the leftBottom corner.Possible values are LEFT and BOTTOM. Parameters: rightBottom - The border to associate with the rightBottom corner.Possible values are RIGHT and BOTTOM. |
setBorderExistence | final void setBorderExistence(boolean existences)(Code) | | 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. |
setBorderExistences | final void setBorderExistences(boolean left, boolean right, boolean top, boolean bottom)(Code) | | 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. Parameters: right - If true, then the right border does exist. Parameters: top - If true, then the top border does exist. Parameters: bottom - If true, then the bottom border does exist. |
setBorderThicknessModel | final void setBorderThicknessModel(int thickness)(Code) | | 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. |
setBorderThicknessModels | final void setBorderThicknessModels(int left, int right, int top, int bottom)(Code) | | 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. Parameters: right - The model thickness for the right border. Parameters: top - The model thickness for the top border. Parameters: bottom - The model thickness for the bottom border. |
setCustomRatio | final void setCustomRatio(int which, boolean customize, float ratio)(Code) | | Specifies whether to customize a particular ratio, overriding the
calculation of it.
Parameters: which - Which ratio to customize. Parameters: customize - Whether to customize the ratio. Parameters: ratio - The custom ratio. |
setGapAssociations | final void setGapAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)(Code) | | 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. Parameters: leftTop - If true, then associates the left and top gaps. Parameters: leftBottom - If true, then associates the left and bottomgaps. Parameters: rightTop - If true, then associates the right and top gaps. Parameters: rightBottom - If true, then associates the right and bottomgaps. Parameters: topBottom - If true, then associates the top and bottom gaps. |
setGapExistence | final void setGapExistence(boolean existence)(Code) | | 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. |
setGapExistences | final void setGapExistences(boolean left, boolean right, boolean top, boolean bottom)(Code) | | 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. Parameters: right - If true, then the right gap does exist. Parameters: top - If true, then the top gap does exist. Parameters: bottom - If true, then the bottom gap does exist. |
setGapThicknessModel | final void setGapThicknessModel(int thickness)(Code) | | 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. |
setGapThicknessModels | final void setGapThicknessModels(int left, int right, int top, int bottom)(Code) | | 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. Parameters: right - The model thickness for the right gap. Parameters: top - The model thickness for the top gap. Parameters: bottom - The model thickness for the bottom gap. |
setJustifications | final void setJustifications(int horizontal, int vertical)(Code) | | 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 minimumarea. Possible values are LEFT, RIGHT and CENTER. Parameters: vertical - Sets the vertical justification for the minimumarea. Possible values are LEFT, RIGHT and CENTER. |
setLightSource | void setLightSource(int source)(Code) | | Sets the source of light for gradient paint of the background.
Possible values for the source parameter are: LEFT, RIGHT, TOP, BOTTOM, and NONE.
Parameters: source - Which side the light is coming from. |
setLockRatios | final void setLockRatios(boolean lock)(Code) | | 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. |
setSize | final void setSize(int which, Dimension size)(Code) | | 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 andMAXMODEL. Parameters: size - The new size. Must not be null. |
setSizeLocation | final void setSizeLocation(int which, Point location)(Code) | | Sets the location of a size/area.
Parameters: which - Which area to relocate. MAX is the only possible acceptedvalue. Parameters: location - The new point of the top left of the area. The outeredges of the left and top borders will touch this. Must not be null. |
setSpaceSize | final void setSpaceSize(int which, Dimension size)(Code) | | 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. Parameters: size - The new size. Must not be null. |
setSpaceSizeLocation | final void setSpaceSizeLocation(int which, Point location)(Code) | | Sets the location of an internal space area of a size area.
Parameters: which - Which space area to relocate. MIN is the only possiblevalue. If horizontal justification is true, then the x value will beignored. If vertical justification is true, then the y value will beignored. Parameters: location - The new point of the top left of the space area. Theinner edges of the top and left gaps will touch this. Must not be null. |
updateArea | final void updateArea()(Code) | | Updates this area. This area maintains many variables. Calling this
methods assures they are all updates with respect to eachother.
|
|
|