|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.l2fprod.common.swing.PercentLayout
public class PercentLayout
PercentLayout.
Constraint based layout which allow the space to be
splitted using percentages. The following are allowed when adding components
to container:
| Field Summary | |
|---|---|
static int |
HORIZONTAL
Useful constant to layout the components horizontally (from left to right). |
static int |
VERTICAL
Useful constant to layout the components vertically (from top to bottom). |
| Constructor Summary | |
|---|---|
PercentLayout()
Creates a new HORIZONTAL PercentLayout with a gap of 0. |
|
PercentLayout(int orientation,
int gap)
|
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.awt.Component component,
java.lang.Object constraints)
|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component with the specified name to the layout. |
com.l2fprod.common.swing.PercentLayout.Constraint |
getConstraint(java.awt.Component component)
|
int |
getGap()
|
float |
getLayoutAlignmentX(java.awt.Container target)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container target)
Returns the alignment along the y axis. |
int |
getOrientation()
|
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 parent)
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
Returns the maximum size of this component. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setConstraint(java.awt.Component component,
java.lang.Object constraints)
|
void |
setGap(int gap)
|
void |
setOrientation(int orientation)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HORIZONTAL
public static final int VERTICAL
| Constructor Detail |
|---|
public PercentLayout()
public PercentLayout(int orientation,
int gap)
| Method Detail |
|---|
public void setGap(int gap)
public int getGap()
public void setOrientation(int orientation)
public int getOrientation()
public com.l2fprod.common.swing.PercentLayout.Constraint getConstraint(java.awt.Component component)
public void setConstraint(java.awt.Component component,
java.lang.Object constraints)
public void addLayoutComponent(java.awt.Component component,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2public float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY in interface java.awt.LayoutManager2public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagername - the component namecomp - the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagercomp - the component ot be removedpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerparent - the component to be laid outpreferredLayoutSize(java.awt.Container)public java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
maximumLayoutSize in interface java.awt.LayoutManager2Component.getMinimumSize(),
Component.getPreferredSize(),
LayoutManagerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpublic void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||