|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.ui.layout.SectorLayout
public class SectorLayout
Constructor Summary | |
---|---|
SectorLayout(int hgap,
int vgap,
java.util.List<ZoneSector> sectors)
Constructs a border layout with the specified gaps between components. |
|
SectorLayout(java.util.List<ZoneSector> sectors)
Constructs a new border layout with no gaps between components. |
Method Summary | |
---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
|
int |
getHgap()
Returns the horizontal gap between components. |
float |
getLayoutAlignmentX(java.awt.Container parent)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container parent)
Returns the alignment along the y axis. |
int |
getVgap()
Returns the vertical gap between components. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
void |
layoutContainer(java.awt.Container target)
Lays out the container argument using this border layout. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum dimensions for this layout given the components in the specified target container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container target)
Determines the minimum size of the target container using
this layout manager. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container target)
Determines the preferred size of the target container using
this layout manager, based on the components in the container. |
void |
removeLayoutComponent(java.awt.Component comp)
|
void |
setHgap(int hgap)
Sets the horizontal gap between components. |
void |
setVgap(int vgap)
Sets the vertical gap between components. |
java.lang.String |
toString()
Returns a string representation of the state of this border layout. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SectorLayout(java.util.List<ZoneSector> sectors)
sectors
- defined sectors.public SectorLayout(int hgap, int vgap, java.util.List<ZoneSector> sectors)
hgap
and the vertical gap is
specified by vgap
.
hgap
- the horizontal gap.vgap
- the vertical gap.sectors
- defined sectors.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 componentspublic void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
target
container using
this layout manager.
This method is called when a container calls its
getMinimumSize
method. Most applications do not call this
method directly.
minimumLayoutSize
in interface java.awt.LayoutManager
target
- the container in which to do the layout.
Container
,
preferredLayoutSize(java.awt.Container)
,
Container.getMinimumSize()
public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
target
container using
this layout manager, based on the components in the container.
Most applications do not call this method directly. This method is called
when a container calls its getPreferredSize
method.
preferredLayoutSize
in interface java.awt.LayoutManager
target
- the container in which to do the layout.
Container
,
minimumLayoutSize(java.awt.Container)
,
Container.getPreferredSize()
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize
in interface java.awt.LayoutManager2
target
- the component which needs to be laid out
Container
,
minimumLayoutSize(java.awt.Container)
,
preferredLayoutSize(java.awt.Container)
public float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
parent
-
public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
parent
-
public void invalidateLayout(java.awt.Container target)
invalidateLayout
in interface java.awt.LayoutManager2
target
- public void layoutContainer(java.awt.Container target)
This method actually reshapes the components in the specified container in
order to satisfy the constraints of this SectorLayout
object. The NORTH
and SOUTH
components, if
any, are placed at the top and bottom of the container, respectively. The
WEST
and EAST
components are then placed on
the left and right, respectively. Finally, the CENTER
object
is placed in any remaining space in the middle.
Most applications do not call this method directly. This method is called
when a container calls its doLayout
method.
layoutContainer
in interface java.awt.LayoutManager
target
- the container in which to do the layout.Container
,
Container.doLayout()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |