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


java.lang.Object
   org.jfree.chart.block.AbstractBlock

All known Subclasses:   org.jfree.chart.title.Title,  org.jfree.chart.block.ColorBlock,  org.jfree.chart.block.LabelBlock,  org.jfree.chart.block.EmptyBlock,  org.jfree.chart.block.BlockContainer,  org.jfree.chart.title.LegendGraphic,
AbstractBlock
public class AbstractBlock implements Cloneable,Serializable(Code)
A convenience class for creating new classes that implement the Block interface.



Constructor Summary
protected  AbstractBlock()
     Creates a new block.

Method Summary
public  Size2Darrange(Graphics2D g2)
     Arranges the contents of the block, with no constraints, and returns the block size.
Parameters:
  g2 - the graphics device.
public  Size2Darrange(Graphics2D g2, RectangleConstraint constraint)
     Arranges the contents of the block, within the given constraints, and returns the block size.
Parameters:
  g2 - the graphics device.
Parameters:
  constraint - the constraint (null not permitted).
protected  doublecalculateTotalHeight(double contentHeight)
     Adds the margin, border and padding to the specified content height.
Parameters:
  contentHeight - the content height.
protected  doublecalculateTotalWidth(double contentWidth)
     Adds the margin, border and padding to the specified content width.
Parameters:
  contentWidth - the content width.
public  Objectclone()
     Returns a clone of this block.
protected  voiddrawBorder(Graphics2D g2, Rectangle2D area)
     Draws the border around the perimeter of the specified area.
public  booleanequals(Object obj)
     Tests this block for equality with an arbitrary object.
Parameters:
  obj - the object (null permitted).
public  BlockBordergetBorder()
     Returns the border.
public  Rectangle2DgetBounds()
     Returns the current bounds of the block.
public  doublegetContentXOffset()
     Returns the x-offset for the content within the block.
public  doublegetContentYOffset()
     Returns the y-offset for the content within the block.
public  BlockFramegetFrame()
     Returns the current frame (border).
public  doublegetHeight()
     Returns the natural height of the block, if this is known in advance. The actual height of the block may be overridden if layout constraints make this necessary.
public  StringgetID()
     Returns the id.
public  RectangleInsetsgetMargin()
     Returns the margin.
public  RectangleInsetsgetPadding()
     Returns the padding.
public  doublegetWidth()
     Returns the natural width of the block, if this is known in advance. The actual width of the block may be overridden if layout constraints make this necessary.
public  voidsetBorder(BlockBorder border)
     Sets the border for the block (use BlockBorder.NONE for no border).
public  voidsetBorder(double top, double left, double bottom, double right)
     Sets a black border with the specified line widths.
public  voidsetBounds(Rectangle2D bounds)
     Sets the bounds of the block.
public  voidsetFrame(BlockFrame frame)
     Sets the frame (or border).
public  voidsetHeight(double height)
     Sets the natural width of the block, if this is known in advance.
public  voidsetID(String id)
     Sets the id for the block.
public  voidsetMargin(RectangleInsets margin)
     Sets the margin (use RectangleInsets.ZERO_INSETS for no padding).
public  voidsetMargin(double top, double left, double bottom, double right)
     Sets the margin.
public  voidsetPadding(RectangleInsets padding)
     Sets the padding (use RectangleInsets.ZERO_INSETS for no padding).
public  voidsetPadding(double top, double left, double bottom, double right)
     Sets the padding.
public  voidsetWidth(double width)
     Sets the natural width of the block, if this is known in advance.
protected  RectangleConstrainttoContentConstraint(RectangleConstraint c)
     Returns a constraint for the content of this block that will result in the bounds of the block matching the specified constraint.
Parameters:
  c - the outer constraint (null not permitted).
protected  Rectangle2DtrimBorder(Rectangle2D area)
     Reduces the specified area by the amount of space consumed by the border.
Parameters:
  area - the area (null not permitted).
protected  Rectangle2DtrimMargin(Rectangle2D area)
     Reduces the specified area by the amount of space consumed by the margin.
Parameters:
  area - the area (null not permitted).
protected  Rectangle2DtrimPadding(Rectangle2D area)
     Reduces the specified area by the amount of space consumed by the padding.
Parameters:
  area - the area (null not permitted).
protected  doubletrimToContentHeight(double fixedHeight)
     Calculate the height available for content after subtracting the margin, border and padding space from the specified fixed height.
Parameters:
  fixedHeight - the fixed height.
protected  doubletrimToContentWidth(double fixedWidth)
     Calculate the width available for content after subtracting the margin, border and padding space from the specified fixed width.
Parameters:
  fixedWidth - the fixed width.


Constructor Detail
AbstractBlock
protected AbstractBlock()(Code)
Creates a new block.




Method Detail
arrange
public Size2D arrange(Graphics2D g2)(Code)
Arranges the contents of the block, with no constraints, and returns the block size.
Parameters:
  g2 - the graphics device. The block size (in Java2D units, never null).



arrange
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint)(Code)
Arranges the contents of the block, within the given constraints, and returns the block size.
Parameters:
  g2 - the graphics device.
Parameters:
  constraint - the constraint (null not permitted). The block size (in Java2D units, never null).



calculateTotalHeight
protected double calculateTotalHeight(double contentHeight)(Code)
Adds the margin, border and padding to the specified content height.
Parameters:
  contentHeight - the content height. The adjusted height.



calculateTotalWidth
protected double calculateTotalWidth(double contentWidth)(Code)
Adds the margin, border and padding to the specified content width.
Parameters:
  contentWidth - the content width. The adjusted width.



clone
public Object clone() throws CloneNotSupportedException(Code)
Returns a clone of this block. A clone.
throws:
  CloneNotSupportedException - if there is a problem creating theclone.



drawBorder
protected void drawBorder(Graphics2D g2, Rectangle2D area)(Code)
Draws the border around the perimeter of the specified area.
Parameters:
  g2 - the graphics device.
Parameters:
  area - the area.



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



getBorder
public BlockBorder getBorder()(Code)
Returns the border. The border (never null).AbstractBlock.getFrame()



getBounds
public Rectangle2D getBounds()(Code)
Returns the current bounds of the block. The bounds.
See Also:   AbstractBlock.setBounds(Rectangle2D)



getContentXOffset
public double getContentXOffset()(Code)
Returns the x-offset for the content within the block. The x-offset.
See Also:   AbstractBlock.getContentYOffset()



getContentYOffset
public double getContentYOffset()(Code)
Returns the y-offset for the content within the block. The y-offset.
See Also:   AbstractBlock.getContentXOffset()



getFrame
public BlockFrame getFrame()(Code)
Returns the current frame (border). The frame.
since:
   1.0.5
See Also:   AbstractBlock.setFrame(BlockFrame)



getHeight
public double getHeight()(Code)
Returns the natural height of the block, if this is known in advance. The actual height of the block may be overridden if layout constraints make this necessary. The height.
See Also:   AbstractBlock.setHeight(double)



getID
public String getID()(Code)
Returns the id. The id (possibly null).
See Also:   AbstractBlock.setID(String)



getMargin
public RectangleInsets getMargin()(Code)
Returns the margin. The margin (never null).
See Also:   AbstractBlock.getMargin()



getPadding
public RectangleInsets getPadding()(Code)
Returns the padding. The padding (never null).
See Also:   AbstractBlock.setPadding(RectangleInsets)



getWidth
public double getWidth()(Code)
Returns the natural width of the block, if this is known in advance. The actual width of the block may be overridden if layout constraints make this necessary. The width.
See Also:   AbstractBlock.setWidth(double)



setBorder
public void setBorder(BlockBorder border)(Code)
Sets the border for the block (use BlockBorder.NONE for no border).
Parameters:
  border - the border (null not permitted).
See Also:   AbstractBlock.getBorder()AbstractBlock.setFrame(BlockFrame)



setBorder
public void setBorder(double top, double left, double bottom, double right)(Code)
Sets a black border with the specified line widths.
Parameters:
  top - the top border line width.
Parameters:
  left - the left border line width.
Parameters:
  bottom - the bottom border line width.
Parameters:
  right - the right border line width.



setBounds
public void setBounds(Rectangle2D bounds)(Code)
Sets the bounds of the block.
Parameters:
  bounds - the bounds (null not permitted).
See Also:   AbstractBlock.getBounds()



setFrame
public void setFrame(BlockFrame frame)(Code)
Sets the frame (or border).
Parameters:
  frame - the frame (null not permitted).
since:
   1.0.5
See Also:   AbstractBlock.getFrame()



setHeight
public void setHeight(double height)(Code)
Sets the natural width of the block, if this is known in advance.
Parameters:
  height - the width (in Java2D units)
See Also:   AbstractBlock.getHeight()



setID
public void setID(String id)(Code)
Sets the id for the block.
Parameters:
  id - the id (null permitted).
See Also:   AbstractBlock.getID()



setMargin
public void setMargin(RectangleInsets margin)(Code)
Sets the margin (use RectangleInsets.ZERO_INSETS for no padding).
Parameters:
  margin - the margin (null not permitted).
See Also:   AbstractBlock.getMargin()



setMargin
public void setMargin(double top, double left, double bottom, double right)(Code)
Sets the margin.
Parameters:
  top - the top margin.
Parameters:
  left - the left margin.
Parameters:
  bottom - the bottom margin.
Parameters:
  right - the right margin.
See Also:   AbstractBlock.getMargin()



setPadding
public void setPadding(RectangleInsets padding)(Code)
Sets the padding (use RectangleInsets.ZERO_INSETS for no padding).
Parameters:
  padding - the padding (null not permitted).
See Also:   AbstractBlock.getPadding()



setPadding
public void setPadding(double top, double left, double bottom, double right)(Code)
Sets the padding.
Parameters:
  top - the top padding.
Parameters:
  left - the left padding.
Parameters:
  bottom - the bottom padding.
Parameters:
  right - the right padding.



setWidth
public void setWidth(double width)(Code)
Sets the natural width of the block, if this is known in advance.
Parameters:
  width - the width (in Java2D units)
See Also:   AbstractBlock.getWidth()



toContentConstraint
protected RectangleConstraint toContentConstraint(RectangleConstraint c)(Code)
Returns a constraint for the content of this block that will result in the bounds of the block matching the specified constraint.
Parameters:
  c - the outer constraint (null not permitted). The content constraint.



trimBorder
protected Rectangle2D trimBorder(Rectangle2D area)(Code)
Reduces the specified area by the amount of space consumed by the border.
Parameters:
  area - the area (null not permitted). The trimmed area.



trimMargin
protected Rectangle2D trimMargin(Rectangle2D area)(Code)
Reduces the specified area by the amount of space consumed by the margin.
Parameters:
  area - the area (null not permitted). The trimmed area.



trimPadding
protected Rectangle2D trimPadding(Rectangle2D area)(Code)
Reduces the specified area by the amount of space consumed by the padding.
Parameters:
  area - the area (null not permitted). The trimmed area.



trimToContentHeight
protected double trimToContentHeight(double fixedHeight)(Code)
Calculate the height available for content after subtracting the margin, border and padding space from the specified fixed height.
Parameters:
  fixedHeight - the fixed height. The available space.
See Also:   AbstractBlock.trimToContentWidth(double)



trimToContentWidth
protected double trimToContentWidth(double fixedWidth)(Code)
Calculate the width available for content after subtracting the margin, border and padding space from the specified fixed width.
Parameters:
  fixedWidth - the fixed width. The available space.
See Also:   AbstractBlock.trimToContentHeight(double)



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.