gov.noaa.pmel.sgt
Class TimeAxis

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.Axis
        |
        +--gov.noaa.pmel.sgt.TimeAxis
All Implemented Interfaces:
java.lang.Cloneable, Selectable

public class TimeAxis
extends Axis
implements java.lang.Cloneable

Base class for time axes. A time axis is an axis whose user units are GeoDate objects.

Since:
1.0
Version:
$Revision: 1.14 $, $Date: 2001/04/03 18:41:03 $
Author:
Donald Denbo
See Also:
Axis

Field Summary
static int AUTO
          Automatically select the time axis style
static int DAY_MONTH
          Use the DayMonthAxis style.
static int HOUR_DAY
          Use the HourDayAxis style.
static int MINUTE_HOUR
          Use the MinuteHourAxis style.
static int MONTH_YEAR
          Use the MonthYearAxis style.
static int YEAR_DECADE
          Use the YearDecadeAxis style.
 
Fields inherited from class gov.noaa.pmel.sgt.Axis
BOTH_SIDES, HORIZONTAL, NEGATIVE_SIDE, NO_LABEL, POSITIVE_SIDE, VERTICAL
 
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.
 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.
 
Methods inherited from class gov.noaa.pmel.sgt.Axis
clear, clear, clearAllRegisteredAxes, clearAllRegisteredTransforms, getGraph, getId, getLabelColor, getLabelFont, getLabelHeightP, getLabelPosition, getLargeTicHeightP, getNumberRegisteredAxes, getNumberRegisteredTransforms, getNumberSmallTics, getOrientation, getPane, getRangeP, getSmallTicHeightP, getThickTicWidthP, getTicPosition, getTitle, isSelectable, isSelected, isSpace, isTime, isVisible, register, register, setId, setLabelColor, setLabelFont, setLabelHeightP, setLabelPosition, setLargeTicHeightP, setNumberSmallTics, setRangeP, setSelectable, setSelected, setSmallTicHeightP, setThickTicWidthP, setTicPosition, setVisible, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO

public static final int AUTO
Automatically select the time axis style

YEAR_DECADE

public static final int YEAR_DECADE
Use the YearDecadeAxis style.
   |..........|..........|..........|..........|
        84         85         86         87
                       1980
 

MONTH_YEAR

public static final int MONTH_YEAR
Use the MonthYearAxis style.
   |..........|..........|..........|..........|
        Mar        Apr        May       Jun
                       1980
 

DAY_MONTH

public static final int DAY_MONTH
Use the DayMonthAxis style.
   |..........|..........|..........|..........|
        3          4          5           6
                        1993-04
 

HOUR_DAY

public static final int HOUR_DAY
Use the HourDayAxis style.
   |..........|..........|..........|..........|
   03         04         05         06         07
                     1987-06-07
 

MINUTE_HOUR

public static final int MINUTE_HOUR
Use the MinuteHourAxis style.
   |..........|..........|..........|..........|
   15         30         45         00         15
                   1987-06-07 13
 
Constructor Detail

TimeAxis

public TimeAxis(int style)
Default contructor.

TimeAxis

public TimeAxis(java.lang.String id,
                int style)
TimeAxis constructor.
Parameters:
id - axis identifier
Method Detail

copy

public Axis copy()
Description copied from class: Axis
Create a copy of the axis.
Overrides:
copy in class Axis
Following copied from class: gov.noaa.pmel.sgt.Axis
Returns:
the copy

setLabelFormat

public void setLabelFormat(java.lang.String minor,
                           java.lang.String major)
Set the minor and major label formats.
Parameters:
minor - minor label format
major - major label format

setMinorLabelFormat

public void setMinorLabelFormat(java.lang.String minor)
Set the minor label format.
Parameters:
minor - minor label format

setMajorLabelFormat

public void setMajorLabelFormat(java.lang.String major)
Set the major label format.
Parameters:
major - major label format

getMinorLabelFormat

public java.lang.String getMinorLabelFormat()
Get the minor label format.
Returns:
minor label format

getMajorLabelFormat

public java.lang.String getMajorLabelFormat()
Get the major label format.
Returns:
major label format

setLabelInterval

public void setLabelInterval(int minor,
                             int major)
Set the minor and major label intervals.
Parameters:
minor - minor label interval
major - major label interval

setMinorLabelInterval

public void setMinorLabelInterval(int minor)
Set the minor label interval.
Parameters:
minor - minor label interval

setMajorLabelInterval

public void setMajorLabelInterval(int major)
Set the major label interval.
Parameters:
major - major label interval

getMinorLabelInterval

public int getMinorLabelInterval()
Get the minor label interval.
Returns:
minor label interval

getMajorLabelInterval

public int getMajorLabelInterval()
Get the major label interval.
Returns:
major label interval

setStyle

public void setStyle(int style)
Set the time axis style.
Parameters:
style - new time axis style

getStyle

public int getStyle()
Get the time axis style.
Returns:
time axis style

setRangeU

public void setRangeU(TimeRange tr)
Set the user range to draw the axis. Registered Axes and Transforms will be updated.
Parameters:
tr - TimeRange of axis.

getTimeRangeU

public TimeRange getTimeRangeU()
Get the time range of the axis.
Returns:
TimeRange of axis

setRangeU

public void setRangeU(SoTRange tr)
Description copied from class: Axis
Set user range.
Overrides:
setRangeU in class Axis

getSoTRangeU

public SoTRange getSoTRangeU()
Description copied from class: Axis
Get user range.
Overrides:
getSoTRangeU in class Axis

setLocationU

public void setLocationU(TimePoint tp)
Set the origin in user units of the axis.
Parameters:
tp - origin of axis in user units

setLocationU

public void setLocationU(SoTPoint tp)
Description copied from class: Axis
Set the axis location.
Overrides:
setLocationU in class Axis

getSoTLocationU

public SoTPoint getSoTLocationU()
Returns origin as a SoTPoint.
Overrides:
getSoTLocationU in class Axis

getLocationU

public TimePoint getLocationU()
Get the origin in user units.
Returns:
origin in user units

getBounds

public java.awt.Rectangle getBounds()
Description copied from class: Axis
Get the bounding box for the axis in device units.
Overrides:
getBounds in class Axis
Following copied from class: gov.noaa.pmel.sgt.Axis
Returns:
bounding box

setBounds

public void setBounds(java.awt.Rectangle r)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)

modified

public void modified(java.lang.String mess)
Description copied from class: Axis
Used internally by sgt.
Overrides:
modified in class Axis

setTitle

public void setTitle(SGLabel title)
Description copied from class: Axis
Set the axis title.
Overrides:
setTitle in class Axis
Following copied from class: gov.noaa.pmel.sgt.Axis
Parameters:
title - axis title


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