Java Doc for IntervalXYDelegate.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.xy.IntervalXYDelegate

IntervalXYDelegate
public class IntervalXYDelegate implements DatasetChangeListener,DomainInfo,Serializable,Cloneable,PublicCloneable(Code)
A delegate that handles the specification or automatic calculation of the interval surrounding the x-values in a dataset. This is used to extend a regular XYDataset to support the IntervalXYDataset interface.

The decorator pattern was not used because of the several possibly implemented interfaces of the decorated instance (e.g. TableXYDataset , RangeInfo , DomainInfo etc.).

The width can be set manually or calculated automatically. The switch autoWidth allows to determine which behavior is used. The auto width calculation tries to find the smallest gap between two x-values in the dataset. If there is only one item in the series, the auto width calculation fails and falls back on the manually set interval width (which is itself defaulted to 1.0).




Constructor Summary
public  IntervalXYDelegate(XYDataset dataset)
     Creates a new delegate that.
public  IntervalXYDelegate(XYDataset dataset, boolean autoWidth)
     Creates a new delegate for the specified dataset.

Method Summary
public  Objectclone()
    
public  voiddatasetChanged(DatasetChangeEvent e)
     Handles events from the dataset by recalculating the interval if necessary.
public  booleanequals(Object obj)
     Tests the delegate for equality with an arbitrary object.
Parameters:
  obj - the object (null permitted).
public  RangegetDomainBounds(boolean includeInterval)
     Returns the range of the values in the dataset's domain, including or excluding the interval around each x-value as specified.
Parameters:
  includeInterval - a flag that determines whether or not the x-interval should be taken into account.
public  doublegetDomainLowerBound(boolean includeInterval)
     Returns the minimum x-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not thex-interval is taken into account.
public  doublegetDomainUpperBound(boolean includeInterval)
     Returns the maximum x-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not thex-interval is taken into account.
public  NumbergetEndX(int series, int item)
     Returns the end value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index.
public  doublegetEndXValue(int series, int item)
     Returns the end value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index.
public  doublegetFixedIntervalWidth()
     Returns the fixed interval width.
public  doublegetIntervalPositionFactor()
     Returns the interval position factor.
public  doublegetIntervalWidth()
     Returns the interval width.
public  NumbergetStartX(int series, int item)
     Returns the start value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index.
public  doublegetStartXValue(int series, int item)
     Returns the start value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index.
public  booleanisAutoWidth()
     Returns true if the interval width is automatically calculated, and false otherwise.
public  voidsetAutoWidth(boolean b)
     Sets the flag that indicates whether the interval width is automatically calculated.
public  voidsetFixedIntervalWidth(double w)
     Sets the fixed interval width and, as a side effect, sets the autoWidth flag to false.
public  voidsetIntervalPositionFactor(double d)
     Sets the interval position factor.


Constructor Detail
IntervalXYDelegate
public IntervalXYDelegate(XYDataset dataset)(Code)
Creates a new delegate that.
Parameters:
  dataset - the underlying dataset (null not permitted).



IntervalXYDelegate
public IntervalXYDelegate(XYDataset dataset, boolean autoWidth)(Code)
Creates a new delegate for the specified dataset.
Parameters:
  dataset - the underlying dataset (null not permitted).
Parameters:
  autoWidth - a flag that controls whether the interval width is calculated automatically.




Method Detail
clone
public Object clone() throws CloneNotSupportedException(Code)
A clone of this delegate.
throws:
  CloneNotSupportedException - if the object cannot be cloned.



datasetChanged
public void datasetChanged(DatasetChangeEvent e)(Code)
Handles events from the dataset by recalculating the interval if necessary.
Parameters:
  e - the event.



equals
public boolean equals(Object obj)(Code)
Tests the delegate for equality with an arbitrary object.
Parameters:
  obj - the object (null permitted). A boolean.



getDomainBounds
public Range getDomainBounds(boolean includeInterval)(Code)
Returns the range of the values in the dataset's domain, including or excluding the interval around each x-value as specified.
Parameters:
  includeInterval - a flag that determines whether or not the x-interval should be taken into account. The range.



getDomainLowerBound
public double getDomainLowerBound(boolean includeInterval)(Code)
Returns the minimum x-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not thex-interval is taken into account. The minimum value.



getDomainUpperBound
public double getDomainUpperBound(boolean includeInterval)(Code)
Returns the maximum x-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not thex-interval is taken into account. The maximum value.



getEndX
public Number getEndX(int series, int item)(Code)
Returns the end value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index. The end value of the x-interval (possibly null).
See Also:   IntervalXYDelegate.getEndXValue(int,int)



getEndXValue
public double getEndXValue(int series, int item)(Code)
Returns the end value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index. The end value of the x-interval.
See Also:   IntervalXYDelegate.getEndX(int,int)



getFixedIntervalWidth
public double getFixedIntervalWidth()(Code)
Returns the fixed interval width. The fixed interval width.



getIntervalPositionFactor
public double getIntervalPositionFactor()(Code)
Returns the interval position factor. The interval position factor.



getIntervalWidth
public double getIntervalWidth()(Code)
Returns the interval width. This method will return either the auto calculated interval width or the manually specified interval width, depending on the IntervalXYDelegate.isAutoWidth() result. The interval width to use.



getStartX
public Number getStartX(int series, int item)(Code)
Returns the start value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index. The start value of the x-interval (possibly null).
See Also:   IntervalXYDelegate.getStartXValue(int,int)



getStartXValue
public double getStartXValue(int series, int item)(Code)
Returns the start value of the x-interval for an item within a series.
Parameters:
  series - the series index.
Parameters:
  item - the item index. The start value of the x-interval.
See Also:   IntervalXYDelegate.getStartX(int,int)



isAutoWidth
public boolean isAutoWidth()(Code)
Returns true if the interval width is automatically calculated, and false otherwise. A boolean.



setAutoWidth
public void setAutoWidth(boolean b)(Code)
Sets the flag that indicates whether the interval width is automatically calculated. If the flag is set to true, the interval is recalculated.

Note: recalculating the interval amounts to changing the data values represented by the dataset. The calling dataset must fire an appropriate DatasetChangeEvent .
Parameters:
  b - a boolean.




setFixedIntervalWidth
public void setFixedIntervalWidth(double w)(Code)
Sets the fixed interval width and, as a side effect, sets the autoWidth flag to false. Note that changing the interval width amounts to changing the data values represented by the dataset. Therefore, the dataset that is using this delegate is responsible for generating the appropriate DatasetChangeEvent .
Parameters:
  w - the width (negative values not permitted).



setIntervalPositionFactor
public void setIntervalPositionFactor(double d)(Code)
Sets the interval position factor. This controls how the interval is aligned to the x-value. For a value of 0.5, the interval is aligned with the x-value in the center. For a value of 0.0, the interval is aligned with the x-value at the lower end of the interval, and for a value of 1.0, the interval is aligned with the x-value at the upper end of the interval. Note that changing the interval position factor amounts to changing the data values represented by the dataset. Therefore, the dataset that is using this delegate is responsible for generating the appropriate DatasetChangeEvent .
Parameters:
  d - the new interval position factor (in the range 0.0 to 1.0 inclusive).



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.