ProgramixGenericLib v5.0.1

com.programix.gui.layout
Class ColumnButtonLayout

java.lang.Object
  extended by com.programix.gui.layout.AbstractTableLayout
      extended by com.programix.gui.layout.ButtonLayout
          extended by com.programix.gui.layout.ColumnButtonLayout
All Implemented Interfaces:
LayoutManager, Serializable

public class ColumnButtonLayout
extends ButtonLayout

Lays out the components in column(s) forcing all of the components to be the same size. This LayoutManager is very useful for laying out a column of buttons (if you want a row of buttons, see RowButtonLayout. The buttons will not stretch if the container is too tall or too wide, instead the buttons will stay clustered together in the area indicated by the AnchorPoint.

Author:
Paul Hyde
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.programix.gui.layout.AbstractTableLayout
AbstractTableLayout.CellData
 
Field Summary
static int DEFAULT_COLUMN_COUNT
          The default number of columns to use, value is 1.
 
Fields inherited from class com.programix.gui.layout.ButtonLayout
colDriven, requestedRowOrColCount
 
Fields inherited from class com.programix.gui.layout.AbstractTableLayout
anchorPoint, borderGap, colGap, columnCoordinator, DEFAULT_ANCHOR_POINT, DEFAULT_BORDER_GAP, DEFAULT_COL_GAP, DEFAULT_ROW_GAP, ignoreInvisibleComponents, rowGap
 
Constructor Summary
ColumnButtonLayout()
          Creates a layout for exactly one column of equally sized components anchored in the AnchorPoint.NORTH region.
ColumnButtonLayout(AnchorPoint anchorPoint)
          Creates a layout for exactly one column of equally sized components anchored in the specified region.
ColumnButtonLayout(int borderGap, AnchorPoint anchorPoint)
          Creates a layout for exactly one column of equally sized components anchored in the specified region.
ColumnButtonLayout(int rowGap, int colGap, int borderGap)
          Creates a layout for exactly one column of equally sized components anchored in the AnchorPoint.NORTH region.
ColumnButtonLayout(int rowGap, int colGap, int borderGap, AnchorPoint anchorPoint)
          Creates a layout for exactly one column of equally sized components.
ColumnButtonLayout(int rowGap, int colGap, int borderGap, AnchorPoint anchorPoint, int colCount)
          Creates a layout for a column (or columns) of equally sized components.
 
Method Summary
 int getColumnCount()
          Returns the number of columns that this layout will always have.
 void setColumnCount(int columnCount)
          Changes the number of columns in this layout.
 
Methods inherited from class com.programix.gui.layout.ButtonLayout
createCellData
 
Methods inherited from class com.programix.gui.layout.AbstractTableLayout
addLayoutComponent, getAnchorPoint, getBorderGap, getColumnCoordinator, getColumnGap, getRowGap, isIgnoreInvisibleComponents, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setAnchorPoint, setBorderGap, setColumnCoordinator, setColumnGap, setIgnoreInvisibleComponents, setRowGap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COLUMN_COUNT

public static final int DEFAULT_COLUMN_COUNT
The default number of columns to use, value is 1.

See Also:
Constant Field Values
Constructor Detail

ColumnButtonLayout

public ColumnButtonLayout(int rowGap,
                          int colGap,
                          int borderGap,
                          AnchorPoint anchorPoint,
                          int colCount)
Creates a layout for a column (or columns) of equally sized components.

Parameters:
rowGap - - space between rows. See setRowGap.
colGap - - space between columns—if there is more than one column. See setColumnGap.
borderGap - - space around the outside of the buttons. See setBorderGap.
anchorPoint - - region to anchor to when there is extra space See setAnchorPoint.
colCount - - the number of columns to create, very often just 1. See setColumnCount.

ColumnButtonLayout

public ColumnButtonLayout(int rowGap,
                          int colGap,
                          int borderGap,
                          AnchorPoint anchorPoint)
Creates a layout for exactly one column of equally sized components. Calls the main constructor passing in:

See Also:
ColumnButtonLayout(int, int, int, AnchorPoint, int)

ColumnButtonLayout

public ColumnButtonLayout(int rowGap,
                          int colGap,
                          int borderGap)
Creates a layout for exactly one column of equally sized components anchored in the AnchorPoint.NORTH region. Calls the main constructor passing in:

See Also:
ColumnButtonLayout(int, int, int, AnchorPoint, int)

ColumnButtonLayout

public ColumnButtonLayout(int borderGap,
                          AnchorPoint anchorPoint)
Creates a layout for exactly one column of equally sized components anchored in the specified region. Calls the main constructor passing in:

See Also:
ColumnButtonLayout(int, int, int, AnchorPoint, int)

ColumnButtonLayout

public ColumnButtonLayout(AnchorPoint anchorPoint)
Creates a layout for exactly one column of equally sized components anchored in the specified region. Calls the main constructor passing in:

See Also:
ColumnButtonLayout(int, int, int, AnchorPoint, int)

ColumnButtonLayout

public ColumnButtonLayout()
Creates a layout for exactly one column of equally sized components anchored in the AnchorPoint.NORTH region. Calls the main constructor passing in:

See Also:
ColumnButtonLayout(int, int, int, AnchorPoint, int)
Method Detail

getColumnCount

public int getColumnCount()
Returns the number of columns that this layout will always have. The number of rows is calculated based on the number of components in the container.


setColumnCount

public void setColumnCount(int columnCount)
Changes the number of columns in this layout. Passed value is silently increased to 1 if a smaller count is specified.


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.