|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.noaa.pmel.sgt.Axis
gov.noaa.pmel.sgt.TimeAxis
public class TimeAxis
Base class for time axes. A time axis is an axis whose user units are GeoDate objects.
Axis
Field Summary | |
---|---|
static int |
AUTO
Automatically select the time axis style |
protected int |
axisStyle_
|
static int |
DAY_MONTH
Use the DayMonthAxis style. |
static int |
HOUR_DAY
Use the HourDayAxis style. |
protected java.lang.String |
majorLabelFormat_
|
protected int |
majorLabelInterval_
|
protected java.lang.String |
minorLabelFormat_
|
protected int |
minorLabelInterval_
|
static int |
MINUTE_HOUR
Use the MinuteHourAxis style. |
static int |
MONTH_YEAR
Use the MonthYearAxis style. |
protected TimePoint |
tLocation_
|
protected TimeRange |
tRange_
|
protected TimeAxisStyle |
txt_
|
protected int |
vertalign_
|
protected double |
xmajor_
|
protected double |
xminor_
|
static int |
YEAR_DECADE
Use the YearDecadeAxis style. |
protected double |
ymajor_
|
protected double |
yminor_
|
Fields inherited from class gov.noaa.pmel.sgt.Axis |
---|
BOTH_SIDES, graph_, HORIZONTAL, labelColor_, labelFont_, labelFormat_, labelHeight_, labelInterval_, labelPosition_, largeTicHeight_, lineColor_, NEGATIVE_SIDE, NO_LABEL, numSmallTics_, orientation_, POSITIVE_SIDE, pRange_, registeredAxes_, registeredTransforms_, selectable_, selected_, sigDigits_, smallTicHeight_, space_, thickTicWidth_, ticPosition_, title_, VERTICAL, visible_ |
Constructor Summary | |
---|---|
TimeAxis(int style)
Default contructor. |
|
TimeAxis(java.lang.String id,
int style)
TimeAxis constructor. |
Method Summary | |
---|---|
Axis |
copy()
Create a copy of the axis. |
protected void |
drawMajorLabel(java.awt.Graphics g,
double val,
GeoDate time)
|
protected void |
drawMinorLabel(java.awt.Graphics g,
double val,
GeoDate time)
|
java.awt.Rectangle |
getBounds()
Get the bounding box for the axis in device units. |
TimePoint |
getLocationU()
Get the origin in user units. |
java.lang.String |
getMajorLabelFormat()
Get the major label format. |
int |
getMajorLabelInterval()
Get the major label interval. |
java.lang.String |
getMinorLabelFormat()
Get the minor label format. |
int |
getMinorLabelInterval()
Get the minor label interval. |
SoTPoint |
getSoTLocationU()
Returns origin as a SoTPoint . |
SoTRange |
getSoTRangeU()
Get user range. |
int |
getStyle()
Get the time axis style. |
TimeRange |
getTimeRangeU()
Get the time range of the axis. |
void |
modified(java.lang.String mess)
Used internally by sgt. |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(java.awt.Rectangle r)
|
void |
setLabelFormat(java.lang.String minor,
java.lang.String major)
Set the minor and major label formats. |
void |
setLabelInterval(int minor,
int major)
Set the minor and major label intervals. |
void |
setLocationU(SoTPoint tp)
Set the axis location. |
void |
setLocationU(TimePoint tp)
Set the origin in user units of the axis. |
void |
setMajorLabelFormat(java.lang.String major)
Set the major label format. |
void |
setMajorLabelInterval(int major)
Set the major label interval. |
void |
setMinorLabelFormat(java.lang.String minor)
Set the minor label format. |
void |
setMinorLabelInterval(int minor)
Set the minor label interval. |
void |
setRangeU(SoTRange tr)
Set user range. |
void |
setRangeU(TimeRange tr)
Set the user range to draw the axis. |
void |
setStyle(int style)
Set the time axis style. |
void |
setTitle(SGLabel title)
Set the axis title. |
protected void |
setupDraw(double val)
|
protected void |
updateRegisteredAxes()
|
protected void |
updateRegisteredTransforms()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected TimeRange tRange_
protected TimePoint tLocation_
protected java.lang.String minorLabelFormat_
protected int minorLabelInterval_
protected java.lang.String majorLabelFormat_
protected int majorLabelInterval_
protected double yminor_
protected double ymajor_
protected double xminor_
protected double xmajor_
protected int vertalign_
protected TimeAxisStyle txt_
protected int axisStyle_
public static final int AUTO
public static final int YEAR_DECADE
|..........|..........|..........|..........| 84 85 86 87 1980
public static final int MONTH_YEAR
|..........|..........|..........|..........| Mar Apr May Jun 1980
public static final int DAY_MONTH
|..........|..........|..........|..........| 3 4 5 6 1993-04
public static final int HOUR_DAY
|..........|..........|..........|..........| 03 04 05 06 07 1987-06-07
public static final int MINUTE_HOUR
|..........|..........|..........|..........| 15 30 45 00 15 1987-06-07 13
Constructor Detail |
---|
public TimeAxis(int style)
public TimeAxis(java.lang.String id, int style)
id
- axis identifierMethod Detail |
---|
protected void updateRegisteredTransforms()
updateRegisteredTransforms
in class Axis
protected void updateRegisteredAxes()
updateRegisteredAxes
in class Axis
protected void setupDraw(double val)
protected void drawMinorLabel(java.awt.Graphics g, double val, GeoDate time)
protected void drawMajorLabel(java.awt.Graphics g, double val, GeoDate time)
public Axis copy()
Axis
copy
in class Axis
public void setLabelFormat(java.lang.String minor, java.lang.String major)
minor
- minor label formatmajor
- major label formatpublic void setMinorLabelFormat(java.lang.String minor)
minor
- minor label formatpublic void setMajorLabelFormat(java.lang.String major)
major
- major label formatpublic java.lang.String getMinorLabelFormat()
public java.lang.String getMajorLabelFormat()
public void setLabelInterval(int minor, int major)
minor
- minor label intervalmajor
- major label intervalpublic void setMinorLabelInterval(int minor)
minor
- minor label intervalpublic void setMajorLabelInterval(int major)
major
- major label intervalpublic int getMinorLabelInterval()
public int getMajorLabelInterval()
public void setStyle(int style)
style
- new time axis stylepublic int getStyle()
public void setRangeU(TimeRange tr)
tr
- TimeRange of axis.public TimeRange getTimeRangeU()
public void setRangeU(SoTRange tr)
Axis
setRangeU
in class Axis
public SoTRange getSoTRangeU()
Axis
getSoTRangeU
in class Axis
public void setLocationU(TimePoint tp)
tp
- origin of axis in user unitspublic void setLocationU(SoTPoint tp)
Axis
setLocationU
in class Axis
public SoTPoint getSoTLocationU()
SoTPoint
.
getSoTLocationU
in class Axis
public TimePoint getLocationU()
public java.awt.Rectangle getBounds()
Axis
getBounds
in interface Selectable
getBounds
in class Axis
public void setBounds(java.awt.Rectangle r)
public void setBounds(int x, int y, int width, int height)
public void modified(java.lang.String mess)
Axis
modified
in class Axis
public void setTitle(SGLabel title)
Axis
setTitle
in class Axis
title
- axis title
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |