Class RigidBoxGroup
java.lang.Object
|
+--AbstractBox
|
+--AbstractRigidBox
|
+--RigidBoxGroup
- All Implemented Interfaces:
- Box, RigidBox
- public class RigidBoxGroup
- extends AbstractRigidBox
A group of rigid boxes. A RigidBoxGroup
is special
because it is a rigid box with child-boxes - it has a insert(Box)
method. It cannot be split (it groups the
child-boxes into an unbreakable unit) and it cannot be resized.
Method Summary |
void |
doLayout(java.awt.Graphics g,
javax.swing.JComponent c,
int w)
Makes the box update it's own width and height, and layout
it's child-boxes. |
void |
drawAt(int x,
int y,
DocumentView v)
Draws the box with it's upper-left corner at (x ,
y ). |
void |
insert(Box b)
Inserts a box into the group |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RigidBoxGroup
public RigidBoxGroup()
insert
public void insert(Box b)
- Inserts a box into the group
- Parameters:
b
- the box to be inserted. The box is added to the end of
the group - it will be drawn to the right of the other boxes in
the group.
drawAt
public void drawAt(int x,
int y,
DocumentView v)
- Description copied from interface:
Box
- Draws the box with it's upper-left corner at (
x
,
y
).
- Overrides:
drawAt
in class AbstractBox
- Following copied from interface:
Box
- Parameters:
v
- the DocumentView
that does the actual
drawing.x
- the x-coordinate of the upper-left corner.x
- the y-coordinate of the upper-left corner.
doLayout
public void doLayout(java.awt.Graphics g,
javax.swing.JComponent c,
int w)
- Description copied from interface:
Box
- Makes the box update it's own width and height, and layout
it's child-boxes.
- Overrides:
doLayout
in class AbstractBox
- Following copied from interface:
Box
- Parameters:
g
- the graphics context. Some boxes, like TextFragments,
need a graphics context before they can determine their width
and height.c
- the component into which the box will be drawn. An
ImageBox needs to know the component to calculate the width
and height.w
- the width available for to the Box.