net.sourceforge.chart2d
Class LBGraphArea
java.lang.Object
|
+--net.sourceforge.chart2d.Area
|
+--net.sourceforge.chart2d.GraphArea
|
+--net.sourceforge.chart2d.LBGraphArea
- class LBGraphArea
- extends GraphArea
The area that the x axis and y axis attach to, and in which bars, lines, or
dots are painted to represent the data set. The "LB" in the name of this
class stands for Labels Bottom. This graph should always be used when the
data descriptors for the the graph are located on the bottom. Data
descriptors have values such as September and November, and not like 0 or 50.
Features:
Provides bordering functionality. Allows lines to be painted that match
up with y axis and x axis tick marks in order to know where the bars, dots,
or plot lines are in relation to the y axis values. Supports vertical
bar graphs, line charts, and scatter charts (dots), and any combintation
thereof. If a bars are present in any graph, then it is highly recommended
that the GraphArea method, allowComponentAlignment be passed the value of
false. This will ensure that all the bars are visible on the graph. For
graphs that do not have bars present, the opposite is advised. The GraphArea
method should be passed the value of true. This provides a more intuitive
representation of the data.
| 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) |
LBGraphArea()
Creates a graph area with GraphArea's default values. |
|
Method Summary |
(package private) boolean |
getLBGraphAreaNeedsUpdate()
Indicates whether some property of this class has changed. |
(package private) int |
getPrefWidth(int numSets,
int numCats,
int numCompsPerCat)
Does a quick calculation of the preferred width of the graph. |
(package private) void |
paintComponent(java.awt.Graphics2D g2D)
Paints all the components of this class. |
(package private) void |
resetLBGraphAreaModel(boolean reset)
Resets the model for this class. |
(package private) void |
updateLBGraphArea()
Updates this parent's variables, and this' variables. |
| Methods inherited from class net.sourceforge.chart2d.GraphArea |
getAllowComponentAlignment, getBarColors, getBarLowValues, getBarsExcessSpaceFeedbackRatio, getBarsExistence, getBarsThicknessModel, getBarsWithinCategoryOverlapRatio, getBetweenComponentsGapExistence, getBetweenComponentsGapThicknessModel, getDotColors, getDotsExcessSpaceFeedbackRatio, getDotsExistence, getDotsThicknessModel, getDotsWithinCategoryOverlapRatio, getGraphAreaNeedsUpdate, getGraphValues, getHorizontalLinesColor, getHorizontalLinesExistence, getHorizontalLinesStyle, getHorizontalLinesThickness, getHorizontalLinesThicknessModel, getLabelsAxisTicksAlignment, getLineColors, getLinesExcessSpaceFeedbackRatio, getLinesExistence, getLinesFillInterior, getLinesFillInteriorBaseValue, getLinesThicknessModel, getLinesWithinCategoryOverlapRatio, getOutlineComponents, getOutlineComponentsColor, getType, getVerticalLinesColor, getVerticalLinesExistence, getVerticalLinesStyle, getVerticalLinesThickness, getVerticalLinesThicknessModel, getXTicks, getYTicks, resetGraphAreaModel, setAllowComponentAlignment, setBarColors, setBarLowValues, setBarsExcessSpaceFeedbackRatio, setBarsExistence, setBarsThicknessModel, setBarsWithinCategoryOverlapRatio, setBetweenComponentsGapExistence, setBetweenComponentsGapThicknessModel, setDotColors, setDotsExcessSpaceFeedbackRatio, setDotsExistence, setDotsThicknessModel, setDotsWithinCategoryOverlapRatio, setGraphValues, setHorizontalLinesColor, setHorizontalLinesExistence, setHorizontalLinesStyle, setHorizontalLinesThicknessModel, setLabelsAxisTicksAlignment, setLineColors, setLinesExcessSpaceFeedbackRatio, setLinesExistence, setLinesFillInterior, setLinesFillInteriorBaseValue, setLinesThicknessAssociation, setLinesThicknessModel, setLinesWithinCategoryOverlapRatio, setOutlineComponents, setOutlineComponentsColor, setType, setVerticalLinesColor, setVerticalLinesExistence, setVerticalLinesStyle, setVerticalLinesThicknessModel, setXTicks, setYTicks, stackedBarConvert, stackedBarSort, updateGraphArea |
| Methods inherited from class net.sourceforge.chart2d.Area |
applyRatio, getAreaNeedsUpdate, getAutoSize, getBackgroundColor, getBackgroundExistence, getBorderColor, getBorderColor, getBorderExistence, getBorderExistence, getBorderThickness, getBorderThickness, getBorderThicknessModel, getBorderThicknessModel, getGapThickness, getGapThicknessModel, getJustifications, getRatio, getResetAreaModel, getSize, getSizeLocation, getSpaceSize, getSpaceSizeLocation, resetAreaModel, setAutoJustifys, setAutoSizes, setBackgroundColor, setBackgroundExistence, setBorderAssociations, setBorderColor, setBorderColors, setBorderCornerAssociations, setBorderExistence, setBorderExistences, setBorderThicknessModel, setBorderThicknessModels, setCustomRatio, setGapAssociations, setGapExistence, setGapExistences, setGapThicknessModel, setGapThicknessModels, setJustifications, setLockRatios, setSize, setSizeLocation, setSpaceSize, setSpaceSizeLocation, updateArea |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LBGraphArea
LBGraphArea()
- Creates a graph area with GraphArea's default values. Default values:
resetLBGraphAreaModel (true);
getPrefWidth
int getPrefWidth(int numSets,
int numCats,
int numCompsPerCat)
- Does a quick calculation of the preferred width of the graph.
- Parameters:
numSets - The number of data series.numComps - The number of data categories per series.numCompsPerCat - The number of data per series, per category.- Returns:
- The preferred width.
getLBGraphAreaNeedsUpdate
boolean getLBGraphAreaNeedsUpdate()
- Indicates whether some property of this class has changed.
- Returns:
- True if some property has changed.
resetLBGraphAreaModel
void resetLBGraphAreaModel(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.
updateLBGraphArea
void updateLBGraphArea()
- Updates this parent's variables, and this' variables.
paintComponent
void paintComponent(java.awt.Graphics2D g2D)
- Paints all the components of this class. First all variables are updated.
- Overrides:
paintComponent in class GraphArea
- Parameters:
g2D - The graphics context for calculations and painting.