Package hec.gfx2d

Class G2dLineProperties

java.lang.Object
hec.gfx2d.PlotProperties
hec.gfx2d.G2dLineProperties
All Implemented Interfaces:
LineLabelProperties, LineProperties, AsciiSerializable, FieldAccessor, Serializable, Cloneable

public class G2dLineProperties extends PlotProperties implements AsciiSerializable, Serializable, Cloneable, LineLabelProperties, LineProperties
See Also:
  • Field Details

    • USE_DEFAULT_LINE_STYLES

      public static final String USE_DEFAULT_LINE_STYLES
      See Also:
    • FILL_NONE

      public static final int FILL_NONE
      See Also:
    • FILL_ABOVE

      public static final int FILL_ABOVE
      See Also:
    • FILL_BELOW

      public static final int FILL_BELOW
      See Also:
    • FILL_STYLE_NAMES

      public static final String[] FILL_STYLE_NAMES
    • LINE_STYLE_NAMES

      public static final String[] LINE_STYLE_NAMES
    • SOLID_STYLE_PATTERN

      public static final float[] SOLID_STYLE_PATTERN
    • DASH_STYLE_PATTERN

      public static final float[] DASH_STYLE_PATTERN
    • DOT_STYLE_PATTERN

      public static final float[] DOT_STYLE_PATTERN
    • DASHDOT_STYLE_PATTERN

      public static final float[] DASHDOT_STYLE_PATTERN
    • DASHDOTDOT_STYLE_PATTERN

      public static final float[] DASHDOTDOT_STYLE_PATTERN
    • END_STYLE_NONE

      public static final int END_STYLE_NONE
      See Also:
    • END_SYTLE_ROUND

      public static final int END_SYTLE_ROUND
      See Also:
    • END_SYTLE_RECTANGLE

      public static final int END_SYTLE_RECTANGLE
      See Also:
    • END_STYLE_ARROW

      public static final int END_STYLE_ARROW
      See Also:
    • END_STYLE_TEE

      public static final int END_STYLE_TEE
      See Also:
    • END_STYLE_NAMES

      public static final String[] END_STYLE_NAMES
    • NORMAL_LINE

      public static final int NORMAL_LINE
      See Also:
    • STEP_LINE

      public static final int STEP_LINE
      See Also:
    • CUBIC_LINE

      public static final int CUBIC_LINE
      See Also:
    • END_OF_PERIOD

      public static final int END_OF_PERIOD
      See Also:
    • BEGINNING_OF_PERIOD

      public static final int BEGINNING_OF_PERIOD
      See Also:
    • LABEL_ALIGN_LEFT

      public static final int LABEL_ALIGN_LEFT
      See Also:
    • LABEL_ALIGN_RIGHT

      public static final int LABEL_ALIGN_RIGHT
      See Also:
    • LABEL_ALIGN_CENTER

      public static final int LABEL_ALIGN_CENTER
      See Also:
    • LABEL_ALIGN_RELATIVE

      public static final int LABEL_ALIGN_RELATIVE
      See Also:
    • LABEL_ALIGN_NAMES

      public static String[] LABEL_ALIGN_NAMES
    • LABEL_POS_ABOVE

      public static final int LABEL_POS_ABOVE
      See Also:
    • LABEL_POS_BELOW

      public static final int LABEL_POS_BELOW
      See Also:
    • LABEL_POS_CENTER

      public static final int LABEL_POS_CENTER
      See Also:
    • LABEL_POS_NAMES

      public static String[] LABEL_POS_NAMES
    • _interpolateMissing

      public boolean _interpolateMissing
    • _periodStepStyle

      public int _periodStepStyle
      from the beginning or the end of the "period".
    • _lineStepStyle

      public int _lineStepStyle
    • _lineColor

      public Color _lineColor
    • _fillColor

      public Color _fillColor
    • _pointFillColor

      public Color _pointFillColor
    • _pointLineColor

      public Color _pointLineColor
    • _pointThickness

      public int _pointThickness
    • _selectedPointFillColor

      public Color _selectedPointFillColor
    • _selectedPointLineColor

      public Color _selectedPointLineColor
    • _selectedPointThickness

      public int _selectedPointThickness
    • _symbolType

      public int _symbolType
      these are Objects from hec.gfx2d.Symbol
    • _symbolSize

      public float _symbolSize
    • _drawPoints

      public boolean _drawPoints
    • _drawLine

      public boolean _drawLine
    • _fillType

      public int _fillType
    • _fillPattern

      public int _fillPattern
    • _fillTransparency

      public int _fillTransparency
    • _lineTransparency

      public int _lineTransparency
    • _fillPaint

      public Paint _fillPaint
    • _endStyle

      public int _endStyle
    • _lineWidth

      public float _lineWidth
    • _lineStylePattern

      public float[] _lineStylePattern
    • _drawOnDataPts

      public boolean _drawOnDataPts
    • _numPtsSkip

      public int _numPtsSkip
    • _ptOffset

      public int _ptOffset
    • _label

      public String _label
    • _name

      public String _name
    • _labelFont

      public Font _labelFont
    • _labelColor

      public Color _labelColor
    • _autoSkipPoints

      public boolean _autoSkipPoints
    • _enableQualityDataPts

      public boolean _enableQualityDataPts
    • _drawQualityData

      public boolean _drawQualityData
    • _drawMissingData

      public boolean _drawMissingData
    • _placeholderSymbolType

      public int _placeholderSymbolType
    • _placeholderSymbolSize

      public float _placeholderSymbolSize
    • _placeholderPointFillColor

      public Color _placeholderPointFillColor
    • _placeholderPointLineColor

      public Color _placeholderPointLineColor
    • _questionableSymbolType

      public int _questionableSymbolType
    • _questionableSymbolSize

      public float _questionableSymbolSize
    • _questionablePointFillColor

      public Color _questionablePointFillColor
    • _questionablePointLineColor

      public Color _questionablePointLineColor
    • _rejectedSymbolType

      public int _rejectedSymbolType
    • _rejectedSymbolSize

      public float _rejectedSymbolSize
    • _rejectedPointFillColor

      public Color _rejectedPointFillColor
    • _rejectedPointLineColor

      public Color _rejectedPointLineColor
    • _missingSymbolType

      public int _missingSymbolType
    • _missingSymbolSize

      public float _missingSymbolSize
    • _missingPointFillColor

      public Color _missingPointFillColor
    • _missingPointLineColor

      public Color _missingPointLineColor
    • _okSymbolType

      public int _okSymbolType
    • _okSymbolSize

      public float _okSymbolSize
    • _okPointFillColor

      public Color _okPointFillColor
    • _okPointLineColor

      public Color _okPointLineColor
    • LINE_BEGIN

      public static final String LINE_BEGIN
      See Also:
    • LINE_END

      public static final String LINE_END
      See Also:
  • Constructor Details

    • G2dLineProperties

      public G2dLineProperties()
    • G2dLineProperties

      public G2dLineProperties(G2dLineProperties copyFrom)
  • Method Details

    • init

      public static void init()
    • copyCurveProperties

      public void copyCurveProperties(G2dLineProperties properties)
      Copies only the specific properties that draw the line style such as fill above,below, points, point size etc. It ignores quality data symbols, and label properties.
      Parameters:
      properties -
    • setModified

      public void setModified(boolean modified)
      Sets this properties object modfied. If the flag is set true then the object is different then when it was constructed or read from a file. If false then this object has not changed.
      Specified by:
      setModified in interface LineLabelProperties
      Parameters:
      modified - true to mark as changed otherwise false.
    • isModified

      public boolean isModified()
      Returns the flag that marks this object as modified.
      Returns:
      true if modified otherwise false
    • setUseDefaultLineStyles

      public void setUseDefaultLineStyles(boolean defaultLineStyles)
    • useDefaultLineStyles

      public boolean useDefaultLineStyles()
    • clone

      public G2dLineProperties clone()
      Overrides:
      clone in class Object
    • drawPoints

      public boolean drawPoints()
      Specified by:
      drawPoints in interface LineProperties
      Returns:
    • drawLine

      public boolean drawLine()
      Specified by:
      drawLine in interface LineProperties
      Returns:
    • hasLabel

      public boolean hasLabel()
      Specified by:
      hasLabel in interface LineLabelProperties
    • setDrawLine

      public void setDrawLine(boolean d)
    • setDrawPoints

      public void setDrawPoints(boolean d)
    • setHasLabel

      public void setHasLabel(boolean d)
      Specified by:
      setHasLabel in interface LineLabelProperties
    • setFillType

      public void setFillType(int f)
    • setFillColor

      public void setFillColor(Color c)
    • getInterpolateMissing

      public boolean getInterpolateMissing()
    • getLineWidth

      public float getLineWidth()
      Specified by:
      getLineWidth in interface LineProperties
      Returns:
    • getLinePattern

      public float[] getLinePattern()
      Specified by:
      getLinePattern in interface LineProperties
      Returns:
    • getLineColor

      public Color getLineColor()
      Specified by:
      getLineColor in interface LineProperties
      Returns:
    • getLineStepStyle

      public int getLineStepStyle()
    • getPeriodStepStyle

      public int getPeriodStepStyle()
    • getFillColor

      public Color getFillColor()
      Specified by:
      getFillColor in interface LineProperties
      Returns:
    • getPointFillColor

      public Color getPointFillColor()
      Specified by:
      getPointFillColor in interface LineProperties
      Returns:
    • getPointLineColor

      public Color getPointLineColor()
      Specified by:
      getPointLineColor in interface LineProperties
      Returns:
    • getSymbolThickness

      public int getSymbolThickness()
    • getSelectedPointFillColor

      public Color getSelectedPointFillColor()
    • getSelectedPointLineColor

      public Color getSelectedPointLineColor()
    • getSelectedSymbolThickness

      public int getSelectedSymbolThickness()
    • getSymbolType

      public int getSymbolType()
      Specified by:
      getSymbolType in interface LineProperties
      Returns:
    • getSymbolSize

      public float getSymbolSize()
      Specified by:
      getSymbolSize in interface LineProperties
      Returns:
    • getFillType

      public int getFillType()
      Specified by:
      getFillType in interface LineProperties
      Returns:
    • getSkipPoints

      public int getSkipPoints()
    • getOffsetPoint

      public int getOffsetPoint()
    • getDrawOnPoints

      public boolean getDrawOnPoints()
    • getLabelAlignment

      public int getLabelAlignment()
      Specified by:
      getLabelAlignment in interface LineLabelProperties
    • getLabelPosition

      public int getLabelPosition()
      Specified by:
      getLabelPosition in interface LineLabelProperties
    • getFillPaint

      public Paint getFillPaint()
    • getFillPattern

      public int getFillPattern()
      Specified by:
      getFillPattern in interface LineProperties
      Returns:
    • getFillTransparency

      public int getFillTransparency()
      Returns the transparency factor for the line fill. Return values are 100 for completely transparent 0 for opaque.
      Returns:
    • getLineTransparency

      public int getLineTransparency()
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface LineLabelProperties
    • getLabelFont

      public Font getLabelFont()
    • getLabelColor

      public Color getLabelColor()
    • getName

      public String getName()
    • getAutoSkipPoints

      public boolean getAutoSkipPoints()
    • setInterpolateMissing

      public void setInterpolateMissing(boolean b)
    • setLineWidth

      public void setLineWidth(float f)
    • setLinePattern

      public void setLinePattern(float[] f)
    • setLineColor

      public void setLineColor(Color c)
    • setPointLineColor

      public void setPointLineColor(Color c)
    • setLineStepStyle

      public void setLineStepStyle(int s)
    • setPeriodStepStyle

      public void setPeriodStepStyle(int s)
    • setSymbolType

      public void setSymbolType(int t)
    • setSymbolSize

      public void setSymbolSize(float f)
    • setSymbolFillColor

      public void setSymbolFillColor(Color c)
    • setSymbolLineColor

      public void setSymbolLineColor(Color c)
    • setSymbolThickness

      public void setSymbolThickness(int i)
    • setSelectedSymbolFillColor

      public void setSelectedSymbolFillColor(Color c)
    • setSelectedSymbolLineColor

      public void setSelectedSymbolLineColor(Color c)
    • setSelectedSymbolThickness

      public void setSelectedSymbolThickness(int i)
    • setSkipPoints

      public void setSkipPoints(int i)
    • setOffsetPoint

      public void setOffsetPoint(int i)
    • setDrawOnPoints

      public void setDrawOnPoints(boolean b)
    • setLabelAlignment

      public void setLabelAlignment(int i)
      Specified by:
      setLabelAlignment in interface LineLabelProperties
    • setLabelPosition

      public void setLabelPosition(int i)
      Specified by:
      setLabelPosition in interface LineLabelProperties
    • setFillPaint

      public void setFillPaint(Paint p)
    • setFillPattern

      public void setFillPattern(int i)
    • setFillTransparency

      public void setFillTransparency(int i)
    • setLineTransparency

      public void setLineTransparency(int i)
    • setLabel

      public void setLabel(String lbl)
      Specified by:
      setLabel in interface LineLabelProperties
    • setLabelFont

      public void setLabelFont(Font f)
    • setLabelColor

      public void setLabelColor(Color c)
    • setName

      public void setName(String name)
    • setAutoSkipPoints

      public void setAutoSkipPoints(boolean as)
    • lookupStyleName

      public static String lookupStyleName(float[] lnStyle)
    • lookupStyle

      public static float[] lookupStyle(String name)
    • lookupFillName

      public static String lookupFillName(int fill)
    • lookupFill

      public static int lookupFill(String name)
    • writeProperties

      public void writeProperties(BufferedWriter writer, String endTag)
      Specified by:
      writeProperties in interface LineProperties
    • readProperties

      public void readProperties(BufferedReader in, String endTag)
    • toString

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful
    • setDefaults

      public static void setDefaults(G2dLineProperties defaultProps)
      Parameters:
      defaultProps -
    • getFileName

      public static String getFileName()
    • writeDefaults

      public static boolean writeDefaults()
    • writeDefaults

      public static boolean writeDefaults(BufferedWriter writer)
    • writeDefaults

      protected static boolean writeDefaults(String cls, BufferedWriter writer)
    • loadDefaults

      public static boolean loadDefaults(BufferedReader in)