|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.widget.GridFlowLayout
public class GridFlowLayout
Ce layout place les composants de gauche à droite ou de droite à gauche selon
la valeur de Component.getComponentOrientation(). Si un
composant n'a pas assez de place pour se mettre sur la ligne courant, il est
mis sur la ligne suivante et les composants sont redimensionnés pour prendre
le maximum de place disponible sur la ligne. Si le container est dans un
JViewport (ou JScrollPane), ce layout
essai de ne jamais faire apparaitre le ScrollBar horizontal.
Tous les composants ont la même taille.
| Field Summary | |
|---|---|
protected Map<Component,Object> |
positions
|
| Constructor Summary | |
|---|---|
GridFlowLayout()
GridFlowLayout constructor make a GridFlowLayout with default value (1) for gap |
|
GridFlowLayout(int hgap,
int vgap)
GridFlowLayout constructor |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(Component comp,
Object constraints)
Method addLayoutComponent |
void |
addLayoutComponent(String name,
Component comp)
Method addLayoutComponent |
Component[] |
computeOrder(Component[] components)
Method [] |
protected int |
getComponentVisibleCount(Container parent)
Method getComponentVisibleCount |
Number |
getConstraints(Component comp)
Method getConstraints |
int |
getHgap()
Gets the horizontal gap between components. |
float |
getLayoutAlignmentX(Container target)
Method getLayoutAlignmentX |
float |
getLayoutAlignmentY(Container target)
Method getLayoutAlignmentY |
protected Dimension |
getMaxWidthHeight(Container parent)
Method getMaxWidthHeight |
protected Dimension |
getMinWidthHeight(Container parent)
Method getMinWidthHeight |
int |
getVgap()
Gets the vertical gap between components. |
void |
invalidateLayout(Container target)
Method invalidateLayout |
void |
layoutContainer(Container parent)
Method layoutContainer |
static void |
main(String[] args)
|
Dimension |
maximumLayoutSize(Container target)
Method maximumLayoutSize |
Dimension |
minimumLayoutSize(Container parent)
Method minimumLayoutSize |
Dimension |
preferredLayoutSize(Container parent)
Method preferredLayoutSize |
void |
removeLayoutComponent(Component comp)
Method removeLayoutComponent |
void |
setConstraints(Component comp,
Number constraints)
Method setConstraints |
void |
setHgap(int hgap)
Sets the horizontal gap between components. |
void |
setVgap(int vgap)
Sets the vertical gap between components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<Component,Object> positions
| Constructor Detail |
|---|
public GridFlowLayout()
public GridFlowLayout(int hgap,
int vgap)
hgap - the horizontal gap between two componentsvgap - the vertical gap between two components| Method Detail |
|---|
public int getHgap()
setHgap(int)public void setHgap(int hgap)
hgap - the horizontal gap between componentsgetHgap()public int getVgap()
setVgap(int)public void setVgap(int vgap)
vgap - the vertical gap between componentsgetVgap()
public void addLayoutComponent(Component comp,
Object constraints)
addLayoutComponent in interface LayoutManager2comp - the component to addconstraints - a constraint which is a Number (position)
public void setConstraints(Component comp,
Number constraints)
comp - the compoenentconstraints - public Number getConstraints(Component comp)
comp -
public float getLayoutAlignmentX(Container target)
getLayoutAlignmentX in interface LayoutManager2target -
public float getLayoutAlignmentY(Container target)
getLayoutAlignmentY in interface LayoutManager2target -
public void invalidateLayout(Container target)
invalidateLayout in interface LayoutManager2target -
public void addLayoutComponent(String name,
Component comp)
addLayoutComponent in interface LayoutManagername - comp - public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManagerparent -
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManagerparent -
public Dimension maximumLayoutSize(Container target)
maximumLayoutSize in interface LayoutManager2target -
public void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagercomp - public void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerparent - protected int getComponentVisibleCount(Container parent)
parent -
protected Dimension getMaxWidthHeight(Container parent)
parent -
protected Dimension getMinWidthHeight(Container parent)
parent -
public Component[] computeOrder(Component[] components)
components -
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||