|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.virion.jam.layouts.CompassLayout
public class CompassLayout
A layout manager similar to BorderLayout but with 8 compass directions. It will layout a container using members named "North", "NorthEast", "East", etc. and "Center".
The "North", "South", "East" and "West" components get layed out according to their preferred sizes and the constraints of the container's size. The "Center" component will get any space left over. The corner components are layed out accordingly
| Constructor Summary | |
|---|---|
CompassLayout()
Constructs a new CompassLayout. |
|
CompassLayout(int hgap,
int vgap)
Constructs a CompassLayout with the specified gaps. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(Component comp,
Object constraints)
Adds the specified named component to the layout. |
void |
addLayoutComponent(String name,
Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object). |
int |
getHgap()
Returns 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()
Returns 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. |
void |
layoutContainer(Container target)
Lays out the specified container. |
Dimension |
maximumLayoutSize(Container target)
Returns the maximum dimensions for this layout given the components in the specified target container. |
Dimension |
minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container. |
Dimension |
preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container. |
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout. |
void |
setHgap(int hgap)
Sets the horizontal gap between components. |
void |
setVgap(int vgap)
Sets the vertical gap between components. |
String |
toString()
Returns the String representation of this CompassLayout's values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CompassLayout()
public CompassLayout(int hgap,
int vgap)
hgap - the horizontal gapvgap - the vertical gap| Method Detail |
|---|
public int getHgap()
public void setHgap(int hgap)
hgap - the horizontal gap between componentspublic int getVgap()
public void setVgap(int vgap)
vgap - the vertical gap between components
public void addLayoutComponent(Component comp,
Object constraints)
addLayoutComponent in interface LayoutManager2
public void addLayoutComponent(String name,
Component comp)
addLayoutComponent(Component, Object).
addLayoutComponent in interface LayoutManagerpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagercomp - the component to be removedpublic Dimension minimumLayoutSize(Container target)
minimumLayoutSize in interface LayoutManagertarget - the Container on which to do the layoutContainer,
preferredLayoutSize(java.awt.Container)public Dimension preferredLayoutSize(Container target)
preferredLayoutSize in interface LayoutManagertarget - the component which needs to be laid outContainer,
minimumLayoutSize(java.awt.Container)public 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 layoutContainer(Container target)
layoutContainer in interface LayoutManagertarget - the component being laid outContainerpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||