Class Threshold
java.lang.Object
hec.gfx2d.swing.charts.thresholds.Threshold
- All Implemented Interfaces:
PropertyFireable,Serializable
Copyright (C) 2017 Hydrologic Engineering Center,
United States Army Corps of Engineers, All Rights Reserved
HEC-Java NEXGEN
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidtriggers the parent controls to fire the default updatevoidfireUpdate(String propertyName, Object oldVal, Object newVal) triggers to fire the given updategetLabelFormat(double maxValue, Roundable context) getType()doublegetValue()inthashCode()booleanvoidsetLabelColor(Color labelColor) voidsetLabelFont(Font labelFont) voidsetLabelFormat(String labelFormat) voidsetLineProperties(ThresholdLineStyle lineProperties) voidvoidsetValue(double value) voidsetVisible(boolean visible) toString()
-
Field Details
-
PROPERTY_LABEL_FONT
- See Also:
-
PROPERTY_LABEL_FORMAT
- See Also:
-
PROPERTY_LABEL_COLOR
- See Also:
-
PROPERTY_LINE_STYLE
- See Also:
-
PROPERTY_VALUE
- See Also:
-
PROPERTY_VISIBLE
- See Also:
-
PROPERTY_TYPE
- See Also:
-
PROPERTY_UPDATE
- See Also:
-
-
Constructor Details
-
Threshold
public Threshold() -
Threshold
-
Threshold
-
-
Method Details
-
fireUpdate
Description copied from interface:PropertyFireabletriggers to fire the given update- Specified by:
fireUpdatein 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:PropertyFireabletriggers the parent controls to fire the default update- Specified by:
fireUpdatein interfacePropertyFireable
-
getLabelFont
- Returns:
- the font style to use in the label
-
setLabelFont
- Parameters:
labelFont- the new font style for the label
-
getLabelFormat
- Returns:
- the format string, without replacement
-
getLabelFormat
- Parameters:
maxValue- the maximum value of the context for this thresholdcontext- the Roundable item to providing rounding context information- Returns:
- the replaced format string with correct value replacement of format items
-
setLabelFormat
- Parameters:
labelFormat- the new formatting string for the label
-
getLabelColor
- Returns:
- the color of the label text
-
setLabelColor
- Parameters:
labelColor- the new color for the label text
-
getLineProperties
- Returns:
- the line properties used to draw the threshold line
-
setLineProperties
- 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
- Returns:
- the threshold unit or portion type
-
setType
- Parameters:
type- the new threshold unit / portion type
-
toString
-
equals
-
hashCode
public int hashCode()
-