Java Doc for SegmentedTimeline.java in  » Chart » jfreechart » org » jfree » chart » axis » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jfreechart » org.jfree.chart.axis 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.chart.axis.SegmentedTimeline

SegmentedTimeline
public class SegmentedTimeline implements Timeline,Cloneable,Serializable(Code)
A Timeline that implements a "segmented" timeline with included, excluded and exception segments.

A Timeline will present a series of values to be used for an axis. Each Timeline must provide transformation methods between domain values and timeline values.

A timeline can be used as parameter to a org.jfree.chart.axis.DateAxis to define the values that this axis supports. This class implements a timeline formed by segments of equal length (ex. days, hours, minutes) where some segments can be included in the timeline and others excluded. Therefore timelines like "working days" or "working hours" can be created where non-working days or non-working hours respectively can be removed from the timeline, and therefore from the axis. This creates a smooth plot with equal separation between all included segments.

Because Timelines were created mainly for Date related axis, values are represented as longs instead of doubles. In this case, the domain value is just the number of milliseconds since January 1, 1970, 00:00:00 GMT as defined by the getTime() method of java.util.Date .

In this class, a segment is defined as a unit of time of fixed length. Examples of segments are: days, hours, minutes, etc. The size of a segment is defined as the number of milliseconds in the segment. Some useful segment sizes are defined as constants in this class: DAY_SEGMENT_SIZE, HOUR_SEGMENT_SIZE, FIFTEEN_MINUTE_SEGMENT_SIZE and MINUTE_SEGMENT_SIZE.

Segments are group together to form a Segment Group. Each Segment Group will contain a number of Segments included and a number of Segments excluded. This Segment Group structure will repeat for the whole timeline.

For example, a working days SegmentedTimeline would be formed by a group of 7 daily segments, where there are 5 included (Monday through Friday) and 2 excluded (Saturday and Sunday) segments.

Following is a diagram that explains the major attributes that define a segment. Each box is one segment and must be of fixed length (ms, second, hour, day, etc).

 start time
 |
 v
 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 ...
 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
 |  |  |  |  |  |EE|EE|  |  |  |  |  |EE|EE|  |  |  |  |  |EE|EE|
 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
 \____________/ \___/            \_/
 \/         |               |
 included   excluded        segment
 segments   segments         size
 \_________  _______/
 \/
 segment group
 
Legend:
<space> = Included segment
EE = Excluded segments in the base timeline

In the example, the following segment attributes are presented:

  • segment size: the size of each segment in ms.
  • start time: the start of the first segment of the first segment group to consider.
  • included segments: the number of segments to include in the group.
  • excluded segments: the number of segments to exclude in the group.

Exception Segments are allowed. These exception segments are defined as segments that would have been in the included segments of the Segment Group, but should be excluded for special reasons. In the previous working days SegmentedTimeline example, holidays would be considered exceptions.

Additionally the startTime, or start of the first Segment of the smallest segment group needs to be defined. This startTime could be relative to January 1, 1970, 00:00:00 GMT or any other date. This creates a point of reference to start counting Segment Groups. For example, for the working days SegmentedTimeline, the startTime could be 00:00:00 GMT of the first Monday after January 1, 1970. In this class, the constant FIRST_MONDAY_AFTER_1900 refers to a reference point of the first Monday of the last century.

A SegmentedTimeline can include a baseTimeline. This combination of timelines allows the creation of more complex timelines. For example, in order to implement a SegmentedTimeline for an intraday stock trading application, where the trading period is defined as 9:00 AM through 4:00 PM Monday through Friday, two SegmentedTimelines are used. The first one (the baseTimeline) would be a working day SegmentedTimeline (daily timeline Monday through Friday). On top of this baseTimeline, a second one is defined that maps the 9:00 AM to 4:00 PM period. Because the baseTimeline defines a timeline of Monday through Friday, the resulting (combined) timeline will expose the period 9:00 AM through 4:00 PM only on Monday through Friday, and will remove all other intermediate intervals.

Two factory methods newMondayThroughFridayTimeline() and newFifteenMinuteTimeline() are provided as examples to create special SegmentedTimelines.
See Also:   org.jfree.chart.axis.DateAxis


Inner Class :public class Segment implements Comparable,Cloneable,Serializable
Inner Class :protected class SegmentRange extends Segment
Inner Class :protected class BaseTimelineSegmentRange extends SegmentRange

Field Summary
final public static  longDAY_SEGMENT_SIZE
     Defines a day segment size in ms.
public static  TimeZoneDEFAULT_TIME_ZONE
     This is the default time zone where the application is running.
