|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.ceryle.util.timeline.TimeScale
public class TimeScale
A subclass of java.util.ArrayList used to store a time scale, including major and minor tick marks and the major tick labels. TimeScale is the binding between date/time values and pixels, and contains the conversion methods getOffsetFromDate(Date) and getDateFromOffset(int).
This class is for use with TimeLine,
which populates a TimeScale with null values for minor ticks and Strings
acting as the major tick labels. The major and minor tick fields (ie., which
date unit) are found in TimeLine:
NOTE: TimeLine.FIELD_WEEK is not used as a major or minor TimeScale field.
TimeLine,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
TimeScale(int majorScaleIndex,
int minorScaleIndex)
Constructs an empty TimeScale with major and minor scale indices majorScaleIndex and minorScaleIndex (resp.). |
|
TimeScale(int majorScaleIndex,
int minorScaleIndex,
Collection c)
Constructs a TimeScale with major and minor scale indices majorScaleIndex and minorScaleIndex (resp.) from the elements of the Collection c, in the order they are returned by the collection's iterator. |
|
TimeScale(int majorScaleIndex,
int minorScaleIndex,
int count)
Constructs an empty TimeScale with major and minor scale indices majorScaleIndex and minorScaleIndex (resp.), with an initial number of minor ticks count. |
|
| Method Summary | |
|---|---|
int |
getLength()
Returns the length in pixels of this TimeScale based upon the current value of pixels/tick. |
int |
getMajorScaleIndex()
Returns the major scale index for this TimeScale (TimeLine.FIELD_CENTURY through TimeLine.FIELD_SECOND). |
int |
getMinorScaleIndex()
Returns the minor scale index for this TimeScale (TimeLine.FIELD_CENTURY through TimeLine.FIELD_SECOND). |
int |
getPixelsPerTick()
Returns the pixels/tick of this TimeScale. |
void |
setPixelsPerTick(int pixelsPerTick)
Sets the pixels/tick of this TimeScale. |
String |
toString()
Overrides the toString() method of java.util.AbstractCollection in providing a string representation of this TimeScale. |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public TimeScale(int majorScaleIndex,
int minorScaleIndex)
public TimeScale(int majorScaleIndex,
int minorScaleIndex,
Collection c)
public TimeScale(int majorScaleIndex,
int minorScaleIndex,
int count)
| Method Detail |
|---|
public int getMajorScaleIndex()
public int getMinorScaleIndex()
public void setPixelsPerTick(int pixelsPerTick)
throws ProcessException
ProcessException - if the provided value is out of rangepublic int getPixelsPerTick()
public int getLength()
public String toString()
toString in class AbstractCollection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||