pagelayout
Class Gap

java.lang.Object
  extended by pagelayout.Cell
      extended by pagelayout.Gap

public class Gap
extends Cell

A gap is a Cell object that represents an empty space between components. Both flexible and fixed gaps may be placed between the components. Typically, this class is not used directly, but by calling the appropriate add methods of a Row or a Column object.


Nested Class Summary
 
Nested classes/interfaces inherited from class pagelayout.Cell
Cell.Constraint
 
Field Summary
 
Fields inherited from class pagelayout.Cell
BASELINE, BOTTOM, boundSpring, CENTER, constraint, filledSizeX, filledSizeY, fixMaxSize, FOUND_NOTREPLACED, FOUND_REPLACED, halign, JUSTIFIED, LEFT, links, MAX, NEWROW, NO_ALIGNMENT, NOT_FOUND, RIGHT, SKIP, TOP, valign
 
Constructor Summary
Gap(int gap)
          Creates a fixed vertical gap.
Gap(int gap, boolean isHorizontal)
          Creates a fixed gap with the specified orientation.
Gap(int minGap, int preferredGap, int maxGap)
          Creates a flexible vertical gap.
Gap(int minGap, int preferredGap, int maxGap, boolean isHorizontal)
          Creates a flexible gap with the specified orientation.
 
Method Summary
 BoundSpring computeBoundSpring()
          Returns the two-dimensional spring associated with this gap.
 Cell duplicate(ComponentDuplicator c)
           
 java.lang.String toString()
          Returns the string representation of the gap.
 void xmlserialize(XMLPrintStream out, ComponentXMLSerializer c)
           
 
Methods inherited from class pagelayout.Cell
addArgs, addComponentsToContainer, alignBaseline, alignBaseline, checkArgs, createLayout, dupConstraint, getAlignment, getBaseline, getBoundSpring, getCellByName, getChildAt, getComponent, getComponentCell, getComponentCell, getConstraint, getContainer, getDim, getFilledSizeX, getFilledSizeY, getName, getParent, getRootCell, getSize, invalidate, isCell, isCellOrComponent, isComponentCell, isFixedHeight, isFixedSize, isFixedWidth, layout, linkHeight, linkHeight, linkHeight, linkToContainerHeight, linkToContainerWidth, linkWidth, linkWidth, linkWidth, numberOfChildren, removeAllComponents, removeComponent, replaceCell, replaceChild, setAlignment, setBounds, setBounds, setComponentGaps, setDim, setFixedHeight, setFixedHeight, setFixedHeight, setFixedHeight, setFixedHeight, setFixedSize, setFixedSize, setFixedSize, setFixedWidth, setFixedWidth, setFixedWidth, setFixedWidth, setFixedWidth, setName, setParent, setSize, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gap

public Gap(int gap,
           boolean isHorizontal)
Creates a fixed gap with the specified orientation.

Parameters:
gap - the length of the gap.
isHorizontal - true for horizontal gap, and false otherwise.

Gap

public Gap(int gap)
Creates a fixed vertical gap.

Parameters:
gap - the length of the gap.

Gap

public Gap(int minGap,
           int preferredGap,
           int maxGap,
           boolean isHorizontal)
Creates a flexible gap with the specified orientation. The flexibility of the gap is indicated by the difference between preferredGap and maxGap. If these arguments are identical, the gap is fixed.

Parameters:
minGap - the minimum length of the gap.
preferredGap - the preferred length of the gap.
maxGap - the maximum length of the gap.
isHorizontal - true for horizontal gap, and false otherwise.

Gap

public Gap(int minGap,
           int preferredGap,
           int maxGap)
Creates a flexible vertical gap. The flexibility of the gap is indicated by the difference between preferredGap and maxGap. If these arguments are identical, the gap is fixed.

Parameters:
minGap - the minimum length of the gap.
preferredGap - the preferred length of the gap.
maxGap - the maximum length of the gap.
Method Detail

toString

public java.lang.String toString()
Returns the string representation of the gap.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of the gap.

computeBoundSpring

public BoundSpring computeBoundSpring()
Returns the two-dimensional spring associated with this gap.

Specified by:
computeBoundSpring in class Cell
Returns:
The two-dimensional spring associated with this gap.

duplicate

public Cell duplicate(ComponentDuplicator c)
Specified by:
duplicate in class Cell

xmlserialize

public void xmlserialize(XMLPrintStream out,
                         ComponentXMLSerializer c)
Specified by:
xmlserialize in class Cell