public abstract class AbstractLayout extends Object implements LayoutManager2, Serializable
| Constructor and Description |
|---|
AbstractLayout()
Creates a new AbstractLayout object.
|
AbstractLayout(int hgap,
int vgap)
Creates a new AbstractLayout object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(Component comp,
Object constraints)
Add the specified component from the layout.
|
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component with the specified name to the layout.
|
int |
getHgap()
Get the horizontal gap between components.
|
float |
getLayoutAlignmentX(Container parent)
Returns the alignment along the x axis.
|
float |
getLayoutAlignmentY(Container parent)
Returns the alignment along the y axis.
|
int |
getVgap()
Get the vertical gap between components.
|
void |
invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached
information it should be discarded.
|
Dimension |
maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the component in the
specified target container.
|
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout.
|
void |
setHgap(int gap)
Set the horizontal gap between components.
|
void |
setVgap(int gap)
Set the vertical gap between components.
|
String |
toString()
Return a string representation of the layout manager
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlayoutContainer, minimumLayoutSize, preferredLayoutSizepublic AbstractLayout()
public AbstractLayout(int hgap,
int vgap)
hgap - DOCUMENT ME!vgap - DOCUMENT ME!public int getHgap()
public int getVgap()
public void setHgap(int gap)
gap - The horizontal gap to be setpublic void setVgap(int gap)
gap - The vertical gap to be setpublic Dimension maximumLayoutSize(Container target)
maximumLayoutSize in interface LayoutManager2target - The component which needs to be laid outpublic float getLayoutAlignmentX(Container parent)
getLayoutAlignmentX in interface LayoutManager2public float getLayoutAlignmentY(Container parent)
getLayoutAlignmentY in interface LayoutManager2public void invalidateLayout(Container target)
invalidateLayout in interface LayoutManager2public void addLayoutComponent(String name, Component comp)
addLayoutComponent in interface LayoutManagername - The name of the componentcomp - The component to be addedpublic void addLayoutComponent(Component comp, Object constraints)
addLayoutComponent in interface LayoutManager2comp - The component to be addedconstraints - The constraints to apply when laying out.public void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagercomp - the component to be removedCopyright © 2021. All rights reserved.