| java.lang.Object net.sourceforge.chart2d.Area net.sourceforge.chart2d.FontArea net.sourceforge.chart2d.TextArea
TextArea | final class TextArea extends FontArea (Code) | | A customizable text label. This label has built-int bordering, spacing
between borders and text, text rotation, line breaking, auto justification
within the borders, growing and shrinking, and auto locating. Much of this
functionality is provided by its super classes.
Note: Does not support null values. Pass empty strings instead.
|
Method Summary | |
final boolean | getRotateLeft() Returns whether this text is rotated left 90 degrees. | final String | getText() Returns the text of this label. | final boolean | getTextAreaNeedsUpdate() Indicates whether some property of this class has changed. | final void | paintComponent(Graphics2D g2D) Paints all of the components of this class. | final void | resetTextAreaModel(boolean reset) Resets the model for this class. | final void | setRotateLeft(boolean r) Adjusts the rotation of the text within the label. | final void | setText(String t) Changes the text of this label. | final void | setTextJustification(int which) Specifies whether text will be (in the case text is not rotated) left,
right, or center justified respective to the space within the bordered
area. | final void | updateTextArea(Graphics2D g2D) Updates all the variables of all this parent's classes, then all the
variables of this class. |
TextArea | TextArea()(Code) | | Creates a new text area with the following default values:
setText ("");
setRotateLeft (false);
setTextJustification (CENTER);
resetTextAreaModel (true);
|
getRotateLeft | final boolean getRotateLeft()(Code) | | Returns whether this text is rotated left 90 degrees.
If rotated, then true. |
getText | final String getText()(Code) | | Returns the text of this label.
The label's text. |
getTextAreaNeedsUpdate | final boolean getTextAreaNeedsUpdate()(Code) | | Indicates whether some property of this class has changed.
True if some property has changed. |
paintComponent | final void paintComponent(Graphics2D g2D)(Code) | | Paints all of the components of this class. First all the variables are
updated. Then all the components are painted.
Parameters: g2D - The graphics context for calculations and painting. |
resetTextAreaModel | final void resetTextAreaModel(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. |
setRotateLeft | final void setRotateLeft(boolean r)(Code) | | Adjusts the rotation of the text within the label. If not rotated, text
runs from left to right, top to bottom of the are. If rotate, text runs
from bottom to top, left to right. The text is rotated -90 degree. Even
when rotate, the location or origin of this label is always the top left
corner of it, however, the text's actual origin is near the bottom left
corner.
Parameters: r - If true, then adjusts settings so that text is rotated. |
setText | final void setText(String t)(Code) | | Changes the text of this label.
Parameters: t - The new text. |
setTextJustification | final void setTextJustification(int which)(Code) | | Specifies whether text will be (in the case text is not rotated) left,
right, or center justified respective to the space within the bordered
area. In the case text is rotated, then bottom, top or center
justification is available. This only adjusts the horizontal
justification, or in the case of rotated text, the vertical justification.
Parameters: which - Which justification for the text. Possible values, if notrotated: LEFT, RIGHT, CENTER; if rotated: BOTTOM, TOP, CENTER. Also,if you prefer and when rotated, LEFT and RIGHT may be used to mean BOTTOMand TOP respectively; this program translates them into BOTTOM and TOP foryou. |
updateTextArea | final void updateTextArea(Graphics2D g2D)(Code) | | Updates all the variables of all this parent's classes, then all the
variables of this class.
Parameters: g2D - The graphics context under which to make 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)
|
|
|