Save This Page
Home » jcommon-1.0.13 » org.jfree » chart » block » [javadoc | source]
org.jfree.chart.block
public class: AbstractBlock [javadoc | source]
java.lang.Object
   org.jfree.chart.block.AbstractBlock

All Implemented Interfaces:
    Cloneable, Serializable

Direct Known Subclasses:
    BlockContainer, TextTitle, Title, ImageTitle, ColorBlock, EmptyBlock, CompositeTitle, LabelBlock, LegendItemBlockContainer, LegendGraphic, ShortTextTitle, PaintScaleLegend, LegendTitle, DateTitle

A convenience class for creating new classes that implement the Block interface.
Constructor:
 protected AbstractBlock() 
Method from org.jfree.chart.block.AbstractBlock Summary:
arrange,   arrange,   calculateTotalHeight,   calculateTotalWidth,   clone,   drawBorder,   equals,   getBorder,   getBounds,   getContentXOffset,   getContentYOffset,   getFrame,   getHeight,   getID,   getMargin,   getPadding,   getWidth,   setBorder,   setBorder,   setBounds,   setFrame,   setHeight,   setID,   setMargin,   setMargin,   setPadding,   setPadding,   setWidth,   toContentConstraint,   trimBorder,   trimMargin,   trimPadding,   trimToContentHeight,   trimToContentWidth
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.chart.block.AbstractBlock Detail:
 public Size2D arrange(Graphics2D g2) 
    Arranges the contents of the block, with no constraints, and returns the block size.
 public Size2D arrange(Graphics2D g2,
    RectangleConstraint constraint) 
    Arranges the contents of the block, within the given constraints, and returns the block size.
 protected double calculateTotalHeight(double contentHeight) 
    Adds the margin, border and padding to the specified content height.
 protected double calculateTotalWidth(double contentWidth) 
    Adds the margin, border and padding to the specified content width.
 public Object clone() throws CloneNotSupportedException 
    Returns a clone of this block.
 protected  void drawBorder(Graphics2D g2,
    Rectangle2D area) 
    Draws the border around the perimeter of the specified area.
 public boolean equals(Object obj) 
    Tests this block for equality with an arbitrary object.
 public BlockBorder getBorder() 
Deprecated! Use - #getFrame() instead.

    Returns the border.
 public Rectangle2D getBounds() 
    Returns the current bounds of the block.
 public double getContentXOffset() 
    Returns the x-offset for the content within the block.
 public double getContentYOffset() 
    Returns the y-offset for the content within the block.
 public BlockFrame getFrame() 
    Returns the current frame (border).
 public double getHeight() 
    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 String getID() 
    Returns the id.
 public RectangleInsets getMargin() 
    Returns the margin.
 public RectangleInsets getPadding() 
    Returns the padding.
 public double getWidth() 
    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  void setBorder(BlockBorder border) 
Deprecated! Use - #setFrame(BlockFrame) instead.

 public  void setBorder(double top,
    double left,
    double bottom,
    double right) 
    Sets a black border with the specified line widths.
 public  void setBounds(Rectangle2D bounds) 
    Sets the bounds of the block.
 public  void setFrame(BlockFrame frame) 
    Sets the frame (or border).
 public  void setHeight(double height) 
    Sets the natural width of the block, if this is known in advance.
 public  void setID(String id) 
    Sets the id for the block.
 public  void setMargin(RectangleInsets margin) 
 public  void setMargin(double top,
    double left,
    double bottom,
    double right) 
    Sets the margin.
 public  void setPadding(RectangleInsets padding) 
 public  void setPadding(double top,
    double left,
    double bottom,
    double right) 
    Sets the padding.
 public  void setWidth(double width) 
    Sets the natural width of the block, if this is known in advance.
 protected RectangleConstraint toContentConstraint(RectangleConstraint c) 
    Returns a constraint for the content of this block that will result in the bounds of the block matching the specified constraint.
 protected Rectangle2D trimBorder(Rectangle2D area) 
    Reduces the specified area by the amount of space consumed by the border.
 protected Rectangle2D trimMargin(Rectangle2D area) 
    Reduces the specified area by the amount of space consumed by the margin.
 protected Rectangle2D trimPadding(Rectangle2D area) 
    Reduces the specified area by the amount of space consumed by the padding.
 protected double trimToContentHeight(double fixedHeight) 
    Calculate the height available for content after subtracting the margin, border and padding space from the specified fixed height.
 protected double trimToContentWidth(double fixedWidth) 
    Calculate the width available for content after subtracting the margin, border and padding space from the specified fixed width.