⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 segmentedtimeline.html

📁 jfreechart最新源代码
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_07) on Fri Aug 25 15:14:34 BST 2006 --><TITLE>SegmentedTimeline (JFreeChart Class Library (version 1.0.2))</TITLE><META NAME="keywords" CONTENT="org.jfree.chart.axis.SegmentedTimeline class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="SegmentedTimeline (JFreeChart Class Library (version 1.0.2))";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SegmentedTimeline.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/jfree/chart/axis/QuarterDateFormat.html" title="class in org.jfree.chart.axis"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.BaseTimelineSegmentRange.html" title="class in org.jfree.chart.axis"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/jfree/chart/axis/SegmentedTimeline.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SegmentedTimeline.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.jfree.chart.axis</FONT><BR>Class SegmentedTimeline</H2><PRE>java.lang.Object  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.jfree.chart.axis.SegmentedTimeline</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable, <A HREF="../../../../org/jfree/chart/axis/Timeline.html" title="interface in org.jfree.chart.axis">Timeline</A></DD></DL><HR><DL><DT><PRE>public class <A HREF="../../../../src-html/org/jfree/chart/axis/SegmentedTimeline.html#line.165"><B>SegmentedTimeline</B></A><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/jfree/chart/axis/Timeline.html" title="interface in org.jfree.chart.axis">Timeline</A>, java.lang.Cloneable, java.io.Serializable</DL></PRE><P>A <A HREF="../../../../org/jfree/chart/axis/Timeline.html" title="interface in org.jfree.chart.axis"><CODE>Timeline</CODE></A> that implements a "segmented" timeline with included,  excluded and exception segments. <P> 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. <P> A timeline can be used as parameter to a  <A HREF="../../../../org/jfree/chart/axis/DateAxis.html" title="class in org.jfree.chart.axis"><CODE>DateAxis</CODE></A> 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. <P> 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 <CODE>Date</CODE>. <P> 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. <P> 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. <P> 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. <P> 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). <p> <pre> 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 </pre> Legend:<br> &lt;space&gt; = Included segment<br> EE      = Excluded segments in the base timeline<br> <p> In the example, the following segment attributes are presented: <ul> <li>segment size: the size of each segment in ms. <li>start time: the start of the first segment of the first segment group to     consider. <li>included segments: the number of segments to include in the group. <li>excluded segments: the number of segments to exclude in the group. </ul> <p> 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. <P> Additionally the <code>startTime</code>, 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 <code>startTime</code> 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. <p> 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. <P> Two factory methods newMondayThroughFridayTimeline() and newFifteenMinuteTimeline() are provided as examples to create special SegmentedTimelines.<P><P><DL><DT><B>Author:</B></DT>  <DD>Bill Kelemen</DD><DT><B>See Also:</B><DD><A HREF="../../../../org/jfree/chart/axis/DateAxis.html" title="class in org.jfree.chart.axis"><CODE>DateAxis</CODE></A>, <A HREF="../../../../serialized-form.html#org.jfree.chart.axis.SegmentedTimeline">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.BaseTimelineSegmentRange.html" title="class in org.jfree.chart.axis">SegmentedTimeline.BaseTimelineSegmentRange</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Special <code>SegmentRange</code> that came from the BaseTimeline.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.Segment.html" title="class in org.jfree.chart.axis">SegmentedTimeline.Segment</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal class to represent a valid segment for this timeline.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.SegmentRange.html" title="class in org.jfree.chart.axis">SegmentedTimeline.SegmentRange</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Private internal class to represent a range of segments.</TD></TR></TABLE>&nbsp;<!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#DAY_SEGMENT_SIZE">DAY_SEGMENT_SIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines a day segment size in ms.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.TimeZone</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#DEFAULT_TIME_ZONE">DEFAULT_TIME_ZONE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the default time zone where the application is running.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#FIFTEEN_MINUTE_SEGMENT_SIZE">FIFTEEN_MINUTE_SEGMENT_SIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines a 15-minute segment size in ms.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#FIRST_MONDAY_AFTER_1900">FIRST_MONDAY_AFTER_1900</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility constant that defines the startTime as the first monday after  1/1/1970.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#HOUR_SEGMENT_SIZE">HOUR_SEGMENT_SIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines a one hour segment size in ms.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#MINUTE_SEGMENT_SIZE">MINUTE_SEGMENT_SIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines a one-minute segment size in ms.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.TimeZone</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jfree/chart/axis/SegmentedTimeline.html#NO_DST_TIME_ZONE">NO_DST_TIME_ZONE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility TimeZone object that has no DST and an offset equal to the  default TimeZone.</TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -