All Packages Class Hierarchy This Package Previous Next Index
Class crw.data2.Axis2
java.lang.Object
|
+----crw.data2.Axis2
- public abstract class Axis2
- extends Object
-
conversion
-
-
dV
-
-
format
-
-
labelDescent
-
-
labelSide
-
-
labelWidth
-
-
loc
-
-
noOfTicks
-
-
refMode
-
-
skipBeginLabl
-
-
skipEndLabl
-
-
tickSide
-
-
unit
-
-
vRange
-
-
zeroWidth
-
-
Axis2()
-
-
draw(Graphics)
-
-
drawLabel(Graphics, int, String)
- Draws label at the specified position using the
specified label.
-
drawTick(Graphics, int)
- Draws tick at the specified position of given length.
-
findExtAxisCoordinates()
- Finds the axis coordinates from an external reference obj.
-
getBegin()
- Returns the beginning screen coordinate.
-
getLocation()
- Returns the screen location of this axis.
-
getRange()
- Returns the end-coordinate minus the begin-coordinate.
-
getVBegin()
- Returns the Beginning value on this axis.
-
getVEnd()
- Returns the ending value on this axis.
-
getVRange()
- Returns the value-at-end minus the value-at-begin.
-
hasChanged()
- Returns the flag indicating a recent change in this axis.
-
init()
-
-
resetNoOfTicks()
- Recalculates the noOfTicks, adjusts it
to the the label interval to fill the axis from Begin to End.
-
resetSpacingValue()
- Recalculate the axis interval values, adjust it
to the noOfTicks to fill the entire axis from Begin to End.
-
setAxisCoorRef(AxisCoor)
- Sets (or ties) the Axis2 coordinates (begin, end, location)
according to those within an external ref.
-
setAxisCoorRef(AxisCoor, int, int)
- Sets (or ties) the Axis2 coordinates (begin, end)
according to those within an external ref.
-
setAxisLocRef(AxisCoor, int)
- Sets the Axis2 location to an external ref.
-
setBeginEnd(int, int)
- Sets the beginning and ending screen coordinates of this
axis.
-
setBeginEndRelative(Canvas)
- Sets the beginning and ending screen coordinate of this axis relative
to the specified canvas size -- beginning at the far left or lowest bottom,
ending coor at the far right or at the top.
-
setBeginEndRelative(double, double, Canvas)
- Sets the beginning and ending screen coordinates relative to the
width of the specified Canvas width or height.
-
setChanged(boolean)
- Sets a flag that this axis property has changed.
-
setExtIndex(String, int)
- Sets the coordinate "begin", "end", or "location" and its
index ID in the external coordinate reference object.
-
setExtVRef(FloatRange)
- Specifies a FloatRange obj ref which contains the beginning and
ending values onthis axis.
-
setLocation(int)
- Sets the y-coordinate of x-axis or the x-coordinate of y-axis.
-
setLocRelative(Canvas)
- Sets the location of this axis in the middle of the specified canvas.
-
setLocRelative(double, Canvas)
- Sets the location of this axis relative to the width or height of the
specified canvas.
-
setNoOfTicks(int)
- Sets the number of ticks on axis.
-
setSigDigits(int)
- Sets a new number of significant digits for Labeling.
-
setSpacingValue(double)
- Sets the value interval on axis label.
-
setUnit(String)
- Sets unit for axis label values.
-
setVBeginEnd(double, double)
- Sets the beginning and ending values on this axis.
-
skipBeginLabel(boolean)
- Whether to draw the tick and label at Begin coordinate.
-
skipEndLabel(boolean)
- Whether to draw the tick and label at End coordinate.
vRange
protected FloatRange vRange
skipEndLabl
protected boolean skipEndLabl
skipBeginLabl
protected boolean skipBeginLabl
noOfTicks
protected int noOfTicks
dV
protected double dV
unit
protected String unit
labelSide
protected boolean labelSide
tickSide
protected boolean tickSide
conversion
protected Conversion2 conversion
format
protected Format format
labelWidth
protected int labelWidth
zeroWidth
protected int zeroWidth
labelDescent
protected int labelDescent
loc
protected int loc[]
refMode
protected boolean refMode[]
Axis2
protected Axis2()
init
public void init()
draw
public void draw(Graphics g)
setNoOfTicks
public void setNoOfTicks(int num)
- Sets the number of ticks on axis.
- Parameters:
- num - the number of ticks on axis. This includes
two end points (begin, end).
setSigDigits
public void setSigDigits(int sigDigits)
- Sets a new number of significant digits for Labeling.
- Parameters:
- sigDigits - the new number of significant digits.
skipBeginLabel
public void skipBeginLabel(boolean skip)
- Whether to draw the tick and label at Begin coordinate.
- Parameters:
- skip - true to skip.
skipEndLabel
public void skipEndLabel(boolean skip)
- Whether to draw the tick and label at End coordinate.
- Parameters:
- skip - true to skip.
setSpacingValue
public void setSpacingValue(double dV)
- Sets the value interval on axis label.
- Parameters:
- dV - value spacing for axis label.
setUnit
public void setUnit(String unit)
- Sets unit for axis label values.
- Parameters:
- unit - to be attached to each label value.
resetSpacingValue
public void resetSpacingValue()
- Recalculate the axis interval values, adjust it
to the noOfTicks to fill the entire axis from Begin to End.
resetNoOfTicks
public void resetNoOfTicks()
- Recalculates the noOfTicks, adjusts it
to the the label interval to fill the axis from Begin to End.
drawTick
protected void drawTick(Graphics g,
int position)
- Draws tick at the specified position of given length. Blank impl.
drawLabel
protected void drawLabel(Graphics g,
int position,
String label)
- Draws label at the specified position using the
specified label.
setVBeginEnd
public void setVBeginEnd(double beg,
double end)
- Sets the beginning and ending values on this axis.
setExtVRef
public void setExtVRef(FloatRange range)
- Specifies a FloatRange obj ref which contains the beginning and
ending values onthis axis.
- See Also:
- setVBeginEnd, FloatRange
getVBegin
public double getVBegin()
- Returns the Beginning value on this axis.
getVEnd
public double getVEnd()
- Returns the ending value on this axis.
setBeginEnd
public void setBeginEnd(int begin,
int end)
- Sets the beginning and ending screen coordinates of this
axis.
getBegin
public int getBegin()
- Returns the beginning screen coordinate.
setLocation
public void setLocation(int location)
- Sets the y-coordinate of x-axis or the x-coordinate of y-axis.
- Parameters:
- location - the new coordinate of axis.
getLocation
public int getLocation()
- Returns the screen location of this axis. If x-axis, returns y-coordinate,
if y-axis, returns x-coordinate.
getRange
public int getRange()
- Returns the end-coordinate minus the begin-coordinate.
- Returns:
- end-begin.
getVRange
public double getVRange()
- Returns the value-at-end minus the value-at-begin.
- Returns:
- vEnd - vBegin.
setChanged
public void setChanged(boolean changed)
- Sets a flag that this axis property has changed.
hasChanged
public boolean hasChanged()
- Returns the flag indicating a recent change in this axis.
setAxisCoorRef
public void setAxisCoorRef(AxisCoor aCoor,
int beginIndex,
int endIndex)
- Sets (or ties) the Axis2 coordinates (begin, end)
according to those within an external ref. object. This
external object must implement the AxisCoor interface.
- Parameters:
- aCoor - an external ref which has the coordinate info.
- beginIndex - index number of the begin coor.
- endIndex - index number of the end coor.
setAxisLocRef
public void setAxisLocRef(AxisCoor aLoc,
int indexID)
- Sets the Axis2 location to an external ref. oject.
- Parameters:
- aLoc - the external ref. object
- indexID - the array index of a array field in aLoc that corresponds to the axis "location" --i.e., y-coor of x-axis.
setAxisCoorRef
public void setAxisCoorRef(AxisCoor aCoor)
- Sets (or ties) the Axis2 coordinates (begin, end, location)
according to those within an external ref. object. This
external object must implement the AxisCoor interface.
- Parameters:
- aLoc - the external object which has coordinate info.
setExtIndex
public void setExtIndex(String whichCoord,
int indexID) throws AxisCoorNotSetException
- Sets the coordinate "begin", "end", or "location" and its
index ID in the external coordinate reference object. This
external object must implement the AxisCoor interface.
- Parameters:
- whichCoord - "location", "begin", or "end".
- indexID - the integer ID in AxisCoor.getCoordinate(indexID)
- Throws: AxisCoorNotSetException
- if the AxisCoor ref. obj is not specified.
setBeginEndRelative
public abstract void setBeginEndRelative(double begin,
double end,
Canvas canvas)
- Sets the beginning and ending screen coordinates relative to the
width of the specified Canvas width or height. Note that begin >=0,
end <= 1.
setLocRelative
public abstract void setLocRelative(double loc,
Canvas canvas)
- Sets the location of this axis relative to the width or height of the
specified canvas. 0 <= loc <=1.
setBeginEndRelative
public void setBeginEndRelative(Canvas canvas)
- Sets the beginning and ending screen coordinate of this axis relative
to the specified canvas size -- beginning at the far left or lowest bottom,
ending coor at the far right or at the top.
setLocRelative
public void setLocRelative(Canvas canvas)
- Sets the location of this axis in the middle of the specified canvas.
findExtAxisCoordinates
protected void findExtAxisCoordinates()
- Finds the axis coordinates from an external reference obj.
All Packages Class Hierarchy This Package Previous Next Index