Java Doc for XYSeries.java in  » Chart » jfreechart » org » jfree » data » xy » 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.data.xy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.data.general.Series
      org.jfree.data.xy.XYSeries

XYSeries
public class XYSeries extends Series implements Cloneable,Serializable(Code)
Represents a sequence of zero or more data items in the form (x, y). By default, items in the series will be sorted into ascending order by x-value, and duplicate x-values are permitted. Both the sorting and duplicate defaults can be changed in the constructor. Y-values can be null to represent missing values.


Field Summary
protected  Listdata
     Storage for the data items in the series.
final static  longserialVersionUID
     For serialization.

Constructor Summary
public  XYSeries(Comparable key)
     Creates a new empty series.
public  XYSeries(Comparable key, boolean autoSort)
     Constructs a new empty series, with the auto-sort flag set as requested, and duplicate values allowed.
public  XYSeries(Comparable key, boolean autoSort, boolean allowDuplicateXValues)
     Constructs a new xy-series that contains no data.

Method Summary
public  voidadd(XYDataItem item)
     Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
public  voidadd(double x, double y)
     Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
public  voidadd(double x, double y, boolean notify)
     Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
public  voidadd(double x, Number y)
     Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
public  voidadd(double x, Number y, boolean notify)
     Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
public  voidadd(Number x, Number y)
     Adds new data to the series and sends a SeriesChangeEvent to all registered listeners.
public  voidadd(Number x, Number y, boolean notify)
     Adds new data to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
public  voidadd(XYDataItem item, boolean notify)
     Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
public  XYDataItemaddOrUpdate(Number x, Number y)
     Adds or updates an item in the series and sends a org.jfree.data.general.SeriesChangeEvent to all registered listeners.
Parameters:
  x - the x-value (null not permitted).
Parameters:
  y - the y-value (null permitted).
public  voidclear()
     Removes all data items from the series.
public  Objectclone()
     Returns a clone of the series.
public  XYSeriescreateCopy(int start, int end)
     Creates a new series by copying a subset of the data in this time series.
Parameters:
  start - the index of the first item to copy.
Parameters:
  end - the index of the last item to copy.
public  voiddelete(int start, int end)
     Deletes a range of items from the series and sends a SeriesChangeEvent to all registered listeners.
public  booleanequals(Object obj)
     Tests this series for equality with an arbitrary object.
Parameters:
  obj - the object to test against for equality (null permitted).
public  booleangetAllowDuplicateXValues()
     Returns a flag that controls whether duplicate x-values are allowed.
public  booleangetAutoSort()
     Returns the flag that controls whether the items in the series are automatically sorted.
public  XYDataItemgetDataItem(int index)
     Return the data item with the specified index.
Parameters:
  index - the index.
public  intgetItemCount()
     Returns the number of items in the series.
public  ListgetItems()
     Returns the list of data items for the series (the list contains XYDataItem objects and is unmodifiable).
public  intgetMaximumItemCount()
     Returns the maximum number of items that will be retained in the series.
public  NumbergetX(int index)
     Returns the x-value at the specified index.
Parameters:
  index - the index (zero-based).
public  NumbergetY(int index)
     Returns the y-value at the specified index.
Parameters:
  index - the index (zero-based).
public  inthashCode()
     Returns a hash code.
public  intindexOf(Number x)
     Returns the index of the item with the specified x-value, or a negative index if the series does not contain an item with that x-value.
public  XYDataItemremove(int index)
     Removes the item at the specified index and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  index - the index.
public  XYDataItemremove(Number x)
     Removes the item with the specified x-value and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  x - the x-value.
public  voidsetMaximumItemCount(int maximum)
     Sets the maximum number of items that will be retained in the series.
public  double[][]toArray()
     Returns a new array containing the x and y values from this series.
public  voidupdate(int index, Number y)
     Updates the value of an item in the series and sends a SeriesChangeEvent to all registered listeners.
public  voidupdate(Number x, Number y)
     Updates an item in the series.
public  voidupdateByIndex(int index, Number y)
     Updates the value of an item in the series and sends a SeriesChangeEvent to all registered listeners.

Field Detail
data
protected List data(Code)
Storage for the data items in the series.



