gov.noaa.pmel.sgt
Class DefaultContourLineAttribute

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.LineAttribute
        |
        +--gov.noaa.pmel.sgt.DefaultContourLineAttribute
All Implemented Interfaces:
Attribute, java.lang.Cloneable, java.io.Serializable

public class DefaultContourLineAttribute
extends LineAttribute

Sets the default rendering style for contour line data. Color, width, and dash characteristics are DefaultContourLineAttribute properties. For individual contour lines, the characteristics can be overridden by ContourLineAttribute when used with ContourLevels.

Since:
2.0
Version:
$Revision: 1.8 $, $Date: 2001/12/13 19:07:04 $
Author:
Donald Denbo
See Also:
GridCartesianRenderer, ContourLevels, ContourLineAttribute, Serialized Form

Fields inherited from class gov.noaa.pmel.sgt.LineAttribute
CAP_BUTT, CAP_ROUND, CAP_SQUARE, DASHED, HEAVY, HIGHLIGHT, JOIN_BEVEL, JOIN_MITER, JOIN_ROUND, MARK, MARK_LINE, SOLID, STROKE
 
Constructor Summary
DefaultContourLineAttribute()
          Default constructor.
 
Method Summary
 java.lang.Object copy()
          Copy the LineAttribute.
 int getCapStyle()
          Get the contour line cap style.
 java.awt.Color getColor()
          Get the contour line color.
 ContourLineAttribute getContourLineAttribute()
          Get the associated ContourLineAttribute
 float[] getDashArray()
          Get dash array.
 float getDashPhase()
          Get the dash phase.
 java.awt.Color getLabelColor()
          Get the contour label color.
 java.awt.Font getLabelFont()
          Get the contour label font.
 java.lang.String getLabelFormat()
          Get the contour label format.
 double getLabelHeightP()
          Get the contour label height.
 java.lang.String getLabelText()
          Return label text from associated ContourLineAttribute, if none return empty string.
 float getMiterLimit()
          Get the contour line miter limit.
 int getMiterStyle()
          Get the contour line miter style.
 int getSignificantDigits()
          Get the number of significant digits for auto labelling.
 int getStyle()
          Get the contour line style.
 float getWidth()
          Get the contour line width.
 boolean isAutoLabel()
          Test if auto label is enabled.
 boolean isLabelEnabled()
          Test if the contour label is enabled.
 DefaultContourLineAttribute setContourLineAttribute(ContourLineAttribute attr)
          Set the ContourLineAttribute that will potentially override attributes.
 void setLabelColor(java.awt.Color color)
          Set the default contour label color
Property Change: labelColor.
 void setLabelEnabled(boolean sle)
          Enable/disable the contour label.
 void setLabelFont(java.awt.Font font)
          Set the default contour label font.
 void setLabelFormat(java.lang.String format)
          Set the default contour label format.
 void setLabelHeightP(double height)
          Set the default contour label height.
 void setLabelText(java.lang.String label)
          Set label text for associated ContourLineAttribute.
 void setSignificantDigits(int sig)
          Set the number of significant digits for auto labelling.
 void setStyle(int st)
          Override the default setStyle.
 java.lang.String toString()
          Get a String representation of the LineAttribute.
 
Methods inherited from class gov.noaa.pmel.sgt.LineAttribute
addPropertyChangeListener, getMark, getMarkHeightP, removePropertyChangeListener, setCapStyle, setColor, setDashArray, setDashPhase, setMark, setMarkHeightP, setMiterLimit, setMiterStyle, setWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultContourLineAttribute

public DefaultContourLineAttribute()
Default constructor. Defaults are:
   labelColor = Color.black
 labelHeightP = 0.16
    labelFont = null
  labelFormat = ""
    sigDigits = 2
 
Method Detail

setContourLineAttribute

public DefaultContourLineAttribute setContourLineAttribute(ContourLineAttribute attr)
Set the ContourLineAttribute that will potentially override attributes.

getContourLineAttribute

public ContourLineAttribute getContourLineAttribute()
Get the associated ContourLineAttribute

setLabelText

public void setLabelText(java.lang.String label)
Set label text for associated ContourLineAttribute.

getLabelText

public java.lang.String getLabelText()
Return label text from associated ContourLineAttribute, if none return empty string.

setLabelEnabled

public void setLabelEnabled(boolean sle)
Enable/disable the contour label.
Property Change: labelEnabled.

isLabelEnabled

public boolean isLabelEnabled()
Test if the contour label is enabled. Use associated ContourLineAttribute if it exists and has labelEnabledOverrideen set to false.

setLabelColor

public void setLabelColor(java.awt.Color color)
Set the default contour label color
Property Change: labelColor.

getLabelColor

public java.awt.Color getLabelColor()
Get the contour label color. Use associated ContourLineAttribute if it exists and has labelColorOverrideen set to false.

setLabelHeightP

public void setLabelHeightP(double height)
Set the default contour label height.
Property Change: labelHeightP.

getLabelHeightP

public double getLabelHeightP()
Get the contour label height. Use associated ContourLineAttribute if it exists and has labelHeightPOverrideen set to false.

setLabelFont

public void setLabelFont(java.awt.Font font)
Set the default contour label font.
Property Change: labelFont.

getLabelFont

public java.awt.Font getLabelFont()
Get the contour label font. Use associated ContourLineAttribute if it exists and has labelFontOverrideen set to false.

setSignificantDigits

public void setSignificantDigits(int sig)
Set the number of significant digits for auto labelling.
Property Change: significantDigits.

getSignificantDigits

public int getSignificantDigits()
Get the number of significant digits for auto labelling.

setLabelFormat

public void setLabelFormat(java.lang.String format)
Set the default contour label format.
Property Change: labelFormat.

getLabelFormat

public java.lang.String getLabelFormat()
Get the contour label format. Use associated ContourLineAttribute if it exists and has labelFormatOverrideen set to false.

isAutoLabel

public boolean isAutoLabel()
Test if auto label is enabled. Use associated ContourLineAttribute if it exists otherwise always returns true.

getDashArray

public float[] getDashArray()
Get dash array. Use associated ContourLineAttribute if it exists and has dashArrayOverrideen set to false.
Overrides:
getDashArray in class LineAttribute

getDashPhase

public float getDashPhase()
Get the dash phase. Use associated ContourLineAttribute if it exists and has dashPhaseOverrideen set to false.
Overrides:
getDashPhase in class LineAttribute

setStyle

public void setStyle(int st)
Override the default setStyle. Legal styles do not include MARK or MARK_LINE.
Overrides:
setStyle in class LineAttribute
Following copied from class: gov.noaa.pmel.sgt.LineAttribute
Parameters:
st - line style

getStyle

public int getStyle()
Get the contour line style. Use associated ContourLineAttribute if it exists and has styleOverrideen set to false.
Overrides:
getStyle in class LineAttribute
Following copied from class: gov.noaa.pmel.sgt.LineAttribute
Returns:
line style

getColor

public java.awt.Color getColor()
Get the contour line color. Use associated ContourLineAttribute if it exists and has colorOverrideen set to false.
Overrides:
getColor in class LineAttribute
Following copied from class: gov.noaa.pmel.sgt.LineAttribute
Returns:
line Color

getWidth

public float getWidth()
Get the contour line width. Use associated ContourLineAttribute if it exists and has widthOverrideen set to false.
Overrides:
getWidth in class LineAttribute
Following copied from class: gov.noaa.pmel.sgt.LineAttribute
Returns:
line width in physcial coordinates.

getCapStyle

public int getCapStyle()
Get the contour line cap style. Use associated ContourLineAttribute if it exists and has capStyleOverrideen set to false.
Overrides:
getCapStyle in class LineAttribute

getMiterStyle

public int getMiterStyle()
Get the contour line miter style. Use associated ContourLineAttribute if it exists and has miterStyleOverrideen set to false.
Overrides:
getMiterStyle in class LineAttribute

getMiterLimit

public float getMiterLimit()
Get the contour line miter limit. Use associated ContourLineAttribute if it exists and has miterLimitOverrideen set to false.
Overrides:
getMiterLimit in class LineAttribute

toString

public java.lang.String toString()
Description copied from class: LineAttribute
Get a String representation of the LineAttribute.
Overrides:
toString in class LineAttribute
Following copied from class: gov.noaa.pmel.sgt.LineAttribute
Returns:
String representation

copy

public java.lang.Object copy()
Description copied from class: LineAttribute
Copy the LineAttribute.
Overrides:
copy in class LineAttribute
Following copied from class: gov.noaa.pmel.sgt.LineAttribute
Returns:
new LineAttribute


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001