sgtplot
Class TimeAxis
- java.lang.Object
-
- sgtplot.Axis
-
- sgtplot.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
- See Also:
Axis
-
-
Field Summary
Fields Modifier and Type Field and Description static intAUTOAutomatically select the time axis stylestatic intDAY_MONTHUse the DayMonthAxis style.static intHOUR_DAYUse the HourDayAxis style.static intMINUTE_HOURUse the MinuteHourAxis style.static intMONTH_YEARUse the MonthYearAxis style.static intYEAR_DECADEUse the YearDecadeAxis style.-
Fields inherited from class sgtplot.Axis
BOTH_SIDES, HORIZONTAL, NEGATIVE_SIDE, NO_LABEL, POSITIVE_SIDE, VERTICAL
-
-
Constructor Summary
Constructors Constructor and Description TimeAxis(int style)Default contructor.TimeAxis(java.lang.String id, int style)TimeAxis constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Axiscopy()Create a copy of the axis.java.awt.RectanglegetBounds()Get the bounding box for the axis in device units.TimePointgetLocationU()Get the origin in user units.java.lang.StringgetMajorLabelFormat()Get the major label format.intgetMajorLabelInterval()Get the major label interval.java.lang.StringgetMinorLabelFormat()Get the minor label format.intgetMinorLabelInterval()Get the minor label interval.SoTPointgetSoTLocationU()Returns origin as aSoTPoint.SoTRangegetSoTRangeU()Get user range.intgetStyle()Get the time axis style.TimeRangegetTimeRangeU()Get the time range of the axis.voidmodified(java.lang.String mess)Used internally by sgtplot.voidsetBounds(int x, int y, int width, int height)voidsetBounds(java.awt.Rectangle r)voidsetLabelFormat(java.lang.String minor, java.lang.String major)Set the minor and major label formats.voidsetLabelInterval(int minor, int major)Set the minor and major label intervals.voidsetLocationU(SoTPoint tp)Set the axis location.voidsetLocationU(TimePoint tp)Set the origin in user units of the axis.voidsetMajorLabelFormat(java.lang.String major)Set the major label format.voidsetMajorLabelInterval(int major)Set the major label interval.voidsetMinorLabelFormat(java.lang.String minor)Set the minor label format.voidsetMinorLabelInterval(int minor)Set the minor label interval.voidsetRangeU(SoTRange tr)Set user range.voidsetRangeU(TimeRange tr)Set the user range to draw the axis.voidsetStyle(int style)Set the time axis style.voidsetTitle(SGLabel title)Set the axis title.-
Methods inherited from class sgtplot.Axis
clear, clear, clearAllRegisteredAxes, clearAllRegisteredTransforms, getGraph, getId, getLabelColor, getLabelFont, getLabelHeightP, getLabelPosition, getLargeTicHeightP, getLineColor, getNumberRegisteredAxes, getNumberRegisteredTransforms, getNumberSmallTics, getOrientation, getPane, getRangeP, getSmallTicHeightP, getThickTicWidthP, getTicPosition, getTitle, isSelectable, isSelected, isSpace, isTime, isVisible, register, register, setId, setLabelColor, setLabelFont, setLabelHeightP, setLabelPosition, setLargeTicHeightP, setLineColor, setNumberSmallTics, setOrientation, setRangeP, setSelectable, setSelected, setSmallTicHeightP, setThickTicWidthP, setTicPosition, setVisible, toString
-
-
-
-
Field Detail
-
AUTO
public static final int AUTO
Automatically select the time axis style- See Also:
- Constant Field Values
-
YEAR_DECADE
public static final int YEAR_DECADE
Use the YearDecadeAxis style.|..........|..........|..........|..........| 84 85 86 87 1980- See Also:
- Constant Field Values
-
MONTH_YEAR
public static final int MONTH_YEAR
Use the MonthYearAxis style.|..........|..........|..........|..........| Mar Apr May Jun 1980- See Also:
- Constant Field Values
-
DAY_MONTH
public static final int DAY_MONTH
Use the DayMonthAxis style.|..........|..........|..........|..........| 3 4 5 6 1993-04- See Also:
- Constant Field Values
-
HOUR_DAY
public static final int HOUR_DAY
Use the HourDayAxis style.|..........|..........|..........|..........| 03 04 05 06 07 1987-06-07- See Also:
- Constant Field Values
-
MINUTE_HOUR
public static final int MINUTE_HOUR
Use the MinuteHourAxis style.|..........|..........|..........|..........| 15 30 45 00 15 1987-06-07 13- See Also:
- Constant Field Values
-
-
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
-
setLabelFormat
public void setLabelFormat(java.lang.String minor, java.lang.String major)Set the minor and major label formats.- Parameters:
minor- minor label formatmajor- 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 intervalmajor- 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
-
getSoTRangeU
public SoTRange getSoTRangeU()
Description copied from class:AxisGet user range.- Specified by:
getSoTRangeUin classAxis
-
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:AxisSet the axis location.- Specified by:
setLocationUin classAxis
-
getSoTLocationU
public SoTPoint getSoTLocationU()
Returns origin as aSoTPoint.- Specified by:
getSoTLocationUin classAxis
-
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:AxisGet the bounding box for the axis in device units.- Specified by:
getBoundsin interfaceSelectable- Specified by:
getBoundsin classAxis- 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:AxisUsed internally by sgtplot.
-
-
DMelt 3.0 © DataMelt by jWork.ORG