|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpagelayout.Cell
pagelayout.ComponentCell
public class ComponentCell
ComponentCell is a class
that wraps an object of the type java.awt.Component
in a Cell object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class pagelayout.Cell |
|---|
Cell.Constraint |
| Field Summary | |
|---|---|
protected int |
hgap
|
static int |
HGAP
The default width of the empty strip around vertical edges of the component. |
protected int |
vgap
|
static int |
VGAP
The default height of the empty strip around horizontal edges of the component. |
| Fields inherited from class pagelayout.Cell |
|---|
BASELINE, BOTTOM, boundSpring, CENTER, constraint, filledSizeX, filledSizeY, fixMaxSize, FOUND_NOTREPLACED, FOUND_REPLACED, halign, JUSTIFIED, LEFT, links, MAX, NEWROW, NO_ALIGNMENT, NOT_FOUND, RIGHT, SKIP, TOP, valign |
| Constructor Summary | |
|---|---|
ComponentCell(java.awt.Component component)
Creates the Cell object for a component. |
|
ComponentCell(java.awt.Component component,
int horizontalGap,
int verticalGap)
Creates the Cell object for a component with specified gaps. |
|
| Method Summary | |
|---|---|
void |
addComponentsToContainer(java.awt.Container container)
Add the component wrapped in this cell to the given container. |
BoundSpring |
computeBoundSpring()
Returns the two-dimensional spring associated with this cell. |
Cell |
duplicate(ComponentDuplicator creator)
|
int |
getBaseline()
Returns the baseline of the component wrapped by this cell. |
java.awt.Component |
getComponent()
Returns the component that this object wraps. |
ComponentCell |
getComponentCell()
|
void |
setBaselineOffset(int b)
|
protected void |
setBounds(int x,
int y,
int width,
int height)
Resizes the enclosed component to occupy the specified rectangle of the container with appropriate empty strips around it. |
void |
setComponentGaps(int hgap,
int vgap)
Sets the size of the empty area around all enclosed components. |
java.lang.String |
toString()
Return the string representation of this cell. |
void |
xmlserialize(XMLPrintStream out,
ComponentXMLSerializer xc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int vgap
protected int hgap
public static final int VGAP
public static final int HGAP
| Constructor Detail |
|---|
public ComponentCell(java.awt.Component component)
Cell object for a component.
component - the component to be wrapped in this cell.
public ComponentCell(java.awt.Component component,
int horizontalGap,
int verticalGap)
Cell object for a component with specified gaps.
component - the component to be wrapped in this cell.horizontalGap - the width of the empty strips to be added adjacent to the vertical edges of the component.verticalGap - the height of the empty strips to be added adjacent to the horizontal edges of the component.| Method Detail |
|---|
public void setBaselineOffset(int b)
public java.lang.String toString()
toString in class java.lang.Objectpublic void addComponentsToContainer(java.awt.Container container)
addComponentsToContainer in class Cellcontainer - the container to which the component must be added.
protected void setBounds(int x,
int y,
int width,
int height)
setBounds in class Cellx - the x-coordinate of the top left of the rectangle.y - the y-coordinate of the top left of the rectangle.width - the width of the rectangle.height - the height of the rectangle.public BoundSpring computeBoundSpring()
computeBoundSpring in class Cellpublic java.awt.Component getComponent()
getComponent in class Cell
public void setComponentGaps(int hgap,
int vgap)
setComponentGaps in class Cellhgap - the width of the vertical strips around the vertical edges.vgap - the height of the horizontal strips around the horizontal edges.public int getBaseline()
getBaseline in class CellCell.getBaseline(),
Row.getBaseline(),
Cell.getBaseline()public ComponentCell getComponentCell()
getComponentCell in class Cellpublic Cell duplicate(ComponentDuplicator creator)
duplicate in class Cell
public void xmlserialize(XMLPrintStream out,
ComponentXMLSerializer xc)
xmlserialize in class Cell
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||