Class Threshold

java.lang.Object
hec.gfx2d.swing.charts.thresholds.Threshold
All Implemented Interfaces:
PropertyFireable, Serializable

public class Threshold extends Object implements Serializable, PropertyFireable
Copyright (C) 2017 Hydrologic Engineering Center, United States Army Corps of Engineers, All Rights Reserved

HEC-Java NEXGEN

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • 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
    • getLabelFont

      public Font getLabelFont()
      Returns:
      the font style to use in the label
    • setLabelFont

      public void setLabelFont(Font labelFont)
      Parameters:
      labelFont - the new font style for the label
    • getLabelFormat

      public String getLabelFormat()
      Returns:
      the format string, without replacement
    • getLabelFormat

      public String getLabelFormat(double maxValue, Roundable context)
      Parameters:
      maxValue - the maximum value of the context for this threshold
      context - the Roundable item to providing rounding context information
      Returns:
      the replaced format string with correct value replacement of format items
    • setLabelFormat

      public void setLabelFormat(String labelFormat)
      Parameters:
      labelFormat - the new formatting string for the label
    • getLabelColor

      public Color getLabelColor()
      Returns:
      the color of the label text
    • setLabelColor

      public void setLabelColor(Color labelColor)
      Parameters:
      labelColor - the new color for the label text
    • getLineProperties

      public ThresholdLineStyle getLineProperties()
      Returns:
      the line properties used to draw the threshold line
    • setLineProperties

      public void setLineProperties(ThresholdLineStyle lineProperties)
      Parameters:
      lineProperties - the new line properties to draw the threshold line with
    • isVisible

      public boolean isVisible()
      Returns:
      the visibility state of the item as a whole
    • setVisible

      public void setVisible(boolean visible)
      Parameters:
      visible - the new visibility state for the threshold
    • getValue

      public double getValue()
      Returns:
      the value of the threshold (whether portion or unit based)
    • setValue

      public void setValue(double value)
      Parameters:
      value - the new value for the threshold
    • getType

      public Threshold.ThresholdType getType()
      Returns:
      the threshold unit or portion type
    • setType

      public void setType(Threshold.ThresholdType type)
      Parameters:
      type - the new threshold unit / portion type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object