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


org.jfree.chart.renderer.xy.AbstractXYItemRenderer
   org.jfree.chart.renderer.xy.XYBarRenderer

All known Subclasses:   org.jfree.chart.renderer.xy.ClusteredXYBarRenderer,  org.jfree.chart.renderer.xy.StackedXYBarRenderer,
XYBarRenderer
public class XYBarRenderer extends AbstractXYItemRenderer implements XYItemRenderer,Cloneable,PublicCloneable,Serializable(Code)
A renderer that draws bars on an XYPlot (requires an IntervalXYDataset ).

Inner Class :protected class XYBarRendererState extends XYItemRendererState


Constructor Summary
public  XYBarRenderer()
     The default constructor.
public  XYBarRenderer(double margin)
     Constructs a new renderer.

Method Summary
public  Objectclone()
     Returns a clone of the renderer.
public  voiddrawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)
     Draws the visual representation of a single data item.
protected  voiddrawItemLabel(Graphics2D g2, XYDataset dataset, int series, int item, XYPlot plot, XYItemLabelGenerator generator, Rectangle2D bar, boolean negative)
     Draws an item label.
public  booleanequals(Object obj)
     Tests this renderer for equality with an arbitrary object.
Parameters:
  obj - the object to test against (null permitted).
public  RangefindDomainBounds(XYDataset dataset)
     Returns the lower and upper bounds (range) of the x-values in the specified dataset.
public  doublegetBase()
     Returns the base value for the bars.
public  GradientPaintTransformergetGradientPaintTransformer()
     Returns the gradient paint transformer (an object used to transform gradient paint objects to fit each bar).
public  ShapegetLegendBar()
     Returns the shape used to represent bars in each legend item.
public  LegendItemgetLegendItem(int datasetIndex, int series)
     Returns a default legend item for the specified series.
public  doublegetMargin()
     Returns the margin which is a percentage amount by which the bars are trimmed.
public  ItemLabelPositiongetNegativeItemLabelPositionFallback()
     Returns the fallback position for negative item labels that don't fit within a bar.
public  ItemLabelPositiongetPositiveItemLabelPositionFallback()
     Returns the fallback position for positive item labels that don't fit within a bar.
public  booleangetUseYInterval()
     Returns a flag that determines whether the y-interval from the dataset is used to calculate the length of each bar.
public  XYItemRendererStateinitialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset dataset, PlotRenderingInfo info)
     Initialises the renderer and returns a state object that should be passed to all subsequent calls to the drawItem() method.
public  booleanisDrawBarOutline()
     Returns a flag that controls whether or not bar outlines are drawn.
public  voidsetBase(double base)
     Sets the base value for the bars and sends a RendererChangeEvent to all registered listeners.
public  voidsetDrawBarOutline(boolean draw)
     Sets the flag that controls whether or not bar outlines are drawn and sends a RendererChangeEvent to all registered listeners.
public  voidsetGradientPaintTransformer(GradientPaintTransformer transformer)
     Sets the gradient paint transformer and sends a RendererChangeEvent to all registered listeners.
public  voidsetLegendBar(Shape bar)
     Sets the shape used to represent bars in each legend item and sends a RendererChangeEvent to all registered listeners.
public  voidsetMargin(double margin)
     Sets the percentage amount by which the bars are trimmed and sends a RendererChangeEvent to all registered listeners.
public  voidsetNegativeItemLabelPositionFallback(ItemLabelPosition position)
     Sets the fallback position for negative item labels that don't fit within a bar, and sends a RendererChangeEvent to all registered listeners.
public  voidsetPositiveItemLabelPositionFallback(ItemLabelPosition position)
     Sets the fallback position for positive item labels that don't fit within a bar, and sends a RendererChangeEvent to all registered listeners.
public  voidsetUseYInterval(boolean use)
     Sets the flag that determines whether the y-interval from the dataset is used to calculate the length of each bar, and sends a RendererChangeEvent to all registered listeners.


Constructor Detail
XYBarRenderer
public XYBarRenderer()(Code)
The default constructor.



