|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.rit.numeric.plot.Axis
edu.rit.numeric.plot.NumericalAxis
edu.rit.numeric.plot.LinearAxis
public class LinearAxis
Class LinearAxis provides a linear axis on a plot. The axis goes from a starting value to an ending value in a linear fashion.
| Field Summary |
|---|
| Fields inherited from class edu.rit.numeric.plot.NumericalAxis |
|---|
myTicksAboveOrRight, myTicksBelowOrLeft |
| Fields inherited from class edu.rit.numeric.plot.Axis |
|---|
DEFAULT_PAINT, DEFAULT_STROKE, myLength, myPaint, myStroke |
| Constructor Summary | |
|---|---|
LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength)
Construct a new linear axis. |
|
LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength,
Stroke theStroke,
Paint thePaint)
Construct a new linear axis. |
|
LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength,
Stroke theStroke,
Paint thePaint,
Ticks theTicksBelowOrLeft,
Ticks theTicksAboveOrRight)
Construct a new linear axis. |
|
LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength,
Ticks theTicksBelowOrLeft,
Ticks theTicksAboveOrRight)
Construct a new linear axis. |
|
| Method Summary | |
|---|---|
double |
getCrossing()
Returns the value of the point where the perpendicular axis crosses this axis. |
double |
getDisplayDistance(double value)
Returns the distance on the display from the start of this axis to the given value. |
double |
getEnd()
Returns the ending value of this axis. |
double |
getMajorDivision(int i)
Returns the value of the given major division. |
int |
getMajorDivisionCount()
Returns the number of major divisions on this axis. |
double |
getMinorDivision(int i)
Returns the value of the given minor division. |
int |
getMinorDivisionCount()
Returns the number of minor divisions on this axis. |
double |
getStart()
Returns the starting value of this axis. |
boolean |
includesValue(double value)
Returns true if the given value falls within the bounds of this axis, false otherwise. |
| Methods inherited from class edu.rit.numeric.plot.NumericalAxis |
|---|
drawHorizontal, drawVertical, getTicksAboveOrRight, getTicksBelowOrLeft |
| Methods inherited from class edu.rit.numeric.plot.Axis |
|---|
autoscale, getLength, getPaint, getStroke |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength)
theStart - Starting value for this axis.theEnd - Ending value for this axis. It can be greater than or less than
theStart.theMajorDivisionCount - Number of major divisions for this axis.theMinorDivisionCount - Number of minor divisions per major division for this axis.theCrossing - Point at which the perpendicular axis crosses this axis.theLength - Length of this axis on the display.
IllegalArgumentException - (unchecked exception) Thrown if theStart equals
theEnd. Thrown if theMajorDivisionCount is less
than 1. Thrown if theMinorDivisionCount is less than 1.
Thrown if theCrossing does not fall between
theStart and theEnd inclusive. Thrown if
theLength is less than or equal to 0.
public LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength,
Stroke theStroke,
Paint thePaint)
theStart - Starting value for this axis.theEnd - Ending value for this axis. It can be greater than or less than
theStart.theMajorDivisionCount - Number of major divisions for this axis.theMinorDivisionCount - Number of minor divisions per major division for this axis.theCrossing - Point at which the perpendicular axis crosses this axis.theLength - Length of this axis on the display.theStroke - Stroke for drawing this axis on the display.thePaint - Paint for drawing this axis on the display.
NullPointerException - (unchecked exception) Thrown if theStroke is null or
thePaint is null.
IllegalArgumentException - (unchecked exception) Thrown if theStart equals
theEnd. Thrown if theMajorDivisionCount is less
than 1. Thrown if theMinorDivisionCount is less than 1.
Thrown if theCrossing does not fall between
theStart and theEnd inclusive. Thrown if
theLength is less than or equal to 0.
public LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength,
Ticks theTicksBelowOrLeft,
Ticks theTicksAboveOrRight)
theStart - Starting value for this axis.theEnd - Ending value for this axis. It can be greater than or less than
theStart.theMajorDivisionCount - Number of major divisions for this axis.theMinorDivisionCount - Number of minor divisions per major division for this axis.theCrossing - Point at which the perpendicular axis crosses this axis.theLength - Length of this axis on the display.theTicksBelowOrLeft - Ticks to draw below or to the left of the axis (for a horizontal or
vertical axis, respectively). If null, no ticks are drawn below or to
the left.theTicksAboveOrRight - Ticks to draw above or to the right of the axis (for a horizontal or
vertical axis, respectively). If null, no ticks are drawn above or to
the right.
IllegalArgumentException - (unchecked exception) Thrown if theStart equals
theEnd. Thrown if theMajorDivisionCount is less
than 1. Thrown if theMinorDivisionCount is less than 1.
Thrown if theCrossing does not fall between
theStart and theEnd inclusive. Thrown if
theLength is less than or equal to 0.
public LinearAxis(double theStart,
double theEnd,
int theMajorDivisionCount,
int theMinorDivisionCount,
double theCrossing,
double theLength,
Stroke theStroke,
Paint thePaint,
Ticks theTicksBelowOrLeft,
Ticks theTicksAboveOrRight)
theStart - Starting value for this axis.theEnd - Ending value for this axis. It can be greater than or less than
theStart.theMajorDivisionCount - Number of major divisions for this axis.theMinorDivisionCount - Number of minor divisions per major division for this axis.theCrossing - Point at which the perpendicular axis crosses this axis.theLength - Length of this axis on the display.theStroke - Stroke for drawing this axis on the display.thePaint - Paint for drawing this axis on the display.theTicksBelowOrLeft - Ticks to draw below or to the left of the axis (for a horizontal or
vertical axis, respectively). If null, no ticks are drawn below or to
the left.theTicksAboveOrRight - Ticks to draw above or to the right of the axis (for a horizontal or
vertical axis, respectively). If null, no ticks are drawn above or to
the right.
NullPointerException - (unchecked exception) Thrown if theStroke is null or
thePaint is null.
IllegalArgumentException - (unchecked exception) Thrown if theStart equals
theEnd. Thrown if theMajorDivisionCount is less
than 1. Thrown if theMinorDivisionCount is less than 1.
Thrown if theCrossing does not fall between
theStart and theEnd inclusive. Thrown if
theLength is less than or equal to 0.| Method Detail |
|---|
public double getStart()
getStart in class NumericalAxispublic double getEnd()
getEnd in class NumericalAxispublic boolean includesValue(double value)
includesValue in class NumericalAxispublic double getDisplayDistance(double value)
getDisplayDistance in class NumericalAxispublic int getMajorDivisionCount()
getMajorDivisionCount in class NumericalAxispublic double getMajorDivision(int i)
getMajorDivision in class NumericalAxisi - Major division index in the range 0 ..
getMajorDivisionCount().public int getMinorDivisionCount()
getMinorDivisionCount in class NumericalAxispublic double getMinorDivision(int i)
getMinorDivision in class NumericalAxisi - Minor division index in the range 0 ..
getMinorDivisionCount().public double getCrossing()
getCrossing in class NumericalAxis
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||