public class AbstractBlock extends Object implements Cloneable, Serializable
Block
interface.Modifier and Type | Method and Description |
---|---|
org.jfree.ui.Size2D |
arrange(Graphics2D g2)
Arranges the contents of the block, with no constraints, and returns
the block size.
|
org.jfree.ui.Size2D |
arrange(Graphics2D g2,
RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and
returns the block size.
|
Object |
clone()
Returns a clone of this block.
|
boolean |
equals(Object obj)
Tests this block for equality with an arbitrary object.
|
BlockBorder |
getBorder()
Deprecated.
Use
getFrame() instead. |
Rectangle2D |
getBounds()
Returns the current bounds of the block.
|
double |
getContentXOffset()
Returns the x-offset for the content within the block.
|
double |
getContentYOffset()
Returns the y-offset for the content within the block.
|
BlockFrame |
getFrame()
Returns the current frame (border).
|
double |
getHeight()
Returns the natural height of the block, if this is known in advance.
|
String |
getID()
Returns the id.
|
org.jfree.ui.RectangleInsets |
getMargin()
Returns the margin.
|
org.jfree.ui.RectangleInsets |
getPadding()
Returns the padding.
|
double |
getWidth()
Returns the natural width of the block, if this is known in advance.
|
void |
setBorder(BlockBorder border)
Deprecated.
Use
setFrame(BlockFrame) instead. |
void |
setBorder(double top,
double left,
double bottom,
double right)
Sets a black border with the specified line widths.
|
void |
setBounds(Rectangle2D bounds)
Sets the bounds of the block.
|
void |
setFrame(BlockFrame frame)
Sets the frame (or border).
|
void |
setHeight(double height)
Sets the natural width of the block, if this is known in advance.
|
void |
setID(String id)
Sets the id for the block.
|
void |
setMargin(double top,
double left,
double bottom,
double right)
Sets the margin.
|
void |
setMargin(org.jfree.ui.RectangleInsets margin)
Sets the margin (use
RectangleInsets.ZERO_INSETS for no
padding). |
void |
setPadding(double top,
double left,
double bottom,
double right)
Sets the padding.
|
void |
setPadding(org.jfree.ui.RectangleInsets padding)
Sets the padding (use
RectangleInsets.ZERO_INSETS for no
padding). |
void |
setWidth(double width)
Sets the natural width of the block, if this is known in advance.
|
public String getID()
null
).setID(String)
public void setID(String id)
id
- the id (null
permitted).getID()
public double getWidth()
setWidth(double)
public void setWidth(double width)
width
- the width (in Java2D units)getWidth()
public double getHeight()
setHeight(double)
public void setHeight(double height)
height
- the width (in Java2D units)getHeight()
public org.jfree.ui.RectangleInsets getMargin()
null
).getMargin()
public void setMargin(org.jfree.ui.RectangleInsets margin)
RectangleInsets.ZERO_INSETS
for no
padding).margin
- the margin (null
not permitted).getMargin()
public void setMargin(double top, double left, double bottom, double right)
top
- the top margin.left
- the left margin.bottom
- the bottom margin.right
- the right margin.getMargin()
public BlockBorder getBorder()
getFrame()
instead.null
).public void setBorder(BlockBorder border)
setFrame(BlockFrame)
instead.BlockBorder.NONE
for
no border).border
- the border (null
not permitted).getBorder()
public void setBorder(double top, double left, double bottom, double right)
top
- the top border line width.left
- the left border line width.bottom
- the bottom border line width.right
- the right border line width.public BlockFrame getFrame()
setFrame(BlockFrame)
public void setFrame(BlockFrame frame)
frame
- the frame (null
not permitted).getFrame()
public org.jfree.ui.RectangleInsets getPadding()
null
).setPadding(RectangleInsets)
public void setPadding(org.jfree.ui.RectangleInsets padding)
RectangleInsets.ZERO_INSETS
for no
padding).padding
- the padding (null
not permitted).getPadding()
public void setPadding(double top, double left, double bottom, double right)
top
- the top padding.left
- the left padding.bottom
- the bottom padding.right
- the right padding.public double getContentXOffset()
getContentYOffset()
public double getContentYOffset()
getContentXOffset()
public org.jfree.ui.Size2D arrange(Graphics2D g2)
g2
- the graphics device.null
).public org.jfree.ui.Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
g2
- the graphics device.constraint
- the constraint (null
not permitted).null
).public Rectangle2D getBounds()
setBounds(Rectangle2D)
public void setBounds(Rectangle2D bounds)
bounds
- the bounds (null
not permitted).getBounds()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- if there is a problem creating the
clone.Jas4pp 1.5 © Java Analysis Studio for Particle Physics