XYBarRenderer
public XYBarRenderer(double margin)(Code)
Constructs a new renderer.
Parameters:
  margin - the percentage amount to trim from the width of each bar.




Method Detail
clone
public Object clone() throws CloneNotSupportedException(Code)
Returns a clone of the renderer. A clone.
throws:
  CloneNotSupportedException - if the renderer cannot be cloned.



drawItem
public void drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)(Code)
Draws the visual representation of a single data item.
Parameters:
  g2 - the graphics device.
Parameters:
  state - the renderer state.
Parameters:
  dataArea - the area within which the plot is being drawn.
Parameters:
  info - collects information about the drawing.
Parameters:
  plot - the plot (can be used to obtain standard color information etc).
Parameters:
  domainAxis - the domain axis.
Parameters:
  rangeAxis - the range axis.
Parameters:
  dataset - the dataset.
Parameters:
  series - the series index (zero-based).
Parameters:
  item - the item index (zero-based).
Parameters:
  crosshairState - crosshair information for the plot (null permitted).
Parameters:
  pass - the pass index.



drawItemLabel
protected void drawItemLabel(Graphics2D g2, XYDataset dataset, int series, int item, XYPlot plot, XYItemLabelGenerator generator, Rectangle2D bar, boolean negative)(Code)
Draws an item label. This method is overridden so that the bar can be used to calculate the label anchor point.
Parameters:
  g2 - the graphics device.
Parameters:
  dataset - the dataset.
Parameters:
  series - the series index.
Parameters:
  item - the item index.
Parameters:
  plot - the plot.
Parameters:
  generator - the label generator.
Parameters:
  bar - the bar.
Parameters:
  negative - a flag indicating a negative value.



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



findDomainBounds
public Range findDomainBounds(XYDataset dataset)(Code)
Returns the lower and upper bounds (range) of the x-values in the specified dataset. Since this renderer uses the x-interval in the dataset, this is taken into account for the range.
Parameters:
  dataset - the dataset (null permitted). The range (null if the dataset is null or empty).



getBase
public double getBase()(Code)
Returns the base value for the bars. The base value for the bars.
See Also:   XYBarRenderer.setBase(double)



getGradientPaintTransformer
public GradientPaintTransformer getGradientPaintTransformer()(Code)
Returns the gradient paint transformer (an object used to transform gradient paint objects to fit each bar). A transformer (null possible).
See Also:   XYBarRenderer.setGradientPaintTransformer(GradientPaintTransformer)



getLegendBar
public Shape getLegendBar()(Code)
Returns the shape used to represent bars in each legend item. The shape used to represent bars in each legend item (never null).
See Also:   XYBarRenderer.setLegendBar(Shape)



getLegendItem
public LegendItem getLegendItem(int datasetIndex, int series)(Code)
Returns a default legend item for the specified series. Subclasses should override this method to generate customised items.
Parameters:
  datasetIndex - the dataset index (zero-based).
Parameters:
  series - the series index (zero-based). A legend item for the series.



getMargin
public double getMargin()(Code)
Returns the margin which is a percentage amount by which the bars are trimmed. The margin.
See Also:   XYBarRenderer.setMargin(double)



getNegativeItemLabelPositionFallback
public ItemLabelPosition getNegativeItemLabelPositionFallback()(Code)
Returns the fallback position for negative item labels that don't fit within a bar. The fallback position (null possible).
See Also:   XYBarRenderer.setNegativeItemLabelPositionFallback(ItemLabelPosition)
since:
   1.0.2



getPositiveItemLabelPositionFallback
public ItemLabelPosition getPositiveItemLabelPositionFallback()(Code)
Returns the fallback position for positive item labels that don't fit within a bar. The fallback position (null possible).
See Also:   XYBarRenderer.setPositiveItemLabelPositionFallback(ItemLabelPosition)
since:
   1.0.2



getUseYInterval
public boolean getUseYInterval()(Code)
Returns a flag that determines whether the y-interval from the dataset is used to calculate the length of each bar. A boolean.
See Also:   XYBarRenderer.setUseYInterval(boolean)



