gov.noaa.pmel.sgt
Class LineAttribute

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

public class LineAttribute
extends java.lang.Object
implements Attribute, java.lang.Cloneable, java.io.Serializable

Sets the rendering style for line data. Color, width, and dash characteristics are LineAttribute properties.

Since:
1.0
Version:
$Revision: 1.14 $, $Date: 2001/12/13 19:07:04 $
Author:
Donald Denbo
See Also:
LineCartesianRenderer, ContourLevels, Serialized Form

Field Summary
static int CAP_BUTT
          Cap styles
static int CAP_ROUND
           
static int CAP_SQUARE
           
static int DASHED
          Dashed line style.
static int HEAVY
          Heavy line style
static int HIGHLIGHT
          Highlighted line style.
static int JOIN_BEVEL
           
static int JOIN_MITER
          Join styles
static int JOIN_ROUND
           
static int MARK
          Mark line style.
static int MARK_LINE
          Mark with connecting lines style.
static int SOLID
          Solid line style.
static int STROKE
          Stroke.
 
Constructor Summary
LineAttribute()
          Default constructor.
LineAttribute(int style)
          Construct LineAttribute with Color.black.
LineAttribute(int style, java.awt.Color color)
          LineAttribute constructor.
LineAttribute(int style, int mark, java.awt.Color color)
          LineAttribute constructor for plot marks.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add listener to changes in LineAttribute properties.
 java.lang.Object copy()
          Copy the LineAttribute.
 int getCapStyle()
          Get the current line cap style.
 java.awt.Color getColor()
          Get line Color.
 float[] getDashArray()
          Get line dash array.
 float getDashPhase()
          Get line dash phase.
 int getMark()
          Get plot mark
 double getMarkHeightP()
          Get mark height
 float getMiterLimit()
          Get the current miter limit.
 int getMiterStyle()
          Get the current miter sytle.
 int getStyle()
          Get line style.
 float getWidth()
          Get line width.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove change listener.
 void setCapStyle(int style)
          Set the current line cap style.
 void setColor(java.awt.Color c)
          Set the line Color.
 void setDashArray(float[] dashes)
          Set the dash characteristics.
 void setDashPhase(float phase)
          Set line dash phase.
 void setMark(int mark)
          Set plot mark
Property Change: mark.
 void setMarkHeightP(double markh)
          Set mark height.
 void setMiterLimit(float limit)
          Set the miter limit.
 void setMiterStyle(int style)
          Set the current miter style.
 void setStyle(int st)
          Set the line style.
 void setWidth(float t)
          Set the line width in physical units.
 java.lang.String toString()
          Get a String representation of the LineAttribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SOLID

public static final int SOLID
Solid line style.

DASHED

public static final int DASHED
Dashed line style.

HEAVY

public static final int HEAVY
Heavy line style
Since:
2.0

HIGHLIGHT

public static final int HIGHLIGHT
Highlighted line style. Accomplished by drawing the line over a contrasting polygon of the same shape.

MARK

public static final int MARK
Mark line style.
See Also:
PlotMark

MARK_LINE

public static final int MARK_LINE
Mark with connecting lines style.

STROKE

public static final int STROKE
Stroke.

CAP_BUTT

public static final int CAP_BUTT
Cap styles

CAP_ROUND

public static final int CAP_ROUND

CAP_SQUARE

public static final int CAP_SQUARE

JOIN_MITER

public static final int JOIN_MITER
Join styles

JOIN_ROUND

public static final int JOIN_ROUND

JOIN_BEVEL

public static final int JOIN_BEVEL
Constructor Detail

LineAttribute

public LineAttribute()
Default constructor. Default style is SOLID and default color is red.

LineAttribute

public LineAttribute(int style)
Construct LineAttribute with Color.black.

LineAttribute

public LineAttribute(int style,
                     java.awt.Color color)
LineAttribute constructor.
Parameters:
style - line style
color - line Color
See Also:
Color

LineAttribute

public LineAttribute(int style,
                     int mark,
                     java.awt.Color color)
LineAttribute constructor for plot marks.
Parameters:
style - line sytle
mark - plot mark
color - line Color
Method Detail

copy

public java.lang.Object copy()
Copy the LineAttribute.
Returns:
new LineAttribute

setMarkHeightP

public void setMarkHeightP(double markh)
Set mark height.
Property Change: markHeightP.
Parameters:
markh - mark height

getMarkHeightP

public double getMarkHeightP()
Get mark height
Returns:
mark height

setStyle

public void setStyle(int st)
Set the line style.
Property Change: style.
Parameters:
st - line style

setColor

public void setColor(java.awt.Color c)
Set the line Color.
Property Change: color.
Parameters:
c - line Color

setWidth

public void setWidth(float t)
Set the line width in physical units.
Property Change: width.
Parameters:
t - line width

setDashArray

public void setDashArray(float[] dashes)
Set the dash characteristics. Lengths are in physical units.
Property Change: dashArray.

getDashArray

public float[] getDashArray()
Get line dash array.
Since:
2.0

setDashPhase

public void setDashPhase(float phase)
Set line dash phase.
Property Change: dashPhase.
Since:
2.0

getDashPhase

public float getDashPhase()
Get line dash phase.
Since:
2.0

getStyle

public int getStyle()
Get line style.
Returns:
line style

getColor

public java.awt.Color getColor()
Get line Color.
Returns:
line Color

getWidth

public float getWidth()
Get line width.
Returns:
line width in physcial coordinates.

setMark

public void setMark(int mark)
Set plot mark
Property Change: mark.
Parameters:
mark - the plot mark

getMark

public int getMark()
Get plot mark
Returns:
plot mark

setCapStyle

public void setCapStyle(int style)
Set the current line cap style. Cap styles include CAP_BUTT, CAP_ROUND, and CAP_SQUARE.
Property Change: capStyle.

getCapStyle

public int getCapStyle()
Get the current line cap style.

setMiterStyle

public void setMiterStyle(int style)
Set the current miter style. Styles include JOIN_MITER, JOIN_ROUND, and JOIN_BEVEL.
Property Change: miterStyle.

getMiterStyle

public int getMiterStyle()
Get the current miter sytle.

setMiterLimit

public void setMiterLimit(float limit)
Set the miter limit.
Property Change: miterLimit.

getMiterLimit

public float getMiterLimit()
Get the current miter limit.

toString

public java.lang.String toString()
Get a String representation of the LineAttribute.
Specified by:
toString in interface Attribute
Overrides:
toString in class java.lang.Object
Returns:
String representation

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes in LineAttribute properties.
Specified by:
addPropertyChangeListener in interface Attribute

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: Attribute
Remove change listener.
Specified by:
removePropertyChangeListener in interface Attribute


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