serialVersionUID
final static long serialVersionUID(Code)
For serialization.




Constructor Detail
XYSeries
public XYSeries(Comparable key)(Code)
Creates a new empty series. By default, items added to the series will be sorted into ascending order by x-value, and duplicate x-values will be allowed (these defaults can be modified with another constructor.
Parameters:
  key - the series key (null not permitted).



XYSeries
public XYSeries(Comparable key, boolean autoSort)(Code)
Constructs a new empty series, with the auto-sort flag set as requested, and duplicate values allowed.
Parameters:
  key - the series key (null not permitted).
Parameters:
  autoSort - a flag that controls whether or not the items in the series are sorted.



XYSeries
public XYSeries(Comparable key, boolean autoSort, boolean allowDuplicateXValues)(Code)
Constructs a new xy-series that contains no data. You can specify whether or not duplicate x-values are allowed for the series.
Parameters:
  key - the series key (null not permitted).
Parameters:
  autoSort - a flag that controls whether or not the items in the series are sorted.
Parameters:
  allowDuplicateXValues - a flag that controls whether duplicate x-values are allowed.




Method Detail
add
public void add(XYDataItem item)(Code)
Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  item - the (x, y) item (null not permitted).



add
public void add(double x, double y)(Code)
Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  x - the x value.
Parameters:
  y - the y value.



add
public void add(double x, double y, boolean notify)(Code)
Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
Parameters:
  x - the x value.
Parameters:
  y - the y value.
Parameters:
  notify - a flag that controls whether or not a SeriesChangeEvent is sent to all registered listeners.



add
public void add(double x, Number y)(Code)
Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners. The unusual pairing of parameter types is to make it easier to add null y-values.
Parameters:
  x - the x value.
Parameters:
  y - the y value (null permitted).



add
public void add(double x, Number y, boolean notify)(Code)
Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners. The unusual pairing of parameter types is to make it easier to add null y-values.
Parameters:
  x - the x value.
Parameters:
  y - the y value (null permitted).
Parameters:
  notify - a flag that controls whether or not a SeriesChangeEvent is sent to all registered listeners.



add
public void add(Number x, Number y)(Code)
Adds new data to the series and sends a SeriesChangeEvent to all registered listeners.

Throws an exception if the x-value is a duplicate AND the allowDuplicateXValues flag is false.
Parameters:
  x - the x-value (null not permitted).
Parameters:
  y - the y-value (null permitted).




add
public void add(Number x, Number y, boolean notify)(Code)
Adds new data to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.

Throws an exception if the x-value is a duplicate AND the allowDuplicateXValues flag is false.
Parameters:
  x - the x-value (null not permitted).
Parameters:
  y - the y-value (null permitted).
Parameters:
  notify - a flag the controls whether or not a SeriesChangeEvent is sent to all registered listeners.




add
public void add(XYDataItem item, boolean notify)(Code)
Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
Parameters:
  item - the (x, y) item (null not permitted).
Parameters:
  notify - a flag that controls whether or not a SeriesChangeEvent is sent to all registered listeners.



addOrUpdate
public XYDataItem addOrUpdate(Number x, Number y)(Code)
Adds or updates an item in the series and sends a org.jfree.data.general.SeriesChangeEvent to all registered listeners.
Parameters:
  x - the x-value (null not permitted).
Parameters:
  y - the y-value (null permitted). A copy of the overwritten data item, or null if no item was overwritten.



clear
public void clear()(Code)
Removes all data items from the series.



clone
public Object clone() throws CloneNotSupportedException(Code)
Returns a clone of the series. A clone of the time series.
throws:
  CloneNotSupportedException - if there is a cloning problem.



createCopy
public XYSeries createCopy(int start, int end) throws CloneNotSupportedException(Code)
Creates a new series by copying a subset of the data in this time series.
Parameters:
  start - the index of the first item to copy.
Parameters:
  end - the index of the last item to copy. A series containing a copy of this series from start until end.
throws:
  CloneNotSupportedException - if there is a cloning problem.



delete
public void delete(int start, int end)(Code)
Deletes a range of items from the series and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  start - the start index (zero-based).
Parameters:
  end - the end index (zero-based).



equals
public boolean equals(Object obj)(Code)
Tests this series for equality with an arbitrary object.
Parameters:
  obj - the object to test against for equality (null permitted). A boolean.



getAllowDuplicateXValues
public boolean getAllowDuplicateXValues()(Code)
Returns a flag that controls whether duplicate x-values are allowed. This flag can only be set in the constructor. A boolean.



getAutoSort
public boolean getAutoSort()(Code)
Returns the flag that controls whether the items in the series are automatically sorted. There is no setter for this flag, it must be defined in the series constructor. A boolean.



getDataItem
public XYDataItem getDataItem(int index)(Code)
Return the data item with the specified index.
Parameters:
  index - the index. The data item with the specified index.



getItemCount
public int getItemCount()(Code)
Returns the number of items in the series. The item count.



getItems
public List getItems()(Code)
Returns the list of data items for the series (the list contains XYDataItem objects and is unmodifiable). The list of data items.



getMaximumItemCount
public int getMaximumItemCount()(Code)
Returns the maximum number of items that will be retained in the series. The default value is Integer.MAX_VALUE. The maximum item count.
See Also:   XYSeries.setMaximumItemCount(int)



getX
public Number getX(int index)(Code)
Returns the x-value at the specified index.
Parameters:
  index - the index (zero-based). The x-value (never null).



getY
public Number getY(int index)(Code)
Returns the y-value at the specified index.
Parameters:
  index - the index (zero-based). The y-value (possibly null).



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



indexOf
public int indexOf(Number x)(Code)
Returns the index of the item with the specified x-value, or a negative index if the series does not contain an item with that x-value. Be aware that for an unsorted series, the index is found by iterating through all items in the series.
Parameters:
  x - the x-value (null not permitted). The index.



remove
public XYDataItem remove(int index)(Code)
Removes the item at the specified index and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  index - the index. The item removed.



remove
public XYDataItem remove(Number x)(Code)
Removes the item with the specified x-value and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  x - the x-value. The item removed.



setMaximumItemCount
public void setMaximumItemCount(int maximum)(Code)
Sets the maximum number of items that will be retained in the series. If you add a new item to the series such that the number of items will exceed the maximum item count, then the first element in the series is automatically removed, ensuring that the maximum item count is not exceeded.

Typically this value is set before the series is populated with data, but if it is applied later, it may cause some items to be removed from the series (in which case a SeriesChangeEvent will be sent to all registered listeners.
Parameters:
  maximum - the maximum number of items for the series.




toArray
public double[][] toArray()(Code)
Returns a new array containing the x and y values from this series. A new array containing the x and y values from this series.
since:
   1.0.4



update
public void update(int index, Number y)(Code)
Updates the value of an item in the series and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  index - the item (zero based index).
Parameters:
  y - the new value (null permitted).XYSeries.updateByIndex(int,Number)XYSeries.update(Number,Number)



update
public void update(Number x, Number y)(Code)
Updates an item in the series.
Parameters:
  x - the x-value (null not permitted).
Parameters:
  y - the y-value (null permitted).
throws:
  SeriesException - if there is no existing item with the specifiedx-value.



updateByIndex
public void updateByIndex(int index, Number y)(Code)
Updates the value of an item in the series and sends a SeriesChangeEvent to all registered listeners.
Parameters:
  index - the item (zero based index).
Parameters:
  y - the new value (null permitted).
since:
   1.0.1



Methods inherited from org.jfree.data.general.Series
public void addChangeListener(SeriesChangeListener listener)(Code)(Java Doc)
public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc)
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void firePropertyChange(String property, Object oldValue, Object newValue)(Code)(Java Doc)
public void fireSeriesChanged()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public Comparable getKey()(Code)(Java Doc)
public boolean getNotify()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
protected void notifyListeners(SeriesChangeEvent event)(Code)(Java Doc)
public void removeChangeListener(SeriesChangeListener listener)(Code)(Java Doc)
public void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc)
public void setDescription(String description)(Code)(Java Doc)
public void setKey(Comparable key)(Code)(Java Doc)
public void setNotify(boolean notify)(Code)(Java Doc)

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.