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

Variable Index

 o conversion
 o dV
 o format
 o labelDescent
 o labelSide
 o labelWidth
 o loc
 o noOfTicks
 o refMode
 o skipBeginLabl
 o skipEndLabl
 o tickSide
 o unit
 o vRange
 o zeroWidth

Constructor Index

 o Axis2()

Method Index

 o draw(Graphics)
 o drawLabel(Graphics, int, String)
Draws label at the specified position using the specified label.
 o drawTick(Graphics, int)
Draws tick at the specified position of given length.
 o findExtAxisCoordinates()
Finds the axis coordinates from an external reference obj.
 o getBegin()
Returns the beginning screen coordinate.
 o getLocation()
Returns the screen location of this axis.
 o getRange()
Returns the end-coordinate minus the begin-coordinate.
 o getVBegin()
Returns the Beginning value on this axis.
 o getVEnd()
Returns the ending value on this axis.
 o getVRange()
Returns the value-at-end minus the value-at-begin.
 o hasChanged()
Returns the flag indicating a recent change in this axis.
 o init()
 o resetNoOfTicks()
Recalculates the noOfTicks, adjusts it to the the label interval to fill the axis from Begin to End.
 o resetSpacingValue()
Recalculate the axis interval values, adjust it to the noOfTicks to fill the entire axis from Begin to End.
 o setAxisCoorRef(AxisCoor)
Sets (or ties) the Axis2 coordinates (begin, end, location) according to those within an external ref.
 o setAxisCoorRef(AxisCoor, int, int)
Sets (or ties) the Axis2 coordinates (begin, end) according to those within an external ref.
 o setAxisLocRef(AxisCoor, int)
Sets the Axis2 location to an external ref.
 o setBeginEnd(int, int)
Sets the beginning and ending screen coordinates of this axis.
 o 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.
 o setBeginEndRelative(double, double, Canvas)
Sets the beginning and ending screen coordinates relative to the width of the specified Canvas width or height.
 o setChanged(boolean)
Sets a flag that this axis property has changed.
 o setExtIndex(String, int)
Sets the coordinate "begin", "end", or "location" and its index ID in the external coordinate reference object.
 o setExtVRef(FloatRange)
Specifies a FloatRange obj ref which contains the beginning and ending values onthis axis.
 o setLocation(int)
Sets the y-coordinate of x-axis or the x-coordinate of y-axis.
 o setLocRelative(Canvas)
Sets the location of this axis in the middle of the specified canvas.
 o setLocRelative(double, Canvas)
Sets the location of this axis relative to the width or height of the specified canvas.
 o setNoOfTicks(int)
Sets the number of ticks on axis.
 o setSigDigits(int)
Sets a new number of significant digits for Labeling.
 o setSpacingValue(double)
Sets the value interval on axis label.
 o setUnit(String)
Sets unit for axis label values.
 o setVBeginEnd(double, double)
Sets the beginning and ending values on this axis.
 o skipBeginLabel(boolean)
Whether to draw the tick and label at Begin coordinate.
 o skipEndLabel(boolean)
Whether to draw the tick and label at End coordinate.

Variables

 o vRange
 protected FloatRange vRange
 o skipEndLabl
 protected boolean skipEndLabl
 o skipBeginLabl
 protected boolean skipBeginLabl
 o noOfTicks
 protected int noOfTicks
 o dV
 protected double dV
 o unit
 protected String unit
 o labelSide
 protected boolean labelSide
 o tickSide
 protected boolean tickSide
 o conversion
 protected Conversion2 conversion
 o format
 protected Format format
 o labelWidth
 protected int labelWidth
 o zeroWidth
 protected int zeroWidth
 o labelDescent
 protected int labelDescent
 o loc
 protected int loc[]
 o refMode
 protected boolean refMode[]

Constructors

 o Axis2
 protected Axis2()

Methods

 o init
 public void init()
 o draw
 public void draw(Graphics g)
 o 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).
 o setSigDigits
 public void setSigDigits(int sigDigits)
Sets a new number of significant digits for Labeling.

Parameters:
sigDigits - the new number of significant digits.
 o skipBeginLabel
 public void skipBeginLabel(boolean skip)
Whether to draw the tick and label at Begin coordinate.

Parameters:
skip - true to skip.
 o skipEndLabel
 public void skipEndLabel(boolean skip)
Whether to draw the tick and label at End coordinate.

Parameters:
skip - true to skip.
 o setSpacingValue
 public void setSpacingValue(double dV)
Sets the value interval on axis label.

Parameters:
dV - value spacing for axis label.
 o setUnit
 public void setUnit(String unit)
Sets unit for axis label values.

Parameters:
unit - to be attached to each label value.
 o resetSpacingValue
 public void resetSpacingValue()
Recalculate the axis interval values, adjust it to the noOfTicks to fill the entire axis from Begin to End.

 o resetNoOfTicks
 public void resetNoOfTicks()
Recalculates the noOfTicks, adjusts it to the the label interval to fill the axis from Begin to End.

 o drawTick
 protected void drawTick(Graphics g,
                         int position)
Draws tick at the specified position of given length. Blank impl.

 o drawLabel
 protected void drawLabel(Graphics g,
                          int position,
                          String label)
Draws label at the specified position using the specified label.

 o setVBeginEnd
 public void setVBeginEnd(double beg,
                          double end)
Sets the beginning and ending values on this axis.

 o setExtVRef
 public void setExtVRef(FloatRange range)
Specifies a FloatRange obj ref which contains the beginning and ending values onthis axis.

See Also:
setVBeginEnd, FloatRange
 o getVBegin
 public double getVBegin()
Returns the Beginning value on this axis.

 o getVEnd
 public double getVEnd()
Returns the ending value on this axis.

 o setBeginEnd
 public void setBeginEnd(int begin,
                         int end)
Sets the beginning and ending screen coordinates of this axis.

 o getBegin
 public int getBegin()
Returns the beginning screen coordinate.

 o 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.
 o getLocation
 public int getLocation()
Returns the screen location of this axis. If x-axis, returns y-coordinate, if y-axis, returns x-coordinate.

 o getRange
 public int getRange()
Returns the end-coordinate minus the begin-coordinate.

Returns:
end-begin.
 o getVRange
 public double getVRange()
Returns the value-at-end minus the value-at-begin.

Returns:
vEnd - vBegin.
 o setChanged
 public void setChanged(boolean changed)
Sets a flag that this axis property has changed.

 o hasChanged
 public boolean hasChanged()
Returns the flag indicating a recent change in this axis.

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.

 o 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.

 o 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.

 o setLocRelative
 public void setLocRelative(Canvas canvas)
Sets the location of this axis in the middle of the specified canvas.

 o findExtAxisCoordinates
 protected void findExtAxisCoordinates()
Finds the axis coordinates from an external reference obj.


All Packages  Class Hierarchy  This Package  Previous  Next  Index