Class powersoft.jcm.ui.UniformLayout
All Packages Class Hierarchy This Package Previous Next Index
Class powersoft.jcm.ui.UniformLayout
java.lang.Object
|
+----powersoft.jcm.ui.UniformLayout
- public class UniformLayout
- extends Object
- implements LayoutManager
A layout manager that uniformly sizes its components.
The components are laid out horizontally by default. If the
allowsVerical property is true and the height of the container
is greater than its width, the components are laid out vertically
instead.
A gap may be specified as the space to be put between the
components.
-
UniformLayout()
- Constructs a new UniformLayout not allowing vertical layout and
with no gap.
-
UniformLayout(int, boolean)
- Constructs a new UniformLayout.
-
addLayoutComponent(String, Component)
- Adds the specified named component to the layout.
-
layoutContainer(Container)
- Lays out the specified container.
-
minimumLayoutSize(Container)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
-
preferredLayoutSize(Container)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
-
toString()
- Returns the String representation of this UniformLayout's values.
UniformLayout
public UniformLayout()
- Constructs a new UniformLayout not allowing vertical layout and
with no gap.
UniformLayout
public UniformLayout(int gap,
boolean allowsVertical)
- Constructs a new UniformLayout.
@param gap the amount of space to be put between components
@param allowsVertical whether vertical layout is allowed
addLayoutComponent
public void addLayoutComponent(String __name,
Component __comp)
- Adds the specified named component to the layout.
removeLayoutComponent
public void removeLayoutComponent(Component __comp)
- Removes the specified component from the layout.
- Parameters:
- comp - the component to be removed
minimumLayoutSize
public Dimension minimumLayoutSize(Container target)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
- Parameters:
- target - the Container on which to do the layout
- See Also:
- Container, preferredLayoutSize
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
- Parameters:
- target - the component which needs to be laid out
- See Also:
- Container, minimumLayoutSize
layoutContainer
public void layoutContainer(Container target)
- Lays out the specified container. This method will actually reshape the
components in the specified target container in order to satisfy the
constraints of the UniformLayout object.
- Parameters:
- target - the component being laid out
- See Also:
- Container
toString
public String toString()
- Returns the String representation of this UniformLayout's values.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index