| java.lang.Object net.sourceforge.chart2d.Area net.sourceforge.chart2d.FontArea net.sourceforge.chart2d.TitledArea
All known Subclasses: net.sourceforge.chart2d.ChartArea, net.sourceforge.chart2d.AxisArea,
TitledArea | class TitledArea extends FontArea (Code) | | A bordered area with a title and auto calculations for left over space. This
class uses all the customizability of the bordered area class, adds a text
area for the title, automatic gap below title functionality and title within
area justification. The title can be located at the top, bottom, left or
right, and sometimes centered. With
any of these scenarios, the title can be rotated left. The left over space
will be computed and is availabe through a get method.
Note: Do not pass any null values; instead pass an empty string if need be.
|
TitledArea | TitledArea()(Code) | | Creates a new titled area with the default values:
setTitleExistence (true);
setFontPointModel (14);
setBetweenTitleAndSpaceGapExistence (true);
setBetweenTitleAndSpaceGapThicknessModel (5);
setTitleJustifications (CENTER, TOP);
setTitleAutoLocate (true);
title.setAutoJustifys (false, false);
title.setBorderExistences (false, false, false, false);
title.setGapExistences (false, false, false, false);
title.setBackgroundExistence (false);
resetTitledAreaModel (true);
|
getBetweenTitleAndSpaceGapThickness | final int getBetweenTitleAndSpaceGapThickness(Graphics2D g2D)(Code) | | Returns the gap between the title and the available space. This is not
the model gap thickness but the actual thickness, after applying the ratio
when relevant. All variables area updated before returning this size.
Parameters: g2D - The graphics context to use for calculations. The thickness of the gap between the title and the available space. |
getBetweenTitleAndSpaceGapThicknessModel | final int getBetweenTitleAndSpaceGapThicknessModel()(Code) | | Returns the model gap thickness between the title and the bounds.
The thickness of the model gap. |
getMaxEntitledSpaceBounds | final Rectangle getMaxEntitledSpaceBounds(Graphics2D g2D)(Code) | | Returns the available space and location of that space. The available
space is the area less the title and the gap. Updates all variables
before calculating the bounds.
Parameters: g2D - The graphics context for calculations and painting. The bounds of the available space. |
getMinEntitledSpaceBounds | final Rectangle getMinEntitledSpaceBounds(Graphics2D g2D)(Code) | | Returns the available space and location of that space. The available
space is the area less the title and the gap. Updates all variables
before calculating the bounds.
Parameters: g2D - The graphics context for calculations and painting. The bounds of the available space. |
getTitle | final TextArea getTitle()(Code) | | Gets the title.
The title's TextArea. |
getTitleAutoLocate | final boolean getTitleAutoLocate()(Code) | | Indicates whether the title will locate itself automatically within
the area according to the title justifications. Otherwise, the title
location must be set manually using the title set location method.
True if the title will locate itself |
getTitleExistence | final boolean getTitleExistence()(Code) | | Returns the existence of the title; whether the title exists or not.
If true, then title exists. |
getTitleJustifications | final int getTitleJustifications(int which)(Code) | | Returns the horizontal or vertical justification of this title within the
area.
Parameters: which - Which type of justification to return. Possible values areHORIZONTAL and VERTICAL. The justification of this title. Possible values ofhorizontal justification area LEFT, RIGHT, and CENTER. Possible values ofvertical justification are TOP, BOTTOM, and CENTER. |
getTitleSize | final Dimension getTitleSize(int which, Graphics2D g2D)(Code) | | Returns the size of this title. Even if the title is rotated, the width
of this dimension will correspond to width on the monitor screen, and
not height. The same is true for the height of the dimension.
The size of the title. Parameters: which - Which size MAXMODEL, MAX, or MIN. Parameters: g2D - The graphics context for calculations and painting. |
getTitleText | final String getTitleText()(Code) | | Gets the text of the title.
The new text of this title. |
getTitledAreaNeedsUpdate | final boolean getTitledAreaNeedsUpdate()(Code) | | Indicates whether some property of this class has changed.
True if some property has changed. |
paintComponent | void paintComponent(Graphics2D g2D)(Code) | | Paints all the components of this class. First all variables are updated.
Parameters: g2D - The graphics context for calculations and painting. |
resetTitledAreaModel | final void resetTitledAreaModel(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 sets the max model size on the next max sizing. |
setBetweenTitleAndSpaceGapExistence | final void setBetweenTitleAndSpaceGapExistence(boolean existence)(Code) | | Specifies whether there should exist a gap between title and the available
space. Part of the functionality of this class is to calculate space not
used by the title. Setting this gap, makes the available space less so
drawing can begin exactly in the space, and look good becuase its spaced
nicely from the title.
Parameters: existence - If true, then gap is subtracted from space; else gap modelthickness is ignored. |
setBetweenTitleAndSpaceGapThicknessModel | final void setBetweenTitleAndSpaceGapThicknessModel(int gap)(Code) | | Specifies how large the model gap should be. Part of the functionality of
this class is to calculate space not
used by the title. This gap, makes the available space less so
drawing can begin exactly in the space, and look good becuase its spaced
nicely from the title.
Parameters: gap - The thickness of the model gap. If model max size autosizing isdisabled, then a ratio based on max size / model max size will be appliedto this thickness to obtain the actual thickness; otherwise, the thicknesswill be this model thickness. Also, if gap existence is false, thisthickness will be ignored. |
setTitle | final void setTitle(String title)(Code) | | Changes the text of the title.
Parameters: title - The new text of this title. |
setTitleAutoLocate | final void setTitleAutoLocate(boolean auto)(Code) | | Changes whether the title will locate itself automatically within
the area according to the title justifications. Otherwise, the title
location must be set manually using the title set location method.
Parameters: auto - true if the title will locate itself |
setTitleExistence | final void setTitleExistence(boolean existence)(Code) | | Changes the existence of the title; whether the title exists or not.
Otherwise, title will not be included in calculations and will not be
painted.
Parameters: existence - If true, then title exists. |
setTitleJustifications | final void setTitleJustifications(int horizontal, int vertical)(Code) | | Specifies the horizontal and vertical justification for the title text
respective to the size of the area. Note: A non rotated title cannot
be vertically centered. And a rotated title cannot be horizontally
centered.
Parameters: horizontal - How to justify the title horizontally. Possible valuesarea LEFT, RIGHT, and CENTER.[see note above for more detail about centering] Parameters: vertical - How to justify the title vertically. Possible values areaTOP, BOTTOM, and CENTER. [see note above for more detail about centering] |
setTitleLocation | final void setTitleLocation(Point location)(Code) | | Changes the location of the title. The top, left part of the title
no matter what title orientation.
Parameters: location - The top left part of the title's location. |
setTitleRotateLeft | final void setTitleRotateLeft(boolean rotate)(Code) | | Changes whether this title should be rotated left of not.
When rotating left, the text will be rotated -90 degrees. However, the
origin and the size of the label will not be rotated. It will encapsulate
the newly rotated text.
Parameters: rotate - If true, then text will be rotated -90 degrees wheneverpainted. However, values are updated immediately. |
updateTitledArea | final void updateTitledArea(Graphics2D g2D)(Code) | | Updates all the variables in this parent's classes, then all of this'
variables.
Parameters: g2D - The graphics context to use for calculations. |
Methods inherited from net.sourceforge.chart2d.Area | final int applyRatio(int model, float ratio)(Code)(Java Doc) final boolean getAreaNeedsUpdate()(Code)(Java Doc) final boolean getAutoSize(int which)(Code)(Java Doc) final Color getBackgroundColor()(Code)(Java Doc) final boolean getBackgroundExistence()(Code)(Java Doc) final Color getBorderColor()(Code)(Java Doc) final Color getBorderColor(int which)(Code)(Java Doc) final boolean getBorderExistence()(Code)(Java Doc) final boolean getBorderExistence(int which)(Code)(Java Doc) final int getBorderThickness(int which)(Code)(Java Doc) final int getBorderThickness()(Code)(Java Doc) final int getBorderThicknessModel()(Code)(Java Doc) final int getBorderThicknessModel(int which)(Code)(Java Doc) final boolean getGapExistence()(Code)(Java Doc) final boolean getGapExistence(int which)(Code)(Java Doc) final int getGapThickness()(Code)(Java Doc) final int getGapThickness(int which)(Code)(Java Doc) final int getGapThicknessModel()(Code)(Java Doc) final int getJustifications(int which)(Code)(Java Doc) int getLightSource()(Code)(Java Doc) final int getOffsetThickness()(Code)(Java Doc) final float getRatio(int which)(Code)(Java Doc) final boolean getResetAreaModel()(Code)(Java Doc) final Dimension getSize(int which)(Code)(Java Doc) final Point getSizeLocation(int which)(Code)(Java Doc) final Dimension getSpaceSize(int which)(Code)(Java Doc) final Point getSpaceSizeLocation(int which)(Code)(Java Doc) void paintComponent(Graphics2D g2D)(Code)(Java Doc) final void resetAreaModel(boolean reset)(Code)(Java Doc) final void setAutoJustifys(boolean horizontal, boolean vertical)(Code)(Java Doc) final void setAutoSizes(boolean maxModel, boolean min)(Code)(Java Doc) final void setBackgroundColor(Color color)(Code)(Java Doc) final void setBackgroundExistence(boolean existence)(Code)(Java Doc) final void setBorderAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)(Code)(Java Doc) final void setBorderColor(Color color)(Code)(Java Doc) final void setBorderColors(Color left, Color right, Color top, Color bottom)(Code)(Java Doc) final void setBorderCornerAssociations(int leftTop, int leftBottom, int rightTop, int rightBottom)(Code)(Java Doc) final void setBorderExistence(boolean existences)(Code)(Java Doc) final void setBorderExistences(boolean left, boolean right, boolean top, boolean bottom)(Code)(Java Doc) final void setBorderThicknessModel(int thickness)(Code)(Java Doc) final void setBorderThicknessModels(int left, int right, int top, int bottom)(Code)(Java Doc) final void setCustomRatio(int which, boolean customize, float ratio)(Code)(Java Doc) final void setGapAssociations(boolean leftRight, boolean leftTop, boolean leftBottom, boolean rightTop, boolean rightBottom, boolean topBottom)(Code)(Java Doc) final void setGapExistence(boolean existence)(Code)(Java Doc) final void setGapExistences(boolean left, boolean right, boolean top, boolean bottom)(Code)(Java Doc) final void setGapThicknessModel(int thickness)(Code)(Java Doc) final void setGapThicknessModels(int left, int right, int top, int bottom)(Code)(Java Doc) final void setJustifications(int horizontal, int vertical)(Code)(Java Doc) void setLightSource(int source)(Code)(Java Doc) final void setLockRatios(boolean lock)(Code)(Java Doc) final void setSize(int which, Dimension size)(Code)(Java Doc) final void setSizeLocation(int which, Point location)(Code)(Java Doc) final void setSpaceSize(int which, Dimension size)(Code)(Java Doc) final void setSpaceSizeLocation(int which, Point location)(Code)(Java Doc) final void updateArea()(Code)(Java Doc)
|
|
|