jwo.utils.gui
Class SCLayout

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

public class SCLayout
extends SGLayout

Creates simple scalded column layout with multiple rows and a single column. 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
SCLayout(int rows)
          Creates a layout with the specified number of rows and default alignments and gaps.Vertical gaps are set to 0 and X- and Y-alignments are set to FILL.
SCLayout(int rows, int gap)
          Creates a layout with the specified number of rows and specified gap.
SCLayout(int rows, int hAlignment, int vAlignment, int gap)
          Creates a layout with the specified number of rows and specified alignments and gaps.
 
Method Summary
 void setAlignment(int index, int hAlignment, int vAlignment)
          Sets up alignment for a specific cell.
 void setScale(int cell, double scale)
          Sets up scale value for a specific cell.
 
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

SCLayout

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

Parameters:
rows - Number of rows in layout.

SCLayout

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

Parameters:
rows - Number of rows.
gap - The vertical gap, in pixels.

SCLayout

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

Parameters:
rows - Number of rows.
hAlignment - The X-alignment.
vAlignment - The Y-alignment.
gap - The vertical gap, in pixels.
Method Detail

setAlignment

public void setAlignment(int index,
                         int hAlignment,
                         int vAlignment)
Sets up alignment for a specific cell.

Parameters:
index - The cell number.
hAlignment - The X-alignment for the cell.
vAlignment - The Y-alignment for the cell.

setScale

public void setScale(int cell,
                     double scale)
Sets up scale value for a specific cell.

Parameters:
cell - The cell coordinate (row) to scale.
scale - The scale value for the row.


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