Package net.sourceforge.chart2d
Class GraphProperties
java.lang.Object
net.sourceforge.chart2d.GraphProperties
A data structure for holding the properties common to all graph area objects.
A graph area is the rectangular region surrounded on two sides by axes and containing either
lines, dots, or bars as graph components.
Pass this to any number of GraphChart2D objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic AlphaCompositeA medium transparent (some blending) alpha composite.static AlphaCompositeA mildly transparent (some blending) alpha composite.static AlphaCompositeAn opaque (no blending) alpha composite.static intIndicates the bottom of something.static intIndicates only the component.static float[]Indicates the lines will be continuous.static float[]Indicates the lines will be dashed.static float[]Indicates the lines will be dotted.static intIndicates only the graph.static final booleanThe default is false.static final ColorThe default is Color.white.static final booleanThe default is false.static final floatThe default is 1f.static final booleanThe default is true.static floatThe default is .75f.static final intThe default is 10.static final floatThe default is .535f.static final booleanThe default is true.static final intThe default is 2.static final booleanThe default is true.static final ColorThe default is Color.black.static final ColorThe default is Color.gray.static final intThe default is 2.static AlphaCompositeThe default is ALPHA_COMPOSITE_NONE.static intThe default is TOP.static intThe default is COMPONENT.static final booleanThe default is true.static final floatThe default is 0f.static final booleanThe default is false.static final intThe default is 8.static final floatThe default is .40f.static final ColorThe default is Color.gray.static final booleanThe default is false.static final float[]The default is CONTINUOUS.static final intThe default is 2.static final floatThe default is 0f.static final booleanThe default is false.static final booleanThe default is false.static final booleanThe default is true.static final intThe default is 5.static final floatThe default is 0f.static final ColorThe default is Color.gray.static final booleanThe default is true.static final float[]The default is CONTINUOUS.static final intThe default is 2.static final ColorThe default is Color.black.static final booleanThe default is false.static intIndicates the left of something.static intIndicates none.static intIndicates the right of something.static intIndicates the top of something. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a GraphProperties object with the documented default values.GraphProperties(GraphProperties graphProps) Creates a GraphProperties object with property values copied from another object. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanGets whether the graph's components (ie bars, dots, or lines) are allowed to overlap/align or are offset for each set and within each category.final ColorGets the color of the background of this graph.final booleanGets whether the background of this graph exists.final floatGets the amount of the excess space to feed back to bars thickness.final booleanGets whether the graph contains bar components.final floatGets the degree of rounding for the bars.final intGets the thickness of the bar components for the chart's model size.final floatGets how much the bars can overlap eachother when there are multiple data values per data set and per data category.final booleanGets whether a gap between each category of components exists (ie not the gap between each each component with each category).final intGets the thickness of the gap between each category of components for the chart's model size.final booleanGets whether the graph's left and bottom border exists.final ColorGets the color of the graph's left and bottom border.final ColorGets the color of the graph's right and top border.final intGets the thickness of the graph's left and bottom border for the chart's model size.final AlphaCompositeGets the actual AlphaComposite object to use on the Graphics2D object context for painting the graph components managed by this GraphProperties object.final intGets the direction of the source of the light if any.final intGets the type of the lighting affect.final booleanGets whether the graph's components will be clipped if they pass over the graph's inner space or border.final floatGets the amount of the excess space to feed back to dots thickness.final booleanGets whether the graph contains dot components.final intGets the thickness of the dot components for the chart's model size.final floatGets how much the dots can overlap eachother when there are multiple data values per data set and per data category.final ColorGets the color of the vertical lines of this graph.final booleanGets whether the vertical lines of this graph exist.final float[]Gets the style of the vertical lines of this graph.final intGets the thickness of the vertical lines of this graph for the chart's model size.final floatGets the amount of the excess space to feed back to lines thickness.final booleanGets whether the graph contains line components.final booleanGets whether the graph lines will made to form a shap (ie like a mountain range).final booleanGets whether the horizontal and vertical lines (if they both exist) should both be the same thickness at all times.final intGets the thickness of the line components for the chart's model size.final floatGets how much the lines can overlap eachother when there are multiple data values per data set and per data category.final ColorGets the color of the horizontal lines of this graph.final booleanGets whether the horizontal lines of this graph exist.final float[]Gets the style of the horizontal lines of this graph.final intGets the thickness of the horizontal lines of this graph for the chart's model size.final ColorGets the color of the thin outline around components (ie bars, lines, or dots).final booleanGets whether there exists a thin outline around each component (ie bars, lines, or dots).final voidsetGraphAllowComponentAlignment(boolean alignment) Sets whether the graph's components (ie bars, dots, or lines) are allowed to overlap/align or are offset for each set and within each category.final voidsetGraphBackgroundColor(Color color) Sets the color of the background of this graph.final voidsetGraphBackgroundExistence(boolean existence) Sets whether the background of this graph exists.final voidsetGraphBarsExcessSpaceFeedbackRatio(float ratio) Sets the amount of the excess space to feed back to bars thickness.final voidsetGraphBarsExistence(boolean existence) Sets whether the graph contains bar components.final voidsetGraphBarsRoundingRatio(float r) Sets the degree of rounding for the bars.final voidsetGraphBarsThicknessModel(int thickness) Sets the thickness of the bar components for the chart's model size.final voidsetGraphBarsWithinCategoryOverlapRatio(float ratio) Sets how much the bars can overlap eachother when there are multiple data values per data set and per data category.final voidsetGraphBetweenComponentsGapExistence(boolean existence) Sets whether a gap between each category of components exists (ie not the gap between each each component with each category).final voidsetGraphBetweenComponentsGapThicknessModel(int thickness) Sets the thickness of the gap between each category of components for the chart's model size.final voidsetGraphBorderExistence(boolean existence) Sets whether the graph's left and bottom border exists.final voidSets the color of the graph's left and bottom border.final voidsetGraphBorderRightTopColor(Color color) Sets the color of the graph's right and top border.final voidsetGraphBorderThicknessModel(int thickness) Sets the thickness of the graph's left and bottom border for the chart's model size.final voidSets the actual AlphaComposite object to use on the Graphics2D object context for painting the graph components managed by this GraphProperties object.final voidSets the direction of the source of the light if any.final voidsetGraphComponentsLightType(int t) Sets the type of the lighting affect.final voidsetGraphComponentsOverflowClip(boolean c) Sets whether the graph's components will be clipped if they pass over the graph's inner space or border.final voidsetGraphDotsExcessSpaceFeedbackRatio(float ratio) Sets the amount of the excess space to feed back to dots thickness.final voidsetGraphDotsExistence(boolean existence) Sets whether the graph contains dot components.final voidsetGraphDotsThicknessModel(int thickness) Sets the thickness of the dot components for the chart's model size.final voidsetGraphDotsWithinCategoryOverlapRatio(float ratio) Sets how much the dots can overlap eachother when there are multiple data values per data set and per data category.final voidsetGraphLabelsLinesColor(Color color) Sets the color of the vertical lines of this graph.final voidsetGraphLabelsLinesExistence(boolean existence) Sets whether the vertical lines of this graph exist.final voidsetGraphLabelsLinesStyle(float[] style) Sets the style of the vertical lines of this graph.final voidsetGraphLabelsLinesThicknessModel(int thickness) Sets the thickness of the vertical lines of this graph for the chart's model size.final voidsetGraphLinesExcessSpaceFeedbackRatio(float ratio) Sets the amount of the excess space to feed back to lines thickness.final voidsetGraphLinesExistence(boolean existence) Sets whether the graph contains line components.final voidsetGraphLinesFillInterior(boolean fill) Sets whether the graph lines will made to form a shap (ie like a mountain range).final voidsetGraphLinesThicknessAssociation(boolean association) Sets whether the horizontal and vertical lines (if they both exist) should both be the same thickness at all times.final voidsetGraphLinesThicknessModel(int thickness) Sets the thickness of the line components for the chart's model size.final voidsetGraphLinesWithinCategoryOverlapRatio(float ratio) Sets how much the lines can overlap eachother when there are multiple data values per data set and per data category.final voidsetGraphNumbersLinesColor(Color color) Sets the color of the horizontal lines of this graph.final voidsetGraphNumbersLinesExistence(boolean existence) Sets whether the horizontal lines of this graph exist.final voidsetGraphNumbersLinesStyle(float[] style) Sets the style of the horizontal lines of this graph.final voidsetGraphNumbersLinesThicknessModel(int thickness) Sets the thickness of the horizontal lines of this graph for the chart's model size.final voidSets the color of the thin outline around components (ie bars, lines, or dots).final voidsetGraphOutlineComponentsExistence(boolean existence) Sets whether there exists a thin outline around each component (ie bars, lines, or dots).final voidsetGraphProperties(GraphProperties graphProps) Sets all properties to be the values of another GraphProperties object.final voidSets all properties to their default values.
-
Field Details
-
CONTINUOUS
public static float[] CONTINUOUSIndicates the lines will be continuous. Used by setGraphNumbersLinesStyle(int) and setGraphLabelsLinesStyle(int). -
DASHED
public static float[] DASHEDIndicates the lines will be dashed. Used by setGraphNumbersLinesStyle(int) and setGraphLabelsLinesStyle(int). -
DOTTED
public static float[] DOTTEDIndicates the lines will be dotted. Used by setGraphNumbersLinesStyle(int) and setGraphLabelsLinesStyle(int). -
LEFT
public static int LEFTIndicates the left of something. Used by setGraphComponentsLightSource(int). -
RIGHT
public static int RIGHTIndicates the right of something. Used by setGraphComponentsLightSource(int). -
TOP
public static int TOPIndicates the top of something. Used by setGraphComponentsLightSource(int). -
BOTTOM
public static int BOTTOMIndicates the bottom of something. Used by setGraphComponentsLightSource(int). -
NONE
public static int NONEIndicates none. Used by setGraphComponentsLightSource(int). -
COMPONENT
public static int COMPONENTIndicates only the component. Used by setGraphComponentsLightType(int). -
GRAPH
public static int GRAPHIndicates only the graph. Used by setGraphComponentsLightType(int). -
ALPHA_COMPOSITE_NONE
An opaque (no blending) alpha composite. -
ALPHA_COMPOSITE_MILD
A mildly transparent (some blending) alpha composite. -
ALPHA_COMPOSITE_MEDIUM
A medium transparent (some blending) alpha composite. -
GRAPH_BACKGROUND_EXISTENCE_DEFAULT
public static final boolean GRAPH_BACKGROUND_EXISTENCE_DEFAULTThe default is false.- See Also:
-
GRAPH_BACKGROUND_COLOR_DEFAULT
The default is Color.white. -
GRAPH_BORDER_EXISTENCE_DEFAULT
public static final boolean GRAPH_BORDER_EXISTENCE_DEFAULTThe default is true.- See Also:
-
GRAPH_BORDER_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_BORDER_THICKNESS_MODEL_DEFAULTThe default is 2.- See Also:
-
GRAPH_BORDER_LEFT_BOTTOM_COLOR_DEFAULT
The default is Color.black. -
GRAPH_BORDER_RIGHT_TOP_COLOR_DEFAULT
The default is Color.gray. -
GRAPH_ALLOW_COMPONENT_ALIGNMENT_DEFAULT
public static final boolean GRAPH_ALLOW_COMPONENT_ALIGNMENT_DEFAULTThe default is false.- See Also:
-
GRAPH_OUTLINE_COMPONENTS_EXISTENCE_DEFAULT
public static final boolean GRAPH_OUTLINE_COMPONENTS_EXISTENCE_DEFAULTThe default is false.- See Also:
-
GRAPH_OUTLINE_COMPONENTS_COLOR_DEFAULT
The default is Color.black. -
GRAPH_BETWEEN_COMPONENTS_GAP_EXISTENCE_DEFAULT
public static final boolean GRAPH_BETWEEN_COMPONENTS_GAP_EXISTENCE_DEFAULTThe default is true.- See Also:
-
GRAPH_BETWEEN_COMPONENTS_GAP_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_BETWEEN_COMPONENTS_GAP_THICKNESS_MODEL_DEFAULTThe default is 2.- See Also:
-
GRAPH_BARS_EXISTENCE_DEFAULT
public static final boolean GRAPH_BARS_EXISTENCE_DEFAULTThe default is true.- See Also:
-
GRAPH_BARS_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_BARS_THICKNESS_MODEL_DEFAULTThe default is 10.- See Also:
-
GRAPH_BARS_EXCESS_SPACE_FEEDBACK_RATIO_DEFAULT
public static final float GRAPH_BARS_EXCESS_SPACE_FEEDBACK_RATIO_DEFAULTThe default is 1f.- See Also:
-
GRAPH_BARS_WITHIN_CATEGORY_OVERLAP_RATIO_DEFAULT
public static final float GRAPH_BARS_WITHIN_CATEGORY_OVERLAP_RATIO_DEFAULTThe default is .535f.- See Also:
-
GRAPH_LINES_EXISTENCE_DEFAULT
public static final boolean GRAPH_LINES_EXISTENCE_DEFAULTThe default is false.- See Also:
-
GRAPH_LINES_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_LINES_THICKNESS_MODEL_DEFAULTThe default is 5.- See Also:
-
GRAPH_LINES_FILL_INTERIOR_DEFAULT
public static final boolean GRAPH_LINES_FILL_INTERIOR_DEFAULTThe default is false.- See Also:
-
GRAPH_LINES_EXCESS_SPACE_FEEDBACK_RATIO_DEFAULT
public static final float GRAPH_LINES_EXCESS_SPACE_FEEDBACK_RATIO_DEFAULTThe default is 0f.- See Also:
-
GRAPH_LINES_WITHIN_CATEGORY_OVERLAP_RATIO_DEFAULT
public static final float GRAPH_LINES_WITHIN_CATEGORY_OVERLAP_RATIO_DEFAULTThe default is 0f.- See Also:
-
GRAPH_DOTS_EXISTENCE_DEFAULT
public static final boolean GRAPH_DOTS_EXISTENCE_DEFAULTThe default is false.- See Also:
-
GRAPH_DOTS_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_DOTS_THICKNESS_MODEL_DEFAULTThe default is 8.- See Also:
-
GRAPH_DOTS_EXCESS_SPACE_FEEDBACK_RATIO_DEFAULT
public static final float GRAPH_DOTS_EXCESS_SPACE_FEEDBACK_RATIO_DEFAULTThe default is 0f.- See Also:
-
GRAPH_DOTS_WITHIN_CATEGORY_OVERLAP_RATIO_DEFAULT
public static final float GRAPH_DOTS_WITHIN_CATEGORY_OVERLAP_RATIO_DEFAULTThe default is .40f.- See Also:
-
GRAPH_NUMBERS_LINES_EXISTENCE_DEFAULT
public static final boolean GRAPH_NUMBERS_LINES_EXISTENCE_DEFAULTThe default is true.- See Also:
-
GRAPH_NUMBERS_LINES_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_NUMBERS_LINES_THICKNESS_MODEL_DEFAULTThe default is 2.- See Also:
-
GRAPH_NUMBERS_LINES_STYLE_DEFAULT
public static final float[] GRAPH_NUMBERS_LINES_STYLE_DEFAULTThe default is CONTINUOUS. -
GRAPH_NUMBERS_LINES_COLOR_DEFAULT
The default is Color.gray. -
GRAPH_LABELS_LINES_EXISTENCE_DEFAULT
public static final boolean GRAPH_LABELS_LINES_EXISTENCE_DEFAULTThe default is false.- See Also:
-
GRAPH_LABELS_LINES_THICKNESS_MODEL_DEFAULT
public static final int GRAPH_LABELS_LINES_THICKNESS_MODEL_DEFAULTThe default is 2.- See Also:
-
GRAPH_LABELS_LINES_STYLE_DEFAULT
public static final float[] GRAPH_LABELS_LINES_STYLE_DEFAULTThe default is CONTINUOUS. -
GRAPH_LABELS_LINES_COLOR_DEFAULT
The default is Color.gray. -
GRAPH_LINES_THICKNESS_ASSOCIATION_DEFAULT
public static final boolean GRAPH_LINES_THICKNESS_ASSOCIATION_DEFAULTThe default is true.- See Also:
-
GRAPH_COMPONENTS_LIGHT_SOURCE_DEFAULT
public static int GRAPH_COMPONENTS_LIGHT_SOURCE_DEFAULTThe default is TOP. -
GRAPH_COMPONENTS_LIGHT_TYPE_DEFAULT
public static int GRAPH_COMPONENTS_LIGHT_TYPE_DEFAULTThe default is COMPONENT. -
GRAPH_BARS_ROUNDING_RATIO_DEFAULT
public static float GRAPH_BARS_ROUNDING_RATIO_DEFAULTThe default is .75f. -
GRAPH_COMPONENTS_OVERFLOW_CLIP_DEFAULT
public static final boolean GRAPH_COMPONENTS_OVERFLOW_CLIP_DEFAULTThe default is true.- See Also:
-
GRAPH_COMPONENTS_ALPHA_COMPOSITE_DEFAULT
The default is ALPHA_COMPOSITE_NONE.
-
-
Constructor Details
-
GraphProperties
public GraphProperties()Creates a GraphProperties object with the documented default values. -
GraphProperties
Creates a GraphProperties object with property values copied from another object. The copying is a deep copy.- Parameters:
graphProps- The properties to copy.
-
-
Method Details
-
setGraphPropertiesToDefaults
public final void setGraphPropertiesToDefaults()Sets all properties to their default values. -
setGraphProperties
Sets all properties to be the values of another GraphProperties object. The copying is a deep copy.- Parameters:
graphProps- The properties to copy.
-
setGraphBackgroundExistence
public final void setGraphBackgroundExistence(boolean existence) Sets whether the background of this graph exists. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would totally paint over the previous graph.- Parameters:
existence- If true, the background of this graph will exist.
-
setGraphBackgroundColor
Sets the color of the background of this graph. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would totally paint over the previous graph.- Parameters:
color- The color of the background of this graph.
-
setGraphBorderExistence
public final void setGraphBorderExistence(boolean existence) Sets whether the graph's left and bottom border exists.- Parameters:
existence- If true, then the graph's left and bottom border exists.
-
setGraphBorderThicknessModel
public final void setGraphBorderThicknessModel(int thickness) Sets the thickness of the graph's left and bottom border for the chart's model size.- Parameters:
thickness- The model thickness of the graph's left and bottom border.
-
setGraphBorderLeftBottomColor
Sets the color of the graph's left and bottom border.- Parameters:
color- The color of the graph's left and bottom border.
-
setGraphBorderRightTopColor
Sets the color of the graph's right and top border.- Parameters:
color- The color of the graph's right and top border.
-
setGraphAllowComponentAlignment
public final void setGraphAllowComponentAlignment(boolean alignment) Sets whether the graph's components (ie bars, dots, or lines) are allowed to overlap/align or are offset for each set and within each category. For non-stacked bars charts, don't align; for all other chart types alignment is generally preferrable.- Parameters:
alignment- If true, the components will not be offset within the category.
-
setGraphOutlineComponentsExistence
public final void setGraphOutlineComponentsExistence(boolean existence) Sets whether there exists a thin outline around each component (ie bars, lines, or dots).- Parameters:
existence- If true, the components will have an outline.
-
setGraphOutlineComponentsColor
Sets the color of the thin outline around components (ie bars, lines, or dots).- Parameters:
color- The color of each component's outline.
-
setGraphBetweenComponentsGapExistence
public final void setGraphBetweenComponentsGapExistence(boolean existence) Sets whether a gap between each category of components exists (ie not the gap between each each component with each category).- Parameters:
existence- If true, then the gap between components exists.
-
setGraphBetweenComponentsGapThicknessModel
public final void setGraphBetweenComponentsGapThicknessModel(int thickness) Sets the thickness of the gap between each category of components for the chart's model size.- Parameters:
thickness- The model thickness of teh gap between components.
-
setGraphBarsExistence
public final void setGraphBarsExistence(boolean existence) Sets whether the graph contains bar components.- Parameters:
existence- If true, then the graph contains bars.
-
setGraphBarsThicknessModel
public final void setGraphBarsThicknessModel(int thickness) Sets the thickness of the bar components for the chart's model size.- Parameters:
thickness- The model thickness of the bars.
-
setGraphBarsExcessSpaceFeedbackRatio
public final void setGraphBarsExcessSpaceFeedbackRatio(float ratio) Sets the amount of the excess space to feed back to bars thickness. Frequently the graphs are larger than necessary, the excess space can be fedback to the bars, making them larger. The ratio is the amount of space to feed back to the bars, to the total amount of space.- Parameters:
ratio- The ratio on the total amount of space to feedback.
-
setGraphBarsWithinCategoryOverlapRatio
public final void setGraphBarsWithinCategoryOverlapRatio(float ratio) Sets how much the bars can overlap eachother when there are multiple data values per data set and per data category.- Parameters:
ratio- The ratio on the thickness of the bar for overlap.
-
setGraphLinesExistence
public final void setGraphLinesExistence(boolean existence) Sets whether the graph contains line components.- Parameters:
existence- If true, then the graph contains lines.
-
setGraphLinesThicknessModel
public final void setGraphLinesThicknessModel(int thickness) Sets the thickness of the line components for the chart's model size.- Parameters:
thickness- The model thickness of the lines.
-
setGraphLinesFillInterior
public final void setGraphLinesFillInterior(boolean fill) Sets whether the graph lines will made to form a shap (ie like a mountain range).- Parameters:
fill- If true, then the lines will be filled.
-
setGraphLinesExcessSpaceFeedbackRatio
public final void setGraphLinesExcessSpaceFeedbackRatio(float ratio) Sets the amount of the excess space to feed back to lines thickness. Frequently the graphs are larger than necessary, the excess space can be fedback to the lines, making them larger. The ratio is the amount of space to feed back to the lines, to the total amount of space.- Parameters:
ratio- The ratio on the total amount of space to feedback.
-
setGraphLinesWithinCategoryOverlapRatio
public final void setGraphLinesWithinCategoryOverlapRatio(float ratio) Sets how much the lines can overlap eachother when there are multiple data values per data set and per data category.- Parameters:
ratio- The ratio on the thickness of the line for overlap.
-
setGraphDotsExistence
public final void setGraphDotsExistence(boolean existence) Sets whether the graph contains dot components.- Parameters:
existence- If true, then the graph contains dots.
-
setGraphDotsThicknessModel
public final void setGraphDotsThicknessModel(int thickness) Sets the thickness of the dot components for the chart's model size.- Parameters:
thickness- The model thickness of the dots.
-
setGraphDotsExcessSpaceFeedbackRatio
public final void setGraphDotsExcessSpaceFeedbackRatio(float ratio) Sets the amount of the excess space to feed back to dots thickness. Frequently the graphs are larger than necessary, the excess space can be fedback to the dots, making them larger. The ratio is the amount of space to feed back to the dots, to the total amount of space.- Parameters:
ratio- The ratio on the total amount of space to feedback.
-
setGraphDotsWithinCategoryOverlapRatio
public final void setGraphDotsWithinCategoryOverlapRatio(float ratio) Sets how much the dots can overlap eachother when there are multiple data values per data set and per data category.- Parameters:
ratio- The ratio on the thickness of the dot for overlap.
-
setGraphNumbersLinesExistence
public final void setGraphNumbersLinesExistence(boolean existence) Sets whether the horizontal lines of this graph exist. These lines are aligned with the axis' ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Parameters:
existence- If true, the horizontal lines exist.
-
setGraphNumbersLinesThicknessModel
public final void setGraphNumbersLinesThicknessModel(int thickness) Sets the thickness of the horizontal lines of this graph for the chart's model size. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Parameters:
thickness- The model thickness of the horizontal lines.
-
setGraphNumbersLinesStyle
public final void setGraphNumbersLinesStyle(float[] style) Sets the style of the horizontal lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components. Possible values for style are: CONTINUOUS, DASHED, and DOTTED.- Parameters:
style- The style of the horizontal lines.
-
setGraphNumbersLinesColor
Sets the color of the horizontal lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Parameters:
color- The color of the horizontal lines.
-
setGraphLabelsLinesExistence
public final void setGraphLabelsLinesExistence(boolean existence) Sets whether the vertical lines of this graph exist. These lines are aligned with the axis' ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Parameters:
existence- If true, the vertical lines exist.
-
setGraphLabelsLinesThicknessModel
public final void setGraphLabelsLinesThicknessModel(int thickness) Sets the thickness of the vertical lines of this graph for the chart's model size. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Parameters:
thickness- The model thickness of the vertical lines.
-
setGraphLabelsLinesStyle
public final void setGraphLabelsLinesStyle(float[] style) Sets the style of the vertical lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components. Possible values for style are: CONTINUOUS, DASHED, and DOTTED.- Parameters:
style- The style of the vertical lines.
-
setGraphLabelsLinesColor
Sets the color of the vertical lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Parameters:
color- The color of the vertical lines.
-
setGraphLinesThicknessAssociation
public final void setGraphLinesThicknessAssociation(boolean association) Sets whether the horizontal and vertical lines (if they both exist) should both be the same thickness at all times. Uses the smaller thickness if they are not already equal.- Parameters:
association- If true, then these lines will have equal thickness.
-
setGraphComponentsLightSource
public final void setGraphComponentsLightSource(int s) Sets the direction of the source of the light if any. Possible values are: TOP, BOTTOM, LEFT, RIGHT, TOPLEFT, BOTTOMRIGHT, and NONE.- Parameters:
s- The direction of the light source.
-
setGraphComponentsLightType
public final void setGraphComponentsLightType(int t) Sets the type of the lighting affect. Possible values are: COMPONENT and GRAPH. COMPONENT implies that the light source is positioned directly on the components (for example leaving a complete shading affect for each component). GRAPH implies that the light source is positioned directly on the graph (for example leaving the components on one side of the graph lighter than the others).- Parameters:
t- The lighting affect type.
-
setGraphBarsRoundingRatio
public final void setGraphBarsRoundingRatio(float r) Sets the degree of rounding for the bars. Uses the RoundRectangle in its implemenation. See the arcw and arch properties for guidance of RoundRectangle. The ratio is the diameter of the half-ellipse making the arc over the dimension in one direction of a bar. For the "Labels" ratio, the direction is the same direction in which the labels axis runs. Possible values are between zero and 1. Zero means less round, one means more round.- Parameters:
r- The rounding ratio.
-
setGraphComponentsOverflowClip
public final void setGraphComponentsOverflowClip(boolean c) Sets whether the graph's components will be clipped if they pass over the graph's inner space or border. The only time the graph's components should not be clipped is if the graph's inner space and border are set to not exist. Not clipping may cause components to be painted over other chart components such as the legend or axis.- Parameters:
c- If true, then the components will be clipped.
-
setGraphComponentsAlphaComposite
Sets the actual AlphaComposite object to use on the Graphics2D object context for painting the graph components managed by this GraphProperties object. By passing different AlphaComposite objects, the graph components can take on a blending or transparency effect. Underneath components can be seen through components painted over them. This is especially useful for "line area" or "filled line" charts because top lines can paint over underneath lines if not using a "stacked" dataset object.- Parameters:
a- The AlphaComposite object to use.
-
getGraphBackgroundExistence
public final boolean getGraphBackgroundExistence()Gets whether the background of this graph exists. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would totally paint over the previous graph.- Returns:
- boolean If true, the background of this graph will exist.
-
getGraphBackgroundColor
Gets the color of the background of this graph. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would totally paint over the previous graph.- Returns:
- Color The color of the background of this graph.
-
getGraphBorderExistence
public final boolean getGraphBorderExistence()Gets whether the graph's left and bottom border exists.- Returns:
- boolean If true, then the graph's left and bottom border exists.
-
getGraphBorderThicknessModel
public final int getGraphBorderThicknessModel()Gets the thickness of the graph's left and bottom border for the chart's model size.- Returns:
- int The model thickness of the graph's left and bottom border.
-
getGraphBorderLeftBottomColor
Gets the color of the graph's left and bottom border.- Returns:
- Color The color of the graph's left and bottom border.
-
getGraphBorderRightTopColor
Gets the color of the graph's right and top border.- Returns:
- Color The color of the graph's right and top border.
-
getGraphAllowComponentAlignment
public final boolean getGraphAllowComponentAlignment()Gets whether the graph's components (ie bars, dots, or lines) are allowed to overlap/align or are offset for each set and within each category. For non-stacked bars charts, don't align; for all other chart types alignment is generally preferrable.- Returns:
- boolean If true, the components will not be offset within the category.
-
getGraphOutlineComponentsExistence
public final boolean getGraphOutlineComponentsExistence()Gets whether there exists a thin outline around each component (ie bars, lines, or dots).- Returns:
- boolean If true, the components will have an outline.
-
getGraphOutlineComponentsColor
Gets the color of the thin outline around components (ie bars, lines, or dots).- Returns:
- Color The color of each component's outline.
-
getGraphBetweenComponentsGapExistence
public final boolean getGraphBetweenComponentsGapExistence()Gets whether a gap between each category of components exists (ie not the gap between each each component with each category).- Returns:
- boolean If true, then the gap between components exists.
-
getGraphBetweenComponentsGapThicknessModel
public final int getGraphBetweenComponentsGapThicknessModel()Gets the thickness of the gap between each category of components for the chart's model size.- Returns:
- int The model thickness of teh gap between components.
-
getGraphBarsExistence
public final boolean getGraphBarsExistence()Gets whether the graph contains bar components.- Returns:
- boolean If true, then the graph contains bars.
-
getGraphBarsThicknessModel
public final int getGraphBarsThicknessModel()Gets the thickness of the bar components for the chart's model size.- Returns:
- int The model thickness of the bars.
-
getGraphBarsExcessSpaceFeedbackRatio
public final float getGraphBarsExcessSpaceFeedbackRatio()Gets the amount of the excess space to feed back to bars thickness. Frequently the graphs are larger than necessary, the excess space can be fedback to the bars, making them larger. The ratio is the amount of space to feed back to the bars, to the total amount of space.- Returns:
- float The ratio on the total amount of space to feedback.
-
getGraphBarsWithinCategoryOverlapRatio
public final float getGraphBarsWithinCategoryOverlapRatio()Gets how much the bars can overlap eachother when there are multiple data values per data set and per data category.- Returns:
- ratio The ratio on the thickness of the bar for overlap.
-
getGraphLinesExistence
public final boolean getGraphLinesExistence()Gets whether the graph contains line components.- Returns:
- boolean If true, then the graph contains lines.
-
getGraphLinesThicknessModel
public final int getGraphLinesThicknessModel()Gets the thickness of the line components for the chart's model size.- Returns:
- int The model thickness of the lines.
-
getGraphLinesFillInterior
public final boolean getGraphLinesFillInterior()Gets whether the graph lines will made to form a shap (ie like a mountain range).- Returns:
- boolean If true, then the lines will be filled.
-
getGraphLinesExcessSpaceFeedbackRatio
public final float getGraphLinesExcessSpaceFeedbackRatio()Gets the amount of the excess space to feed back to lines thickness. Frequently the graphs are larger than necessary, the excess space can be fedback to the lines, making them larger. The ratio is the amount of space to feed back to the lines, to the total amount of space.- Returns:
- float The ratio on the total amount of space to feedback.
-
getGraphLinesWithinCategoryOverlapRatio
public final float getGraphLinesWithinCategoryOverlapRatio()Gets how much the lines can overlap eachother when there are multiple data values per data set and per data category.- Returns:
- ratio The ratio on the thickness of the line for overlap.
-
getGraphDotsExistence
public final boolean getGraphDotsExistence()Gets whether the graph contains dot components.- Returns:
- boolean If true, then the graph contains dots.
-
getGraphDotsThicknessModel
public final int getGraphDotsThicknessModel()Gets the thickness of the dot components for the chart's model size.- Returns:
- int The model thickness of the dots.
-
getGraphDotsExcessSpaceFeedbackRatio
public final float getGraphDotsExcessSpaceFeedbackRatio()Gets the amount of the excess space to feed back to dots thickness. Frequently the graphs are larger than necessary, the excess space can be fedback to the dots, making them larger. The ratio is the amount of space to feed back to the dots, to the total amount of space.- Returns:
- float The ratio on the total amount of space to feedback.
-
getGraphDotsWithinCategoryOverlapRatio
public final float getGraphDotsWithinCategoryOverlapRatio()Gets how much the dots can overlap eachother when there are multiple data values per data set and per data category.- Returns:
- ratio The ratio on the thickness of the dot for overlap.
-
getGraphNumbersLinesExistence
public final boolean getGraphNumbersLinesExistence()Gets whether the horizontal lines of this graph exist. These lines are aligned with the axis' ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Returns:
- boolean If true, the horizontal lines exist.
-
getGraphNumbersLinesThicknessModel
public final int getGraphNumbersLinesThicknessModel()Gets the thickness of the horizontal lines of this graph for the chart's model size. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Returns:
- int The model thickness of the horizontal lines.
-
getGraphNumbersLinesStyle
public final float[] getGraphNumbersLinesStyle()Gets the style of the horizontal lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components. Possible values for style are: CONTINUOUS, DASHED, and DOTTED.- Returns:
- float[] The style of the horizontal lines.
-
getGraphNumbersLinesColor
Gets the color of the horizontal lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Returns:
- Color The color of the horizontal lines.
-
getGraphLabelsLinesExistence
public final boolean getGraphLabelsLinesExistence()Gets whether the vertical lines of this graph exist. These lines are aligned with the axis' ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Returns:
- boolean If true, the vertical lines exist.
-
getGraphLabelsLinesThicknessModel
public final int getGraphLabelsLinesThicknessModel()Gets the thickness of the vertical lines of this graph for the chart's model size. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Returns:
- int The model thickness of the vertical lines.
-
getGraphLabelsLinesStyle
public final float[] getGraphLabelsLinesStyle()Gets the style of the vertical lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components. Possible values for style are: CONTINUOUS, DASHED, and DOTTED.- Returns:
- float[] The style of the vertical lines.
-
getGraphLabelsLinesColor
Gets the color of the vertical lines of this graph. These lines are aligned with the axis's ticks. For each chart this graph is added to, this property will only be respected if its the first graph added that the chart; otherwise, graphs added after any chart would paint over the previous graph's components.- Returns:
- Color The color of the vertical lines.
-
getGraphLinesThicknessAssociation
public final boolean getGraphLinesThicknessAssociation()Gets whether the horizontal and vertical lines (if they both exist) should both be the same thickness at all times. Uses the smaller thickness if they are not already equal.- Returns:
- boolean If true, then these lines will have equal thickness.
-
getGraphComponentsLightSource
public final int getGraphComponentsLightSource()Gets the direction of the source of the light if any. Possible values are: TOP, BOTTOM, LEFT, RIGHT, and NONE.- Returns:
- The direction of the light source.
-
getGraphComponentsLightType
public final int getGraphComponentsLightType()Gets the type of the lighting affect. Possible values are: COMPONENT and GRAPH. COMPONENT implies that the light source is positioned directly on the components (for example leaving a complete shading affect for each component). GRAPH implies that the light source is positioned directly on the graph (for example leaving the components on one side of the graph lighter than the others).- Returns:
- The lighting affect type.
-
getGraphBarsRoundingRatio
public final float getGraphBarsRoundingRatio()Gets the degree of rounding for the bars. Uses the RoundRectangle in its implemenation. See the arcw and arch properties for guidance of RoundRectangle. The ratio is the diameter of the half-ellipse making the arc over the dimension in one direction of a bar. For the "Labels" ratio, the direction is the same direction in which the labels axis runs. Possible values are between zero and 1. Zero means less round, one means more round.- Returns:
- The rounding ratio.
-
getGraphComponentsOverflowClip
public final boolean getGraphComponentsOverflowClip()Gets whether the graph's components will be clipped if they pass over the graph's inner space or border. The only time the graph's components should not be clipped is if the graph's inner space and border are set to not exist. Not clipping may cause components to be painted over other chart components such as the legend or axis.- Returns:
- If true, then the components will be clipped.
-
getGraphComponentsAlphaComposite
Gets the actual AlphaComposite object to use on the Graphics2D object context for painting the graph components managed by this GraphProperties object. By passing different AlphaComposite objects, the graph components can take on a blending or transparency effect. Underneath components can be seen through components painted over them. This is especially useful for "line area" or "filled line" charts because top lines can paint over underneath lines if not using a "stacked" dataset object.- Returns:
- The AlphaComposite object to use.
-