initialise
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset dataset, PlotRenderingInfo info)(Code)
Initialises the renderer and returns a state object that should be passed to all subsequent calls to the drawItem() method. Here we calculate the Java2D y-coordinate for zero, since all the bars have their bases fixed at zero.
Parameters:
  g2 - the graphics device.
Parameters:
  dataArea - the area inside the axes.
Parameters:
  plot - the plot.
Parameters:
  dataset - the data.
Parameters:
  info - an optional info collection object to return data back to the caller. A state object.



isDrawBarOutline
public boolean isDrawBarOutline()(Code)
Returns a flag that controls whether or not bar outlines are drawn. A boolean.
See Also:   XYBarRenderer.setDrawBarOutline(boolean)



setBase
public void setBase(double base)(Code)
Sets the base value for the bars and sends a RendererChangeEvent to all registered listeners. The base value is not used if the dataset's y-interval is being used to determine the bar length.
Parameters:
  base - the new base value.
See Also:   XYBarRenderer.getBase()
See Also:   XYBarRenderer.getUseYInterval()



setDrawBarOutline
public void setDrawBarOutline(boolean draw)(Code)
Sets the flag that controls whether or not bar outlines are drawn and sends a RendererChangeEvent to all registered listeners.
Parameters:
  draw - the flag.
See Also:   XYBarRenderer.isDrawBarOutline()



setGradientPaintTransformer
public void setGradientPaintTransformer(GradientPaintTransformer transformer)(Code)
Sets the gradient paint transformer and sends a RendererChangeEvent to all registered listeners.
Parameters:
  transformer - the transformer (null permitted).
See Also:   XYBarRenderer.getGradientPaintTransformer()



setLegendBar
public void setLegendBar(Shape bar)(Code)
Sets the shape used to represent bars in each legend item and sends a RendererChangeEvent to all registered listeners.
Parameters:
  bar - the bar shape (null not permitted).
See Also:   XYBarRenderer.getLegendBar()



setMargin
public void setMargin(double margin)(Code)
Sets the percentage amount by which the bars are trimmed and sends a RendererChangeEvent to all registered listeners.
Parameters:
  margin - the new margin.
See Also:   XYBarRenderer.getMargin()



setNegativeItemLabelPositionFallback
public void setNegativeItemLabelPositionFallback(ItemLabelPosition position)(Code)
Sets the fallback position for negative item labels that don't fit within a bar, and sends a RendererChangeEvent to all registered listeners.
Parameters:
  position - the position (null permitted).
See Also:   XYBarRenderer.getNegativeItemLabelPositionFallback()
since:
   1.0.2



setPositiveItemLabelPositionFallback
public void setPositiveItemLabelPositionFallback(ItemLabelPosition position)(Code)
Sets the fallback position for positive item labels that don't fit within a bar, and sends a RendererChangeEvent to all registered listeners.
Parameters:
  position - the position (null permitted).
See Also:   XYBarRenderer.getPositiveItemLabelPositionFallback()
since:
   1.0.2



setUseYInterval
public void setUseYInterval(boolean use)(Code)
Sets the flag that determines whether the y-interval from the dataset is used to calculate the length of each bar, and sends a RendererChangeEvent to all registered listeners.
Parameters:
  use - the flag.
See Also:   XYBarRenderer.getUseYInterval()



Methods inherited from org.jfree.chart.renderer.xy.AbstractXYItemRenderer
public void addAnnotation(XYAnnotation annotation)(Code)(Java Doc)
public void addAnnotation(XYAnnotation annotation, Layer layer)(Code)(Java Doc)
protected void addEntity(EntityCollection entities, Shape area, XYDataset dataset, int series, int item, double entityX, double entityY)(Code)(Java Doc)
protected Point2D calculateDomainMarkerTextAnchorPoint(Graphics2D g2, PlotOrientation orientation, Rectangle2D dataArea, Rectangle2D markerArea, RectangleInsets markerOffset, LengthAdjustmentType labelOffsetType, RectangleAnchor anchor)(Code)(Java Doc)
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, Layer layer, PlotRenderingInfo info)(Code)(Java Doc)
public void drawDomainGridLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value)(Code)(Java Doc)
public void drawDomainLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke)(Code)(Java Doc)
public void drawDomainMarker(Graphics2D g2, XYPlot plot, ValueAxis domainAxis, Marker marker, Rectangle2D dataArea)(Code)(Java Doc)
protected void drawItemLabel(Graphics2D g2, PlotOrientation orientation, XYDataset dataset, int series, int item, double x, double y, boolean negative)(Code)(Java Doc)
public void drawRangeLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke)(Code)(Java Doc)
public void drawRangeMarker(Graphics2D g2, XYPlot plot, ValueAxis rangeAxis, Marker marker, Rectangle2D dataArea)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public void fillDomainGridBand(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double start, double end)(Code)(Java Doc)
public void fillRangeGridBand(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double start, double end)(Code)(Java Doc)
public Range findDomainBounds(XYDataset dataset)(Code)(Java Doc)
public Range findRangeBounds(XYDataset dataset)(Code)(Java Doc)
public XYItemLabelGenerator getBaseItemLabelGenerator()(Code)(Java Doc)
public XYToolTipGenerator getBaseToolTipGenerator()(Code)(Java Doc)
public int getDefaultEntityRadius()(Code)(Java Doc)
public DrawingSupplier getDrawingSupplier()(Code)(Java Doc)
public XYItemLabelGenerator getItemLabelGenerator(int series, int item)(Code)(Java Doc)
public XYItemLabelGenerator getItemLabelGenerator()(Code)(Java Doc)
public LegendItem getLegendItem(int datasetIndex, int series)(Code)(Java Doc)
public XYSeriesLabelGenerator getLegendItemLabelGenerator()(Code)(Java Doc)
public XYSeriesLabelGenerator getLegendItemToolTipGenerator()(Code)(Java Doc)
public XYSeriesLabelGenerator getLegendItemURLGenerator()(Code)(Java Doc)
public LegendItemCollection getLegendItems()(Code)(Java Doc)
public int getPassCount()(Code)(Java Doc)
public XYPlot getPlot()(Code)(Java Doc)
public XYItemLabelGenerator getSeriesItemLabelGenerator(int series)(Code)(Java Doc)
public XYToolTipGenerator getSeriesToolTipGenerator(int series)(Code)(Java Doc)
public XYToolTipGenerator getToolTipGenerator(int series, int item)(Code)(Java Doc)
public XYToolTipGenerator getToolTipGenerator()(Code)(Java Doc)
public XYURLGenerator getURLGenerator()(Code)(Java Doc)
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info)(Code)(Java Doc)
public boolean removeAnnotation(XYAnnotation annotation)(Code)(Java Doc)
public void removeAnnotations()(Code)(Java Doc)
public void setBaseItemLabelGenerator(XYItemLabelGenerator generator)(Code)(Java Doc)
public void setBaseToolTipGenerator(XYToolTipGenerator generator)(Code)(Java Doc)
public void setDefaultEntityRadius(int radius)(Code)(Java Doc)
public void setItemLabelGenerator(XYItemLabelGenerator generator)(Code)(Java Doc)
public void setLegendItemLabelGenerator(XYSeriesLabelGenerator generator)(Code)(Java Doc)
public void setLegendItemToolTipGenerator(XYSeriesLabelGenerator generator)(Code)(Java Doc)
public void setLegendItemURLGenerator(XYSeriesLabelGenerator generator)(Code)(Java Doc)
public void setPlot(XYPlot plot)(Code)(Java Doc)
public void setSeriesItemLabelGenerator(int series, XYItemLabelGenerator generator)(Code)(Java Doc)
public void setSeriesToolTipGenerator(int series, XYToolTipGenerator generator)(Code)(Java Doc)
public void setToolTipGenerator(XYToolTipGenerator generator)(Code)(Java Doc)
public void setURLGenerator(XYURLGenerator urlGenerator)(Code)(Java Doc)
protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, double transX, double transY, PlotOrientation orientation)(Code)(Java Doc)
protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation)(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.