|
SGT Home | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.noaa.pmel.sgt.Axis
Abstract base class for Cartesian axes. Cartesian axes are
designed to be used with
the CartesianGraph
class. Axes and AxisTransform
s
can be registed with an Axis
. This allows changes in both
the physical range and user range to be immediatedly updated
for the registered AxisTransform
s and axes.
Cartesian axes can have their user coordinates be double values or time (as
GeoDate
objects). These have been separated into
two child objects.
SpaceAxis
,
TimeAxis
Field Summary | |
static int |
BOTH_SIDES
Draw the tics on both sides of the axes. |
static int |
HORIZONTAL
Draw a horizontal axis. |
static int |
NEGATIVE_SIDE
Place the label and/or tic on the negative side of the axis. |
static int |
NO_LABEL
Do not draw a label and/or tic. |
static int |
POSITIVE_SIDE
Place the label and/or tic on the positive side of the axis. |
static int |
VERTICAL
Draw a vertical axis. |
Constructor Summary | |
Axis()
Default constructor for Axis. |
|
Axis(java.lang.String id)
Constructor for Axis. |
Method Summary | |
void |
clear(Axis axis)
Unregister an axis. |
void |
clear(AxisTransform trns)
Unregister an AxisTransform . |
void |
clearAllRegisteredAxes()
Unregister all axes. |
void |
clearAllRegisteredTransforms()
Unregister all AxisTransform s. |
abstract Axis |
copy()
Create a copy of the axis. |
abstract java.awt.Rectangle |
getBounds()
Get the bounding box for the axis in device units. |
CartesianGraph |
getGraph()
Get the Graph associated with the axis. |
java.lang.String |
getId()
Get the axis identifier. |
java.awt.Color |
getLabelColor()
Get the label color. |
java.awt.Font |
getLabelFont()
Get the label font. |
double |
getLabelHeightP()
Get the label height. |
int |
getLabelPosition()
Get the label position. |
double |
getLargeTicHeightP()
Get the large tic height. |
int |
getNumberRegisteredAxes()
Get the number of currently registered axes. |
int |
getNumberRegisteredTransforms()
Get the number of currently registered transforms. |
int |
getNumberSmallTics()
Get the number of small tics between large tics. |
int |
getOrientation()
Get axis orientation |
AbstractPane |
getPane()
Get the parent pane. |
Range2D |
getRangeP()
Get the physical range. |
double |
getSmallTicHeightP()
Get the small tic height. |
abstract SoTPoint |
getSoTLocationU()
Get current axis location. |
abstract SoTRange |
getSoTRangeU()
Get user range. |
double |
getThickTicWidthP()
Get the thick tic width. |
int |
getTicPosition()
Get the tic position. |
SGLabel |
getTitle()
Get the axis title. |
boolean |
isSelectable()
Determines if the axis is selectable. |
boolean |
isSelected()
Determines if the axis has been selected. |
boolean |
isSpace()
Tests if axis is space. |
boolean |
isTime()
Tests if axis is time. |
boolean |
isVisible()
Determines if the axis is visible. |
void |
modified(java.lang.String mess)
Used internally by sgt. |
void |
register(Axis axis)
Register an axis. |
void |
register(AxisTransform trns)
Register an AxisTransform . |
void |
setId(java.lang.String id)
Set the axis identifier. |
void |
setLabelColor(java.awt.Color color)
Set the label color. |
void |
setLabelFont(java.awt.Font fnt)
Set the label font. |
void |
setLabelHeightP(double lhgt)
Set the label height in physical units. |
void |
setLabelPosition(int labp)
Set the label position. |
void |
setLargeTicHeightP(double lthgt)
Set the large tic height in physical units. |
abstract void |
setLocationU(SoTPoint pt)
Set the axis location. |
void |
setNumberSmallTics(int nstic)
Set the number of small tics between large tics. |
void |
setRangeP(Range2D pr)
Set the physical range. |
abstract void |
setRangeU(SoTRange range)
Set user range. |
void |
setSelectable(boolean select)
Set the selectable state. |
void |
setSelected(boolean sel)
Sets the selected property. |
void |
setSmallTicHeightP(double sthgt)
Set the small tic height in physical units. |
void |
setThickTicWidthP(double wid)
Set the thick tic width in physical units. |
void |
setTicPosition(int tpos)
Set the tic position. |
void |
setTitle(SGLabel title)
Set the axis title. |
void |
setVisible(boolean visible)
Set the visibility state. |
java.lang.String |
toString()
Get a String representation of the Axis . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int POSITIVE_SIDE
VERTICAL
axes and the top of
HORIZONTAL
axes.public static final int NEGATIVE_SIDE
VERTICAL
axes and the bottom of
HORIZONTAL
axes.public static final int NO_LABEL
public static final int BOTH_SIDES
public static final int HORIZONTAL
public static final int VERTICAL
Constructor Detail |
public Axis()
public Axis(java.lang.String id)
numberSmallTics = 0 largeTicHeightP = 0.1 smallTicHeightP = 0.05 thickTicWidth_ = 0.025 ticPosition = NEGATIVE_SIDE labelPosition = NEGATIVE_SIDE labelInterval = 2 labelFont = Font("Helvetica", Font.ITALIC, 10); labelColor = Color.black; labelHeightP = 0.15 significantDigits = 2; labelFormat = "" title = null orientation = HORIZONTAL selectable = true visible = true
id
- axis identifierMethod Detail |
public abstract Axis copy()
public CartesianGraph getGraph()
Graph
associated with the axis.public AbstractPane getPane()
public void modified(java.lang.String mess)
public void register(Axis axis)
axis
- An Axis object.public void register(AxisTransform trns)
AxisTransform
. Registered
AxisTransform
s will be
notified of changes to the user coordinate range and physical
coordinate range.trns
- A AxisTransform object.public void clear(Axis axis)
axis
- An Axis object.public void clear(AxisTransform trns)
AxisTransform
. The AxisTransform
will no longer be
notified of changes to the user or physical coordinate range.trns
- A AxisTransform ojbect.public void clearAllRegisteredAxes()
public void clearAllRegisteredTransforms()
AxisTransform
s. No
AxisTransform
s will be
notified of changes in the user of physical range.public int getNumberRegisteredTransforms()
public int getNumberRegisteredAxes()
public void setLargeTicHeightP(double lthgt)
lthgt
- large tic height.public double getLargeTicHeightP()
public void setNumberSmallTics(int nstic)
nstic
- number of small tics.public int getNumberSmallTics()
public void setSmallTicHeightP(double sthgt)
sthgt
- small tic height.public double getSmallTicHeightP()
public void setThickTicWidthP(double wid)
wid
- thick tic width.public double getThickTicWidthP()
public void setTicPosition(int tpos)
POSITIVE_SIDE
,
NEGATIVE_SIDE
, or BOTH_SIDES
.tpos
- tic positionpublic int getTicPosition()
public void setLabelPosition(int labp)
POSITIVE_SIDE
,
NEGATIVE_SIDE
, and NO_LABEL
.lapb
- label position.public int getLabelPosition()
public void setLabelFont(java.awt.Font fnt)
fnt
- label fontpublic java.awt.Font getLabelFont()
public void setLabelColor(java.awt.Color color)
public java.awt.Color getLabelColor()
public void setLabelHeightP(double lhgt)
lhgt
- label height.public double getLabelHeightP()
public void setTitle(SGLabel title)
title
- axis titlepublic SGLabel getTitle()
public void setRangeP(Range2D pr)
Transform
s.
If no Transform
s are registered, the setRangeP
method has no effect.pr
- physcial rangepublic Range2D getRangeP()
CartesianGraph
object and attached Transform
.public void setId(java.lang.String id)
id
- identifierpublic java.lang.String getId()
public int getOrientation()
public boolean isSpace()
public boolean isTime()
public abstract java.awt.Rectangle getBounds()
getBounds
in interface Selectable
public java.lang.String toString()
String
representation of the Axis
.toString
in class java.lang.Object
String
representationpublic void setSelected(boolean sel)
Selectable
setSelected
in interface Selectable
gov.noaa.pmel.sgt.Selectable
sel
- true if selected, false if not.public boolean isSelected()
isSelected
in interface Selectable
public void setSelectable(boolean select)
setSelectable
in interface Selectable
public boolean isSelectable()
isSelectable
in interface Selectable
public boolean isVisible()
public void setVisible(boolean visible)
public abstract void setLocationU(SoTPoint pt)
public abstract SoTPoint getSoTLocationU()
public abstract void setRangeU(SoTRange range)
public abstract SoTRange getSoTRangeU()
|
SGT Home | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |