ProgramixGenericLib v5.0.1

com.programix.gui.layout
Class RowButtonLayout

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

public class RowButtonLayout
extends ButtonLayout

Lays out the components in row(s) forcing all of the components to be the same size. This LayoutManager is very useful for laying out a row of buttons (if you want a column of buttons, see ColumnButtonLayout. 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_ROW_COUNT
          The default number of rows 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
RowButtonLayout()
          Creates a layout for exactly one row of equally sized components anchored in the AnchorPoint.NORTH region.
RowButtonLayout(AnchorPoint anchorPoint)
          Creates a layout for exactly one row of equally sized components anchored in the specified region.
RowButtonLayout(int borderGap, AnchorPoint anchorPoint)
          Creates a layout for exactly one row of equally sized components anchored in the specified region.
RowButtonLayout(int rowGap, int colGap, int borderGap)
          Creates a layout for exactly one row of equally sized components anchored in the AnchorPoint.NORTH region.
RowButtonLayout(int rowGap, int colGap, int borderGap, AnchorPoint anchorPoint)
          Creates a layout for exactly one row of equally sized components.
RowButtonLayout(int rowGap, int colGap, int borderGap, AnchorPoint anchorPoint, int rowCount)
          Creates a layout for a row (or rows) of equally sized components.
 
Method Summary
 int getRowCount()
          Returns the number of rows that this layout will always have.
 void setRowCount(int rowCount)
          Changes the number of rows 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_ROW_COUNT

public static final int DEFAULT_ROW_COUNT
The default number of rows to use, value is 1.

See Also:
Constant Field Values
Constructor Detail

RowButtonLayout

public RowButtonLayout(int rowGap,
                       int colGap,
                       int borderGap,
                       AnchorPoint anchorPoint,
                       int rowCount)
Creates a layout for a row (or rows) of equally sized components.

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

RowButtonLayout

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

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

RowButtonLayout

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

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

RowButtonLayout

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

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

RowButtonLayout

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

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

RowButtonLayout

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

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

getRowCount

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


setRowCount

public void setRowCount(int rowCount)
Changes the number of rows 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.