final public static  longFIFTEEN_MINUTE_SEGMENT_SIZE
     Defines a 15-minute segment size in ms.
public static  longFIRST_MONDAY_AFTER_1900
     Utility constant that defines the startTime as the first monday after 1/1/1970.
final public static  longHOUR_SEGMENT_SIZE
     Defines a one hour segment size in ms.
final public static  longMINUTE_SEGMENT_SIZE
     Defines a one-minute segment size in ms.
public static  TimeZoneNO_DST_TIME_ZONE
     Utility TimeZone object that has no DST and an offset equal to the default TimeZone.

Constructor Summary
public  SegmentedTimeline(long segmentSize, int segmentsIncluded, int segmentsExcluded)
     Constructs a new segmented timeline, optionaly using another segmented timeline as its base.

Method Summary
public  voidaddBaseTimelineException(long domainValue)
     Adds a segment relative to the baseTimeline as an exception.
public  voidaddBaseTimelineException(Date date)
     Adds a segment relative to the baseTimeline as an exception.
public  voidaddBaseTimelineExclusions(long fromBaseDomainValue, long toBaseDomainValue)
     Adds all excluded segments from the BaseTimeline as exceptions to our timeline.
public  voidaddException(long millisecond)
     Adds a segment as an exception.
public  voidaddException(long fromDomainValue, long toDomainValue)
     Adds a segment range as an exception.
public  voidaddException(Date exceptionDate)
     Adds a segment as an exception.
public  voidaddExceptions(List exceptionList)
     Adds a list of dates as segment exceptions.
public  Objectclone()
     Returns a clone of the timeline.
public  booleancontainsDomainRange(long domainValueStart, long domainValueEnd)
     Returns true if a range of values are contained in the timeline.
public  booleancontainsDomainRange(Date dateDomainValueStart, Date dateDomainValueEnd)
     Returns true if a range of values are contained in the timeline.
public  booleancontainsDomainValue(long millisecond)
     Returns true if a value is contained in the timeline.
Parameters:
  millisecond - the value to verify.
public  booleancontainsDomainValue(Date date)
     Returns true if a value is contained in the timeline.
public  booleanequals(Object o)
    
public  booleangetAdjustForDaylightSaving()
     Returns the flag that controls whether or not the daylight saving adjustment is applied.
public  SegmentedTimelinegetBaseTimeline()
     Returns our baseTimeline, or null if none.
public  DategetDate(long value)
     Converts a millisecond value into a Date object.
Parameters:
  value - the millisecond value.
public  longgetExceptionSegmentCount(long fromMillisecond, long toMillisecond)
     Returns the number of exception segments wholly contained in the (fromDomainValue, toDomainValue) interval.
Parameters:
  fromMillisecond - the beginning of the interval.
Parameters:
  toMillisecond - the end of the interval.
public  ListgetExceptionSegments()
     Returns a list of all the exception segments.
public  intgetGroupSegmentCount()
     Returns the number of segments in a segment group.
public  SegmentgetSegment(long millisecond)
     Returns a segment that contains a domainValue.
public  SegmentgetSegment(Date date)
     Returns a segment that contains a date.
public  longgetSegmentSize()
     Returns the size of one segment in ms.
public  intgetSegmentsExcluded()
     Returns the number of segments excluded per segment group.
public  longgetSegmentsExcludedSize()
     Returns the size in milliseconds of the segments excluded per segment group.
public  longgetSegmentsGroupSize()
     Returns the size in milliseconds of a segment group.
public  intgetSegmentsIncluded()
     Returns the number of segments included per segment group.
public  longgetSegmentsIncludedSize()
     Returns the size in ms of the segments included per segment group.
public  longgetStartTime()
     Returns the start time for the timeline.
public  longgetTime(Date date)
     Special method that handles conversion between the Default Time Zone and a UTC time zone with no DST.
public  longgetTimeFromLong(long date)
     Converts a date/time value to take account of daylight savings time.
Parameters:
  date - the milliseconds.
public  inthashCode()
     Returns a hash code for this object.
public static  SegmentedTimelinenewFifteenMinuteTimeline()
     Factory method to create a 15-min, 9:00 AM thought 4:00 PM, Monday through Friday SegmentedTimeline.

This timeline uses a segmentSize of FIFTEEN_MIN_SEGMENT_SIZE.

public static  SegmentedTimelinenewMondayThroughFridayTimeline()
     Factory method to create a Monday through Friday SegmentedTimeline.
public  voidsetAdjustForDaylightSaving(boolean adjust)
     Sets the flag that controls whether or not the daylight saving adjustment is applied.
public  voidsetBaseTimeline(SegmentedTimeline baseTimeline)
     Sets the base timeline.
public  voidsetExceptionSegments(List exceptionSegments)
     Sets the exception segments list.
public  voidsetStartTime(long millisecond)
     Sets the start time for the timeline.
public  longtoMillisecond(long timelineValue)
     Translates a value relative to the timeline into a millisecond.
Parameters:
  timelineValue - the timeline value (in milliseconds).
public  longtoTimelineValue(long millisecond)
     Translates a value relative to the domain value (all Dates) into a value relative to the segmented timeline.
public  longtoTimelineValue(Date date)
     Translates a date into a value relative to the segmented timeline.

Field Detail
DAY_SEGMENT_SIZE
final public static long DAY_SEGMENT_SIZE(Code)
Defines a day segment size in ms.



DEFAULT_TIME_ZONE
public static TimeZone DEFAULT_TIME_ZONE(Code)
This is the default time zone where the application is running. See getTime() below where we make use of certain transformations between times in the default time zone and the no-dst time zone used for our calculations.



FIFTEEN_MINUTE_SEGMENT_SIZE
final public static long FIFTEEN_MINUTE_SEGMENT_SIZE(Code)
Defines a 15-minute segment size in ms.



FIRST_MONDAY_AFTER_1900
public static long FIRST_MONDAY_AFTER_1900(Code)
Utility constant that defines the startTime as the first monday after 1/1/1970. This should be used when creating a SegmentedTimeline for Monday through Friday. See static block below for calculation of this constant.



HOUR_SEGMENT_SIZE
final public static long HOUR_SEGMENT_SIZE(Code)
Defines a one hour segment size in ms.



MINUTE_SEGMENT_SIZE
final public static long MINUTE_SEGMENT_SIZE(Code)
Defines a one-minute segment size in ms.



NO_DST_TIME_ZONE
public static TimeZone NO_DST_TIME_ZONE(Code)
Utility TimeZone object that has no DST and an offset equal to the default TimeZone. This allows easy arithmetic between days as each one will have equal size.




Constructor Detail
SegmentedTimeline
public SegmentedTimeline(long segmentSize, int segmentsIncluded, int segmentsExcluded)(Code)
Constructs a new segmented timeline, optionaly using another segmented timeline as its base. This chaining of SegmentedTimelines allows further segmentation into smaller timelines. If a base
Parameters:
  segmentSize - the size of a segment in ms. This time unit will beused to compute the included and excluded segments of the timeline.
Parameters:
  segmentsIncluded - Number of consecutive segments to include.
Parameters:
  segmentsExcluded - Number of consecutive segments to exclude.




Method Detail
addBaseTimelineException
public void addBaseTimelineException(long domainValue)(Code)
Adds a segment relative to the baseTimeline as an exception. Because a base segment is normally larger than our segments, this may add one or more segment ranges to the exception list.

An exception segment is defined as a segment to exclude from what would otherwise be considered a valid segment of the timeline. An exception segment can not be contained inside an already excluded segment. If so, no action will occur (the proposed exception segment will be discarded).

The segment is identified by a domainValue into any part of the baseTimeline segment.
Parameters:
  domainValue - domain value to teat as a baseTimeline exception.




addBaseTimelineException
public void addBaseTimelineException(Date date)(Code)
Adds a segment relative to the baseTimeline as an exception. An exception segment is defined as a segment to exclude from what would otherwise be considered a valid segment of the timeline. An exception segment can not be contained inside an already excluded segment. If so, no action will occure (the proposed exception segment will be discarded).

The segment is identified by a domainValue into any part of the segment. Therefore the segmentStart <= domainValue <= segmentEnd.
Parameters:
  date - date domain value to treat as a baseTimeline exception




addBaseTimelineExclusions
public void addBaseTimelineExclusions(long fromBaseDomainValue, long toBaseDomainValue)(Code)
Adds all excluded segments from the BaseTimeline as exceptions to our timeline. This allows us to combine two timelines for more complex calculations.
Parameters:
  fromBaseDomainValue - Start of the range where exclusions will be extracted.
Parameters:
  toBaseDomainValue - End of the range to process.



addException
public void addException(long millisecond)(Code)
Adds a segment as an exception. An exception segment is defined as a segment to exclude from what would otherwise be considered a valid segment of the timeline. An exception segment can not be contained inside an already excluded segment. If so, no action will occur (the proposed exception segment will be discarded).

The segment is identified by a domainValue into any part of the segment. Therefore the segmentStart <= domainValue <= segmentEnd.
Parameters:
  millisecond - domain value to treat as an exception




addException
public void addException(long fromDomainValue, long toDomainValue)(Code)
Adds a segment range as an exception. An exception segment is defined as a segment to exclude from what would otherwise be considered a valid segment of the timeline. An exception segment can not be contained inside an already excluded segment. If so, no action will occur (the proposed exception segment will be discarded).

The segment range is identified by a domainValue that begins a valid segment and ends with a domainValue that ends a valid segment. Therefore the range will contain all segments whose segmentStart <= domainValue and segmentEnd <= toDomainValue.
Parameters:
  fromDomainValue - start of domain range to treat as an exception
Parameters:
  toDomainValue - end of domain range to treat as an exception




addException
public void addException(Date exceptionDate)(Code)
Adds a segment as an exception. An exception segment is defined as a segment to exclude from what would otherwise be considered a valid segment of the timeline. An exception segment can not be contained inside an already excluded segment. If so, no action will occur (the proposed exception segment will be discarded).

The segment is identified by a Date into any part of the segment.
Parameters:
  exceptionDate - Date into the segment to exclude.




addExceptions
public void addExceptions(List exceptionList)(Code)
Adds a list of dates as segment exceptions. Each exception segment is defined as a segment to exclude from what would otherwise be considered a valid segment of the timeline. An exception segment can not be contained inside an already excluded segment. If so, no action will occur (the proposed exception segment will be discarded).

The segment is identified by a Date into any part of the segment.
Parameters:
  exceptionList - List of Date objects that identify the segments toexclude.




clone
public Object clone() throws CloneNotSupportedException(Code)
Returns a clone of the timeline. A clone.
throws:
  CloneNotSupportedException - ??.



containsDomainRange
public boolean containsDomainRange(long domainValueStart, long domainValueEnd)(Code)
Returns true if a range of values are contained in the timeline. This is implemented verifying that all segments are in the range.
Parameters:
  domainValueStart - start of the range to verify
Parameters:
  domainValueEnd - end of the range to verify true if the range is contained in the timeline



containsDomainRange
public boolean containsDomainRange(Date dateDomainValueStart, Date dateDomainValueEnd)(Code)
Returns true if a range of values are contained in the timeline. This is implemented verifying that all segments are in the range.
Parameters:
  dateDomainValueStart - start of the range to verify
Parameters:
  dateDomainValueEnd - end of the range to verify true if the range is contained in the timeline



containsDomainValue
public boolean containsDomainValue(long millisecond)(Code)
Returns true if a value is contained in the timeline.
Parameters:
  millisecond - the value to verify. true if value is contained in the timeline.



containsDomainValue
public boolean containsDomainValue(Date date)(Code)
Returns true if a value is contained in the timeline.
Parameters:
  date - date to verify true if value is contained in the timeline



equals
public boolean equals(Object o)(Code)
Returns true if we are equal to the parameter
Parameters:
  o - Object to verify with us true or false



getAdjustForDaylightSaving
public boolean getAdjustForDaylightSaving()(Code)
Returns the flag that controls whether or not the daylight saving adjustment is applied. A boolean.



getBaseTimeline
public SegmentedTimeline getBaseTimeline()(Code)
Returns our baseTimeline, or null if none. The base timeline.



getDate
public Date getDate(long value)(Code)
Converts a millisecond value into a Date object.
Parameters:
  value - the millisecond value. The date.



getExceptionSegmentCount
public long getExceptionSegmentCount(long fromMillisecond, long toMillisecond)(Code)
Returns the number of exception segments wholly contained in the (fromDomainValue, toDomainValue) interval.
Parameters:
  fromMillisecond - the beginning of the interval.
Parameters:
  toMillisecond - the end of the interval. Number of exception segments contained in the interval.



getExceptionSegments
public List getExceptionSegments()(Code)
Returns a list of all the exception segments. This list is not modifiable. The exception segments.



getGroupSegmentCount
public int getGroupSegmentCount()(Code)
Returns the number of segments in a segment group. This will be equal to segments included plus segments excluded. The number of segments.



getSegment
public Segment getSegment(long millisecond)(Code)
Returns a segment that contains a domainValue. If the domainValue is not contained in the timeline (because it is not contained in the baseTimeline), a Segment that contains index + segmentSize*m will be returned for the smallest m possible.
Parameters:
  millisecond - index into the segment A Segment that contains index, or the next possible Segment.



getSegment
public Segment getSegment(Date date)(Code)
Returns a segment that contains a date. For accurate calculations, the calendar should use TIME_ZONE for its calculation (or any other similar time zone). If the date is not contained in the timeline (because it is not contained in the baseTimeline), a Segment that contains date + segmentSize*m will be returned for the smallest m possible.
Parameters:
  date - date into the segment A Segment that contains date, or the next possible Segment.



getSegmentSize
public long getSegmentSize()(Code)
Returns the size of one segment in ms. The segment size in milliseconds.



getSegmentsExcluded
public int getSegmentsExcluded()(Code)
Returns the number of segments excluded per segment group. The number of segments excluded.



getSegmentsExcludedSize
public long getSegmentsExcludedSize()(Code)
Returns the size in milliseconds of the segments excluded per segment group. The size in milliseconds.



getSegmentsGroupSize
public long getSegmentsGroupSize()(Code)
Returns the size in milliseconds of a segment group. This will be equal to size of the segments included plus the size of the segments excluded. The segment group size in milliseconds.



getSegmentsIncluded
public int getSegmentsIncluded()(Code)
Returns the number of segments included per segment group. The number of segments.



getSegmentsIncludedSize
public long getSegmentsIncludedSize()(Code)
Returns the size in ms of the segments included per segment group. The segment size in milliseconds.



getStartTime
public long getStartTime()(Code)
Returns the start time for the timeline. This is the beginning of segment zero. The start time.



getTime
public long getTime(Date date)(Code)
Special method that handles conversion between the Default Time Zone and a UTC time zone with no DST. This is needed so all days have the same size. This method is the prefered way of converting a Data into milliseconds for usage in this class.
Parameters:
  date - Date to convert to long. The milliseconds.



getTimeFromLong
public long getTimeFromLong(long date)(Code)
Converts a date/time value to take account of daylight savings time.
Parameters:
  date - the milliseconds. The milliseconds.



hashCode
public int hashCode()(Code)
Returns a hash code for this object. A hash code.



newFifteenMinuteTimeline
public static SegmentedTimeline newFifteenMinuteTimeline()(Code)
Factory method to create a 15-min, 9:00 AM thought 4:00 PM, Monday through Friday SegmentedTimeline.

This timeline uses a segmentSize of FIFTEEN_MIN_SEGMENT_SIZE. The segment group is defined as 28 included segments (9:00 AM through 4:00 PM) and 68 excluded segments (4:00 PM through 9:00 AM the next day).

In order to exclude Saturdays and Sundays it uses a baseTimeline that only includes Monday through Friday days.

The startTime of the resulting timeline will be 9:00 AM after the startTime of the baseTimeline. This will correspond to 9:00 AM of the first Monday after 1/1/1900. A fully initialized SegmentedTimeline.




newMondayThroughFridayTimeline
public static SegmentedTimeline newMondayThroughFridayTimeline()(Code)
Factory method to create a Monday through Friday SegmentedTimeline.

The startTime of the resulting timeline will be midnight of the first Monday after 1/1/1900. A fully initialized SegmentedTimeline.




setAdjustForDaylightSaving
public void setAdjustForDaylightSaving(boolean adjust)(Code)
Sets the flag that controls whether or not the daylight saving adjustment is applied.
Parameters:
  adjust - the flag.



setBaseTimeline
public void setBaseTimeline(SegmentedTimeline baseTimeline)(Code)
Sets the base timeline.
Parameters:
  baseTimeline - the timeline.



setExceptionSegments
public void setExceptionSegments(List exceptionSegments)(Code)
Sets the exception segments list.
Parameters:
  exceptionSegments - the exception segments.



setStartTime
public void setStartTime(long millisecond)(Code)
Sets the start time for the timeline. This is the beginning of segment zero.
Parameters:
  millisecond - the start time (encoded as in java.util.Date).



toMillisecond
public long toMillisecond(long timelineValue)(Code)
Translates a value relative to the timeline into a millisecond.
Parameters:
  timelineValue - the timeline value (in milliseconds). The domain value (in milliseconds).



toTimelineValue
public long toTimelineValue(long millisecond)(Code)
Translates a value relative to the domain value (all Dates) into a value relative to the segmented timeline. The values relative to the segmented timeline are all consecutives starting at zero at the startTime.
Parameters:
  millisecond - the millisecond (as encoded by java.util.Date). The timeline value.



toTimelineValue
public long toTimelineValue(Date date)(Code)
Translates a date into a value relative to the segmented timeline. The values relative to the segmented timeline are all consecutives starting at zero at the startTime.
Parameters:
  date - date relative to the domain. The timeline value (in milliseconds).



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.