jwo.utils.gui
Class SRLayout

java.lang.Object
  extended by jwo.utils.gui.SGLayout
      extended by jwo.utils.gui.SRLayout
All Implemented Interfaces:
LayoutManager, Serializable

public class SRLayout
extends SGLayout

Creates simple scalded row layout with multiple columns and a single row. See JavaWorld Tips, 129.

Version:
2.3, 9th August, 2002.
Author:
John Redmond, modified by Jo Wood
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jwo.utils.gui.SGLayout
BOTTOM, bottomBorder, CENTER, cols, columnScale, columnSizes, FILL, hAlignment, hAlignments, hgap, LEFT, leftBorder, minH, minW, RIGHT, rightBorder, rows, rowScale, rowSizes, TOP, topBorder, vAlignment, vAlignments, vgap
 
Constructor Summary
SRLayout(int columns)
          Creates a layout with the specified number of columns and default alignments and gaps.
SRLayout(int columns, int gap)
          Creates a layout with the specified number of columns and specified gap.
SRLayout(int columns, int hAlignment, int vAlignment, int gap)
          Creates a layout with the specified number of columns and specified alignments and gaps.
 
Method Summary
 void setAlignment(int column, int hAlignment, int vAlignment)
          Set up alignment for a specific column.
 void setScale(int column, double scale)
          Set up scale value for a specific column (default is 1.0).
 
Methods inherited from class jwo.utils.gui.SGLayout
addLayoutComponent, allocateMaxSizes, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setAlignment, setColumnAlignment, setColumnScale, setMargins, setRowAlignment, setRowScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SRLayout

public SRLayout(int columns)
Creates a layout with the specified number of columns and default alignments and gaps. Horizontal gaps are set to 0 and X- and Y-alignments are set to FILL.

Parameters:
columns - Number of columns.

SRLayout

public SRLayout(int columns,
                int gap)
Creates a layout with the specified number of columns and specified gap. X- and Y-alignments are set to FILL.

Parameters:
columns - Number of columns.
gap - The horizontal gap, in pixels.

SRLayout

public SRLayout(int columns,
                int hAlignment,
                int vAlignment,
                int gap)
Creates a layout with the specified number of columns and specified alignments and gaps.

Parameters:
columns - Number of columns.
hAlignment - Horizontal alignment.
vAlignment - Vertical alignment.
gap - The horizontal gap, in pixels.
Method Detail

setAlignment

public void setAlignment(int column,
                         int hAlignment,
                         int vAlignment)
Set up alignment for a specific column.

Parameters:
column - The column number to align.
hAlignment - the X-alignment for the cell.
vAlignment - the Y-alignment for the cell.

setScale

public void setScale(int column,
                     double scale)
Set up scale value for a specific column (default is 1.0).

Parameters:
column - The column number to scale.
scale - The scale value for the column.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009