|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.noaa.pmel.sgt.VectorAttribute
public class VectorAttribute
Sets the rendering style for line data.
Color
, width, and dash characteristics are
VectorAttribute
properties.
Warning: The SGT implementation of
Vectors requires Java2D. To use Vectors you must be using jdk1.2 or
newer.
LineCartesianRenderer
,
ContourLevels
,
Serialized FormField Summary | |
---|---|
protected java.beans.PropertyChangeSupport |
changes_
|
static int |
HEAD
Vector head style, Un-scaled (default). |
static int |
MARK
Vector origin style, Mark. |
static int |
NO_HEAD
Vector head style, None. |
static int |
NO_MARK
Vector origin style, no mark (default). |
static int |
SCALED_HEAD
Vector head style, Scaled. |
Constructor Summary | |
---|---|
VectorAttribute()
Default constructor. |
|
VectorAttribute(double scale,
java.awt.Color color)
VectorAttribute constructor. |
|
VectorAttribute(int style,
double scale,
java.awt.Color color,
double head_scale)
VectorAttribute constructor. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes in VectorAttribute properties. |
java.lang.Object |
copy()
Copy the VectorAttribute . |
protected void |
firePropertyChange(java.lang.String name,
java.lang.Object oldValue,
java.lang.Object newValue)
|
int |
getCapStyle()
Get the line cap style. |
double |
getHeadFixedSize()
Get the fixed vector head size. |
double |
getHeadMaxSize()
Get the maximum vector head size. |
double |
getHeadMinSize()
Get the minimum vector head size. |
double |
getHeadScale()
Get the vector head scale. |
java.lang.String |
getId()
Get attribute id. |
int |
getMark()
Get plot mark for the origin. |
java.awt.Color |
getMarkColor()
Get the color for the origin mark. |
double |
getMarkHeightP()
Get mark height for the origin. |
float |
getMiterLimit()
Get the line miter limit. |
int |
getMiterStyle()
Get the line miter sytle. |
double |
getOffsetAngle()
Get the vector rotation angle. |
int |
getOriginStyle()
Get vector origin style. |
java.awt.Color |
getVectorColor()
Get the vector color. |
double |
getVectorMaxSize()
Get the maximum vector length allowed. |
double |
getVectorScale()
Geth the vector head scale. |
int |
getVectorStyle()
Get the vector head style. |
float |
getWidth()
Get line width. |
boolean |
isBatch()
Is the attribute in batch mode? |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove change listener. |
void |
setBatch(boolean batch)
Batch the changes to the attribute. |
void |
setBatch(boolean batch,
boolean local)
Batch the changes to the attribute and set local flag. |
void |
setCapStyle(int style)
Set the line Cap Style. |
void |
setHeadFixedSize(double size)
Set the fixed size for a unscaled vector head. |
void |
setHeadMaxSize(double size)
Set the maximum size for a scaled vector head. |
void |
setHeadMinSize(double size)
Set the minimum size for a scaled vector head. |
void |
setHeadScale(double scale)
Change the vector head scale. |
void |
setId(java.lang.String id)
Set attribute id. |
void |
setMark(int mark)
Set the mark for the origin. |
void |
setMarkColor(java.awt.Color color)
Set the color for the origin mark. |
void |
setMarkHeightP(double markh)
Set mark height for the origin. |
void |
setMiterLimit(float limit)
Set the line miter limit. |
void |
setMiterStyle(int style)
Set the line miter style. |
void |
setOffsetAngle(double angle)
Set the angle (clockwize positive) to rotate the vector. |
void |
setOriginStyle(int style)
Set the vector origin style. |
void |
setVectorColor(java.awt.Color color)
Change the vector color. |
void |
setVectorMaxSize(double size)
Set the maximum size for a vector. |
void |
setVectorScale(double scale)
Change the vector scale. |
void |
setVectorStyle(int style)
Change the head style. |
void |
setWidth(float t)
Set the line width in physical units. |
java.lang.String |
toString()
Get a String representation of the
VectorAttribute . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient java.beans.PropertyChangeSupport changes_
public static final int NO_HEAD
public static final int HEAD
public static final int SCALED_HEAD
public static final int NO_MARK
public static final int MARK
Constructor Detail |
---|
public VectorAttribute()
public VectorAttribute(double scale, java.awt.Color color)
VectorAttribute
constructor. Default vector style
is HEAD.
scale
- vector scalecolor
- vector Color
Color
public VectorAttribute(int style, double scale, java.awt.Color color, double head_scale)
VectorAttribute
constructor.
style
- vector stylescale
- vector scalecolor
- vector Color
head_scale
- scale of vector headColor
Method Detail |
---|
public java.lang.Object copy()
VectorAttribute
.
VectorAttribute
public void setVectorStyle(int style)
NO_HEAD
,
HEAD
, and SCALED_HEAD
.
vectorStyle
.
setVectorColor(java.awt.Color)
,
setVectorMaxSize(double)
,
setVectorScale(double)
,
setOffsetAngle(double)
public int getVectorStyle()
public void setVectorColor(java.awt.Color color)
vectorColor
.
public java.awt.Color getVectorColor()
public void setVectorScale(double scale)
vectorScale
.
setVectorMaxSize(double)
public double getVectorScale()
public void setVectorMaxSize(double size)
vectorMaxSize
.
public double getVectorMaxSize()
public void setOffsetAngle(double angle)
offsetAngle
.
angle
- in degreespublic double getOffsetAngle()
public void setHeadScale(double scale)
headScale
.
setHeadMinSize(double)
,
setHeadMaxSize(double)
public double getHeadScale()
public void setHeadMaxSize(double size)
headMaxSize
.
public double getHeadMaxSize()
public void setHeadMinSize(double size)
headMinSize
.
public double getHeadMinSize()
public void setHeadFixedSize(double size)
headFixedSize
.
public double getHeadFixedSize()
public void setOriginStyle(int style)
NO_MARK
and MARK
.
originStyle
.
setMarkColor(java.awt.Color)
,
setMark(int)
,
setMarkHeightP(double)
public int getOriginStyle()
public void setMarkColor(java.awt.Color color)
markColor
.
public java.awt.Color getMarkColor()
public void setMark(int mark)
mark
.
mark
- the plot markPlotMark
public int getMark()
public void setMarkHeightP(double markh)
markHeightP
.
markh
- mark heightpublic double getMarkHeightP()
public void setWidth(float t)
width
.
t
- line widthpublic float getWidth()
public void setCapStyle(int style)
LineAttribute.CAP_BUTT
,
LineAttribute.CAP_ROUND
, and
LineAttribute.CAP_SQUARE
.
capStyle
.
LineAttribute.CAP_BUTT
,
LineAttribute.CAP_ROUND
,
LineAttribute.CAP_SQUARE
public int getCapStyle()
public void setMiterStyle(int style)
LineAttribute.JOIN_BEVEL
,
LineAttribute.JOIN_MITER
, and
LineAttribute.JOIN_ROUND
.
miterStyle
.
LineAttribute.JOIN_BEVEL
,
LineAttribute.JOIN_MITER
,
LineAttribute.JOIN_ROUND
public int getMiterStyle()
public void setMiterLimit(float limit)
miterLimit
.
public float getMiterLimit()
public java.lang.String toString()
String
representation of the
VectorAttribute
.
toString
in interface Attribute
toString
in class java.lang.Object
String
representationpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
VectorAttribute
properties.
addPropertyChangeListener
in interface Attribute
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Attribute
removePropertyChangeListener
in interface Attribute
public void setId(java.lang.String id)
Attribute
setId
in interface Attribute
public java.lang.String getId()
Attribute
getId
in interface Attribute
protected void firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
public void setBatch(boolean batch)
Attribute
setBatch
in interface Attribute
public void setBatch(boolean batch, boolean local)
Attribute
AttributeChangeEvent
will be set local.
setBatch
in interface Attribute
public boolean isBatch()
Attribute
isBatch
in interface Attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |