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 Details

  • Constructor Details

    • ChartRenderControls

      public ChartRenderControls()
    • ChartRenderControls

      public ChartRenderControls(RmaDataId id)
    • ChartRenderControls

      public ChartRenderControls(RmaDataId id, T itemControls)
  • Method Details

    • copy

      public void copy(ChartRenderControls<T> copy)
    • addListener

      public void addListener(PropertyChangeListener prop)
      Parameters:
      prop - the property change listener used to receive fired updates
    • setItemControls

      public void setItemControls(T itemControls)
      Parameters:
      itemControls - the item controls to apply to all items in this chart
    • getId

      public RmaDataId 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

      public LegendSide getLegendSide()
      Returns:
      the side of the chart that the legend is currently on
    • setLegendSide

      public void setLegendSide(LegendSide legendSide)
      Parameters:
      legendSide - the side of the chart to put the legend on
    • getTitleFont

      public Font getTitleFont()
      Returns:
      the font specs for the title
    • setTitleFont

      public void setTitleFont(Font titleFont)
      Parameters:
      titleFont - the font specs for the title
    • getTitleFormat

      public String getTitleFormat()
      Returns:
      the format string for the title display
    • setTitleFormat

      public void setTitleFormat(String titleFormat)
      Parameters:
      titleFormat - the format string for the title display
    • getTitleColor

      public Color getTitleColor()
      Returns:
      the color of the title font
    • setTitleColor

      public void setTitleColor(Color titleColor)
      Parameters:
      titleColor - the color of the title font
    • getSubtitleFont

      public Font getSubtitleFont()
      Returns:
      the font specs for the subtitle
    • setSubtitleFont

      public void setSubtitleFont(Font subtitleFont)
      Parameters:
      subtitleFont - the font specs for the subtitle
    • getSubtitleFormat

      public String getSubtitleFormat()
      Returns:
      the format string for the subtitle display
    • setSubtitleFormat

      public void setSubtitleFormat(String subtitleFormat)
      Parameters:
      subtitleFormat - the format string for the subtitle display
    • getSubtitleColor

      public Color getSubtitleColor()
      Returns:
      the color of the subtitle font
    • setSubtitleColor

      public void setSubtitleColor(Color subtitleColor)
      Parameters:
      subtitleColor - the color of the subtitle font
    • getFooterFont

      public Font getFooterFont()
      Returns:
      the font specs for the footer
    • setFooterFont

      public void setFooterFont(Font subtitleFont)
      Parameters:
      subtitleFont - the font specs for the footer
    • getFooterFormat

      public String getFooterFormat()
      Returns:
      the format string for the footer display
    • setFooterFormat

      public void setFooterFormat(String subtitleFormat)
      Parameters:
      subtitleFormat - the format string for the footer display
    • getFooterColor

      public Color getFooterColor()
      Returns:
      the color of the footer font
    • setFooterColor

      public void setFooterColor(Color subtitleColor)
      Parameters:
      subtitleColor - the color of the footer 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

      public List<Threshold> getThresholds()
      Returns:
      the threshold list for this chart
    • setThresholds

      public void setThresholds(List<Threshold> thresholds)
      Parameters:
      thresholds - the new list of thresholds to be applied to the entire chart
    • getRoundingStyle

      public RoundingTool.RoundingType getRoundingStyle()
      Returns:
      the current rounding style
    • setRoundingStyle

      public void setRoundingStyle(RoundingTool.RoundingType roundingStyle)
      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

      public T getItemControls()
      Returns:
      the item render controls
    • toXml

      public abstract String toXml()
      Returns:
      an XML format string for storing render control information
    • fromXml

      public abstract ChartRenderControls<T> fromXml(String buildStr)
      reconstructs this object from its xml string format
      Parameters:
      buildStr - the XML format string to reconstruct these render controls from
    • fireUpdate

      public void fireUpdate(String propertyName, Object oldVal, Object newVal)
      Description copied from interface: PropertyFireable
      triggers to fire the given update
      Specified by:
      fireUpdate in interface PropertyFireable
      Parameters:
      propertyName - the name of the property
      oldVal - the value of the object before the change
      newVal - 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 interface PropertyFireable
    • isFooterVisible

      public boolean isFooterVisible()
    • setFooterVisible

      public void setFooterVisible(boolean _footerVisible)
    • isSubtitleVisible

      public boolean isSubtitleVisible()
    • setSubtitleVisible

      public void setSubtitleVisible(boolean _subtitleVisible)
    • isTitleVisible

      public boolean isTitleVisible()
    • setTitleVisible

      public void setTitleVisible(boolean _titleVisible)