|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.graph.TickVDescriptor
public class TickVDescriptor
A TickVDescriptor describes the position that ticks should be drawn, so that a fairly generic tick drawing routine can be used for multiple types of axes.
Constructor Summary | |
---|---|
protected |
TickVDescriptor()
This constructor is to support the use when tickVDescriptor was internal to DasAxis. |
|
TickVDescriptor(double[] minorTicks,
double[] ticks,
Units units)
|
Method Summary | |
---|---|
static TickVDescriptor |
bestTickVLinear(Datum min,
Datum max,
int nTicksMin,
int nTicksMax,
boolean fin)
return a set of linear ticks, within the given constraints. |
static TickVDescriptor |
bestTickVLogNew(Datum minD,
Datum maxD,
int nTicksMin,
int nTicksMax,
boolean fin)
return a set of log ticks, within the given constraints. |
static TickVDescriptor |
bestTickVTime(Datum minD,
Datum maxD,
int nTicksMin,
int nTicksMax,
boolean fin)
|
static TickVDescriptor |
bestTickVTimeOrdinal(Datum minD,
Datum maxD,
int nTicksMin,
int nTicksMax,
boolean fin)
return a set of ticks counting off ordinal time ranges, such as months, years, days, etc. |
DatumRange |
enclosingRange(DatumRange dr,
boolean minor)
Defining method for getting the range close to the given range, but containing at least one minor(or major) tick interval. |
Datum |
findTick(Datum xDatum,
double direction,
boolean minor)
Locates the next or previous tick starting at xDatum. |
DatumFormatter |
getFormatter()
|
DatumVector |
getMajorTicks()
|
DatumVector |
getMinorTicks()
|
static TickVDescriptor |
newTickVDescriptor(DatumVector majorTicks,
DatumVector minorTicks)
|
static TickVDescriptor |
newTickVDescriptor(java.util.List majorTicks,
java.util.List minorTicks)
creates descriptor with two Lists containing Datums. |
void |
setFormatter(DatumFormatter datumFormatter)
|
java.lang.String |
toString()
Returns a String representation of the TickVDescriptor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected TickVDescriptor()
public TickVDescriptor(double[] minorTicks, double[] ticks, Units units)
Method Detail |
---|
public static TickVDescriptor newTickVDescriptor(DatumVector majorTicks, DatumVector minorTicks)
public static TickVDescriptor newTickVDescriptor(java.util.List majorTicks, java.util.List minorTicks)
public DatumVector getMajorTicks()
public DatumVector getMinorTicks()
public DatumFormatter getFormatter()
public Datum findTick(Datum xDatum, double direction, boolean minor)
xDatum
- find the tick closest to this.direction
- -1 previous, 1 next, 0 closestminor
- find closest minor tick, major if false.
public DatumRange enclosingRange(DatumRange dr, boolean minor)
minor
- find the range from the minor ticks.public void setFormatter(DatumFormatter datumFormatter)
public java.lang.String toString()
toString
in class java.lang.Object
public static TickVDescriptor bestTickVLinear(Datum min, Datum max, int nTicksMin, int nTicksMax, boolean fin)
public static TickVDescriptor bestTickVLogNew(Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin)
public static TickVDescriptor bestTickVTimeOrdinal(Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin)
public static TickVDescriptor bestTickVTime(Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |