JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.swing
Class ColumnLayout

java.lang.Object
  extended by net.sf.japi.swing.ColumnLayout
All Implemented Interfaces:
LayoutManager

public class ColumnLayout
extends Object
implements LayoutManager

Layout similar to FlowLayout, but using columns (vertical layout) instead of rows (horizontal layout).

Author:
Christian Hujer

Constructor Summary
ColumnLayout()
          Create a ColumnLayout with default gaps (4, 4).
ColumnLayout(int hgap, int vgap)
          Create a ColumnLayout with defined gaps.
 
Method Summary
 void addLayoutComponent(String name, Component comp)
          If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
 int getHgap()
          Returns horizontal Gap.
 int getVgap()
          Returns vertical Gap.
 void layoutContainer(Container parent)
          Lays out the specified container.
 Dimension minimumLayoutSize(Container parent)
          Calculates the minimum size dimensions for the specified container, given the components it contains.
 Dimension preferredLayoutSize(Container parent)
          Calculates the preferred size dimensions for the specified container, given the components it contains.
 void removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 void setHgap(int hgap)
          Sets horizontal Gap.
 void setVgap(int vgap)
          Sets vertical Gap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnLayout

public ColumnLayout()
Create a ColumnLayout with default gaps (4, 4).


ColumnLayout

public ColumnLayout(int hgap,
                    int vgap)
Create a ColumnLayout with defined gaps.

Parameters:
hgap - horizontal gap
vgap - vertical gap
Method Detail

getHgap

public int getHgap()
Returns horizontal Gap.

Returns:
horizontal Gap.

setHgap

public void setHgap(int hgap)
Sets horizontal Gap.

Parameters:
hgap - horizontal Gap.

getVgap

public int getVgap()
Returns vertical Gap.

Returns:
vertical Gap.

setVgap

public void setVgap(int vgap)
Sets vertical Gap.

Parameters:
vgap - vertical Gap.

addLayoutComponent

public void addLayoutComponent(@Nullable
                               String name,
                               @Nullable
                               Component comp)
If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the string to be associated with the component
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(@Nullable
                                  Component comp)
Removes the specified component from the layout.

Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

@NotNull
public Dimension preferredLayoutSize(@NotNull
                                             Container parent)
Calculates the preferred size dimensions for the specified container, given the components it contains.

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
parent - the container to be laid out
See Also:
LayoutManager.minimumLayoutSize(java.awt.Container)

minimumLayoutSize

@NotNull
public Dimension minimumLayoutSize(@NotNull
                                           Container parent)
Calculates the minimum size dimensions for the specified container, given the components it contains.

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
parent - the component to be laid out
See Also:
LayoutManager.preferredLayoutSize(java.awt.Container)

layoutContainer

public void layoutContainer(@NotNull
                            Container parent)
Lays out the specified container.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the container to be laid out

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright