|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.sourceforge.chart2d.Area
|
+--net.sourceforge.chart2d.FontArea
|
+--net.sourceforge.chart2d.TitledArea
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.
| Fields inherited from class net.sourceforge.chart2d.Area |
BETWEEN, BOTTOM, CENTER, CENTERED, CONTINUOUS, DASHED, DOTTED, FLOAT, HEIGHT, HORIZONTAL, INTEGER, LABELSBOTTOM, LABELSLEFT, LEFT, LEFTBOTTOM, LEFTRIGHT, LEFTTOP, LESSER, MAX, MAXMODEL, MIN, RIGHT, RIGHTBOTTOM, RIGHTTOP, TOP, TOPBOTTOM, VERTICAL, WIDTH |
| Constructor Summary | |
(package private) |
TitledArea()
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); |
| Method Summary | |
(package private) int |
getBetweenTitleAndSpaceGapThickness(java.awt.Graphics2D g2D)
Returns the gap between the title and the available space. |
(package private) int |
getBetweenTitleAndSpaceGapThicknessModel()
Returns the model gap thickness between the title and the bounds. |
(package private) java.awt.Rectangle |
getMaxEntitledSpaceBounds(java.awt.Graphics2D g2D)
Returns the available space and location of that space. |
(package private) TextArea |
getTitle()
Gets the title. |
(package private) boolean |
getTitleAutoLocate()
Indicates whether the title will locate itself automatically within the area according to the title justifications. |
(package private) boolean |
getTitledAreaNeedsUpdate()
Indicates whether some property of this class has changed. |
(package private) boolean |
getTitleExistence()
Returns the existence of the title; whether the title exists or not. |
(package private) int |
getTitleJustifications(int which)
Returns the horizontal or vertical justification of this title within the area. |
(package private) java.awt.Dimension |
getTitleSize(int which,
java.awt.Graphics2D g2D)
Returns the size of this title. |
(package private) java.lang.String |
getTitleText()
Gets the text of the title. |
(package private) void |
paintComponent(java.awt.Graphics2D g2D)
Paints all the components of this class. |
(package private) void |
resetTitledAreaModel(boolean reset)
Resets the model for this class. |
(package private) void |
setBetweenTitleAndSpaceGapExistence(boolean existence)
Specifies whether there should exist a gap between title and the available space. |
(package private) void |
setBetweenTitleAndSpaceGapThicknessModel(int gap)
Specifies how large the model gap should be. |
(package private) void |
setTitle(java.lang.String title)
Changes the text of the title. |
(package private) void |
setTitleAutoLocate(boolean auto)
Changes whether the title will locate itself automatically within the area according to the title justifications. |
(package private) void |
setTitleExistence(boolean existence)
Changes the existence of the title; whether the title exists or not. |
(package private) void |
setTitleJustifications(int horizontal,
int vertical)
Specifies the horizontal and vertical justification for the title text respective to the size of the area. |
(package private) void |
setTitleLocation(java.awt.Point location)
Changes the location of the title. |
(package private) void |
setTitleRotateLeft(boolean rotate)
Changes whether this title should be rotated left of not. |
(package private) void |
updateTitledArea(java.awt.Graphics2D g2D)
Updates all the variables in this parent's classes, then all of this' variables. |
| Methods inherited from class net.sourceforge.chart2d.FontArea |
getFont, getFontAreaNeedsUpdate, getFontColor, getFontName, getFontPointModel, getFontStyle, resetFontAreaModel, setFontColor, setFontName, setFontPointModel, setFontStyle, updateFontArea |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
TitledArea()
| Method Detail |
void setTitleExistence(boolean existence)
existence - If true, then title exists.void setTitle(java.lang.String title)
title - The new text of this title.void setTitleAutoLocate(boolean auto)
auto - true if the title will locate itselfvoid setTitleLocation(java.awt.Point location)
location - The top left part of the title's location.void setTitleRotateLeft(boolean rotate)
rotate - If true, then text will be rotated -90 degrees whenever
painted. However, values are updated immediately.
void setTitleJustifications(int horizontal,
int vertical)
horizontal - How to justify the title horizontally. Possible values
area LEFT, RIGHT, and CENTER.
[see note above for more detail about centering]vertical - How to justify the title vertically. Possible values area
TOP, BOTTOM, and CENTER. [see note above for more detail about centering]void setBetweenTitleAndSpaceGapExistence(boolean existence)
existence - If true, then gap is subtracted from space; else gap model
thickness is ignored.void setBetweenTitleAndSpaceGapThicknessModel(int gap)
gap - The thickness of the model gap. If model max size autosizing is
disabled, then a ratio based on max size / model max size will be applied
to this thickness to obtain the actual thickness; otherwise, the thickness
will be this model thickness. Also, if gap existence is false, this
thickness will be ignored.int getBetweenTitleAndSpaceGapThicknessModel()
java.awt.Rectangle getMaxEntitledSpaceBounds(java.awt.Graphics2D g2D)
g2D - The graphics context for calculations and painting.boolean getTitleExistence()
java.lang.String getTitleText()
TextArea getTitle()
java.awt.Dimension getTitleSize(int which,
java.awt.Graphics2D g2D)
which - Which size MAXMODEL, MAX, or MIN.g2D - The graphics context for calculations and painting.int getTitleJustifications(int which)
which - Which type of justification to return. Possible values are
HORIZONTAL and VERTICAL.boolean getTitleAutoLocate()
int getBetweenTitleAndSpaceGapThickness(java.awt.Graphics2D g2D)
g2D - The graphics context to use for calculations.boolean getTitledAreaNeedsUpdate()
void updateTitledArea(java.awt.Graphics2D g2D)
g2D - The graphics context to use for calculations.void resetTitledAreaModel(boolean reset)
reset - True sets the max model size on the next max sizing.void paintComponent(java.awt.Graphics2D g2D)
paintComponent in class FontAreag2D - The graphics context for calculations and painting.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||