| |
|
| java.lang.Object org.wings.SAbstractLayoutManager org.wings.SBoxLayout
SBoxLayout | public class SBoxLayout extends SAbstractLayoutManager (Code) | | Allows multiple components to be laid out either vertically or horizontally.
Nesting multiple panels with different combinations of horizontal
and vertical gives an effect similar to GridBagLayout, without the complexity.
author: Holger Engels |
Field Summary | |
final public static int | X_AXIS | final public static int | Y_AXIS | protected int | align | protected int | borderThickness | protected ArrayList | components | protected int | hgap The horizontal gap (in pixels) specifiying the space
between columns. | protected int | orientation | protected int | vgap The vertical gap (in pixels) which specifiying the space
between rows. |
Method Summary | |
public void | addComponent(SComponent c, Object constraint, int index) | public int | getBorder() Typical PLAFs will render this layout as invisible table (border = 0). | public SComponent | getComponentAt(int i) | public List | getComponents() | public int | getHgap() Gets the horizontal gap between components in pixel. | public int | getOrientation() | public int | getVgap() Gets the vertical gap between components in pixel. | public void | removeComponent(SComponent c) | public void | setBorder(int borderThickness) Typical PLAFs will render this layout as invisible table (border = 0). | public void | setHgap(int hgap) Sets the horizontal gap between components to the specified value in pixe. | public void | setOrientation(int o) Sets the orientation. | public void | setVgap(int vgap) Sets the vertical gap between components to the specified value in pixel.
Rendered half as margin top and margin bottom. |
X_AXIS | final public static int X_AXIS(Code) | | |
Y_AXIS | final public static int Y_AXIS(Code) | | |
align | protected int align(Code) | | |
borderThickness | protected int borderThickness(Code) | | |
hgap | protected int hgap(Code) | | The horizontal gap (in pixels) specifiying the space
between columns. They can be changed at any time.
This should be a non-negative integer.
|
orientation | protected int orientation(Code) | | |
vgap | protected int vgap(Code) | | The vertical gap (in pixels) which specifiying the space
between rows. They can be changed at any time.
This should be a non negative integer.
|
SBoxLayout | public SBoxLayout(int orientation)(Code) | | creates a new box layout with the given orientation
Parameters: orientation - either SConstants#VERTICAL or SConstants#HORIZONTAL |
SBoxLayout | public SBoxLayout(SContainer c, int orientation)(Code) | | creates a new box layout with the given orientation
Parameters: c - - the container that needs to be laid out Parameters: orientation - either SConstants#VERTICAL or SConstants#HORIZONTAL |
getBorder | public int getBorder()(Code) | | Typical PLAFs will render this layout as invisible table (border = 0). Use this property to make it visible
The rendered border with in pixel |
getComponentAt | public SComponent getComponentAt(int i)(Code) | | returns the component at the given position
Parameters: i - position component |
getComponents | public List getComponents()(Code) | | returns a list of all components
all components |
getHgap | public int getHgap()(Code) | | Gets the horizontal gap between components in pixel. Rendered half as margin left and margin right
Some PLAFs might ignore this property.
the horizontal gap between components |
getOrientation | public int getOrientation()(Code) | | returns the orientation
orientation |
getVgap | public int getVgap()(Code) | | Gets the vertical gap between components in pixel. Rendered half as margin top and margin bottom
Some PLAFs might ignore this property.
the vertical gap between components |
setBorder | public void setBorder(int borderThickness)(Code) | | Typical PLAFs will render this layout as invisible table (border = 0). Use this property to make it visible
Parameters: borderThickness - The rendered border with in pixel |
setHgap | public void setHgap(int hgap)(Code) | | Sets the horizontal gap between components to the specified value in pixe. Rendered half as margin left and margin right
Some PLAFs might ignore this property.
Parameters: hgap - the horizontal gap between components |
setOrientation | public void setOrientation(int o)(Code) | | Sets the orientation. Use one of the following types:
Parameters: o - One of the following constants: SConstants#HORIZONTAL or SConstants#VERTICAL |
setVgap | public void setVgap(int vgap)(Code) | | Sets the vertical gap between components to the specified value in pixel.
Rendered half as margin top and margin bottom. Some PLAFs might ignore this property.
Parameters: vgap - the vertical gap between components |
|
|
|