Package hec.gfx2d.swing.charts.data
Class ChartRenderControls<T extends ChartItemRenderControls>
java.lang.Object
hec.gfx2d.swing.charts.data.ChartRenderControls<T>
- Type Parameters:
T
- the item controls to connect to this chart
- All Implemented Interfaces:
PropertyFireable
- Direct Known Subclasses:
PieChartRenderControls
public abstract class ChartRenderControls<T extends ChartItemRenderControls>
extends Object
implements PropertyFireable
Copyright (C) 2017 Hydrologic Engineering Center,
United States Army Corps of Engineers, All Rights Reserved
HEC-Java NEXGEN
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
copy
(ChartRenderControls<T> copy) void
triggers the parent controls to fire the default updatevoid
fireUpdate
(String propertyName, Object oldVal, Object newVal) triggers to fire the given updateabstract ChartRenderControls<T>
reconstructs this object from its xml string formatgetId()
int
int
int
int
boolean
boolean
boolean
boolean
boolean
boolean
void
setFooterColor
(Color subtitleColor) void
setFooterFont
(Font subtitleFont) void
setFooterFormat
(String subtitleFormat) void
setFooterVisible
(boolean _footerVisible) void
setItemControls
(T itemControls) void
setLegendSide
(LegendSide legendSide) void
setRoundingDecimals
(int roundingDecimals) void
setRoundingDigits
(int roundingDigits) void
setRoundingPrecision
(int precision) void
setRoundingSigFigs
(int roundingSigFigs) void
setRoundingStyle
(RoundingTool.RoundingType roundingStyle) void
setShowLegend
(boolean showLegend) void
setShowThresholds
(boolean showThresholds) void
setShowThresholdText
(boolean showThresholds) void
setSubtitleColor
(Color subtitleColor) void
setSubtitleFont
(Font subtitleFont) void
setSubtitleFormat
(String subtitleFormat) void
setSubtitleVisible
(boolean _subtitleVisible) void
setThresholds
(List<Threshold> thresholds) void
setTitleColor
(Color titleColor) void
setTitleFont
(Font titleFont) void
setTitleFormat
(String titleFormat) void
setTitleVisible
(boolean _titleVisible) abstract String
toXml()
-
Field Details
-
PROPERTY_SHOW_LEGEND
- See Also:
-
PROPERTY_LEGEND_SIDE
- See Also:
-
PROPERTY_TITLE_FONT
- See Also:
-
PROPERTY_TITLE_FORMAT
- See Also:
-
PROPERTY_TITLE_COLOR
- See Also:
-
PROPERTY_SHOW_THRESHOLDS
- See Also:
-
PROPERTY_SHOW_THRESHOLD_VALUES
- See Also:
-
PROPERTY_ROUNDING_STYLE
- See Also:
-
PROPERTY_ROUNDING_PRECISION
- See Also:
-
PROPERTY_ITEM_CONTROLS
- See Also:
-
PROPERTY_UPDATE
- See Also:
-
_itemControls
-
-
Constructor Details
-
ChartRenderControls
public ChartRenderControls() -
ChartRenderControls
-
ChartRenderControls
-
-
Method Details
-
copy
-
addListener
- Parameters:
prop
- the property change listener used to receive fired updates
-
setItemControls
- Parameters:
itemControls
- the item controls to apply to all items in this chart
-
getId
- Returns:
- the id of this controls item
-
isShowLegend
public boolean isShowLegend()- Returns:
- the current visibility state for the legend
-
setShowLegend
public void setShowLegend(boolean showLegend) - Parameters:
showLegend
- the new visibility state for the legend
-
getLegendSide
- Returns:
- the side of the chart that the legend is currently on
-
setLegendSide
- Parameters:
legendSide
- the side of the chart to put the legend on
-
getTitleFont
- Returns:
- the font specs for the title
-
setTitleFont
- Parameters:
titleFont
- the font specs for the title
-
getTitleFormat
- Returns:
- the format string for the title display
-
setTitleFormat
- Parameters:
titleFormat
- the format string for the title display
-
getTitleColor
- Returns:
- the color of the title font
-
setTitleColor
- Parameters:
titleColor
- the color of the title font
-
getSubtitleFont
- Returns:
- the font specs for the subtitle
-
setSubtitleFont
- Parameters:
subtitleFont
- the font specs for the subtitle
-
getSubtitleFormat
- Returns:
- the format string for the subtitle display
-
setSubtitleFormat
- Parameters:
subtitleFormat
- the format string for the subtitle display
-
getSubtitleColor
- Returns:
- the color of the subtitle font
-
setSubtitleColor
- Parameters:
subtitleColor
- the color of the subtitle font
-
isShowThresholds
public boolean isShowThresholds()- Returns:
- the current visibility state of the thresholds on the chart
-
setShowThresholds
public void setShowThresholds(boolean showThresholds) - Parameters:
showThresholds
- the new visibility state of the thresholds
-
isShowThresholdText
public boolean isShowThresholdText()- Returns:
- the current visibility state of the thresholds text on the chart
-
setShowThresholdText
public void setShowThresholdText(boolean showThresholds) - Parameters:
showThresholds
- the new visibility state of the thresholds
-
getThresholds
- Returns:
- the threshold list for this chart
-
setThresholds
- Parameters:
thresholds
- the new list of thresholds to be applied to the entire chart
-
getRoundingStyle
- Returns:
- the current rounding style
-
setRoundingStyle
- Parameters:
roundingStyle
- the rounding style to set
-
getRoundingPrecision
public int getRoundingPrecision()- Returns:
- the rounding precision of the current rounding style
-
setRoundingPrecision
public void setRoundingPrecision(int precision) - Parameters:
precision
- the new precision to set, automatically applied to the correct style
-
getRoundingDigits
public int getRoundingDigits()- Returns:
- the rounding precision of the DIGITS style
-
setRoundingDigits
public void setRoundingDigits(int roundingDigits) - Parameters:
roundingDigits
- the new rounding precision of the DIGITS style
-
getRoundingDecimals
public int getRoundingDecimals()- Returns:
- the rounding precision of the DECIMALS style
-
setRoundingDecimals
public void setRoundingDecimals(int roundingDecimals) - Parameters:
roundingDecimals
- the rounding precision of the DECIMALS style
-
getRoundingSigFigs
public int getRoundingSigFigs()- Returns:
- the rounding precision of the SIG_FIGS style
-
setRoundingSigFigs
public void setRoundingSigFigs(int roundingSigFigs) - Parameters:
roundingSigFigs
- the rounding precision of the SIG_FIGS style
-
getItemControls
- Returns:
- the item render controls
-
toXml
- Returns:
- an XML format string for storing render control information
-
fromXml
reconstructs this object from its xml string format- Parameters:
buildStr
- the XML format string to reconstruct these render controls from
-
fireUpdate
Description copied from interface:PropertyFireable
triggers to fire the given update- Specified by:
fireUpdate
in interfacePropertyFireable
- Parameters:
propertyName
- the name of the propertyoldVal
- the value of the object before the changenewVal
- the value of the object after the change
-
fireUpdate
public void fireUpdate()Description copied from interface:PropertyFireable
triggers the parent controls to fire the default update- Specified by:
fireUpdate
in interfacePropertyFireable
-
isSubtitleVisible
public boolean isSubtitleVisible() -
setSubtitleVisible
public void setSubtitleVisible(boolean _subtitleVisible) -
isTitleVisible
public boolean isTitleVisible() -
setTitleVisible
public void setTitleVisible(boolean _titleVisible)
-