com.izforge.izpack.gui
Class IzPanelConstraints

java.lang.Object
  extended by com.izforge.izpack.gui.IzPanelConstraints
All Implemented Interfaces:
LayoutConstants, java.lang.Cloneable, javax.swing.SwingConstants

public class IzPanelConstraints
extends java.lang.Object
implements java.lang.Cloneable, LayoutConstants

Constraints class for the layout manager IzPanelLayout.


Field Summary
private  java.awt.Rectangle bounds
           
(package private)  java.awt.Component component
          for private use by the layout manager
(package private)  int preferredHeight
          for private use by the layout manager
private  int xCellAlignment
          Current defined gaps.
private  int xGap
           
private  int xPos
           
private  double xStretch
           
private  int xWeight
           
private  int yCellAlignment
           
private  int yGap
           
private  int yPos
           
private  double yStretch
           
private  int yWeight
           
 
Fields inherited from interface com.izforge.izpack.gui.LayoutConstants
ABSOLUTE_STRETCH, ALL_GAP, AUTOMATIC_GAP, CONTROL_CONSTRAINT, CONTROL_GAP, CONTROL_TO_LABEL_GAP, CONTROL_TO_TEXT_GAP, CURRENT_COLUMN, CURRENT_ROW, DEFAULT_CONTROL_ALIGNMENT, DEFAULT_LABEL_ALIGNMENT, DEFAULT_TEXT_ALIGNMENT, FILL_OUT_COLUMN_HEIGHT, FILL_OUT_COLUMN_SIZE, FILL_OUT_COLUMN_WIDTH, FILLER1_GAP, FILLER13_GAP, FILLER2_GAP, FILLER4_GAP, FILLER5_GAP, FULL_COLUMN_STRETCH, FULL_LINE_COMPONENT_CONSTRAINT, FULL_LINE_CONTROL_CONSTRAINT, FULL_LINE_STRETCH, GAP_LOAD_MARKER, LABEL_CONSTRAINT, LABEL_GAP, LABEL_TO_CONTROL_GAP, LABEL_TO_TEXT_GAP, NEXT_COLUMN, NEXT_LINE, NEXT_ROW, NO_FILL_OUT_COLUMN, NO_GAP, NO_STRETCH, PARAGRAPH_GAP, RELATIVE_STRETCH, TEXT_CONSTRAINT, TEXT_GAP, TEXT_TO_CONTROL_GAP, TEXT_TO_LABEL_GAP, TOP_GAP, XDUMMY_CONSTRAINT, XY_VARIABLE_CONSTRAINT, YDUMMY_CONSTRAINT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
IzPanelConstraints()
          Default constructor
IzPanelConstraints(int xCellAlignment, int yCellAlignment, int xPos, int yPos, int xWeight, int yWeight, int xGap, int yGap, double xStretch, double yStretch)
          Constructor with all existent parameters.
 
Method Summary
 java.lang.Object clone()
           
 java.awt.Rectangle getBounds()
          Returns the bounds which should be used by the corresponding component.
 int getXCellAlignment()
          Returns the alignment for the x direction.
 int getXGap()
          Returns the declared x gap value.
 int getXPos()
          Returns the x position (column number).
 double getXStretch()
          Returns the declared stretch value in x direction.
 int getXWeight()
          Returns the weight for the x direction.
 int getYCellAlignment()
          Returns the alignment for the y direction.
 int getYGap()
          Returns the declared y gap value.
 int getYPos()
          Returns the y position (row number).
 double getYStretch()
          Returns the declared stretch value in y direction.
 int getYWeight()
          Returns the weight for the y direction.
 void setBounds(java.awt.Rectangle bounds)
          Sets the bounds which should be used for the component.
 void setXCellAlignment(int cellAlignment)
          Sets the alignment for the x direction.
 void setXGap(int gap)
          Sets the given value as x gap.
 void setXPos(int pos)
          Sets the x position to be used.
 void setXStretch(double stretch)
          Sets the given value as stretch value for x direction.
 void setXWeight(int weight)
          Sets the weight value for the x direction.
 void setYCellAlignment(int cellAlignment)
          Sets the alignment for the y direction.
 void setYGap(int gap)
          Sets the given value as y gap.
 void setYPos(int pos)
          Sets the y position to be used.
 void setYStretch(double stretch)
          Sets the given value as stretch value for y direction.
 void setYWeight(int weight)
          Sets the weight value for the y direction.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xCellAlignment

private int xCellAlignment
Current defined gaps. Here are the defaults which can be overwritten at the first call to method getGap. The gap type will be determined by the array index and has to be synchron to the gap identifier and the indices of array GAP_NAME_LOOK_UP


yCellAlignment

private int yCellAlignment

xPos

private int xPos

yPos

private int yPos

xWeight

private int xWeight

yWeight

private int yWeight

xGap

private int xGap

yGap

private int yGap

xStretch

private double xStretch

yStretch

private double yStretch

bounds

private java.awt.Rectangle bounds

component

java.awt.Component component
for private use by the layout manager


preferredHeight

int preferredHeight
for private use by the layout manager

Constructor Detail

IzPanelConstraints

public IzPanelConstraints(int xCellAlignment,
                          int yCellAlignment,
                          int xPos,
                          int yPos,
                          int xWeight,
                          int yWeight,
                          int xGap,
                          int yGap,
                          double xStretch,
                          double yStretch)
Constructor with all existent parameters.

Parameters:
xCellAlignment - value to be used as x alignment
yCellAlignment - value to be used as y alignment
xPos - x position to be used
yPos - y position to be used
xWeight - weight at x direction
yWeight - weight at y direction
xGap - gap for x direction
yGap - gap for y direction
xStretch - stretch value for the x direction
yStretch - stretch value for the y direction

IzPanelConstraints

public IzPanelConstraints()
Default constructor

Method Detail

getXStretch

public double getXStretch()
Returns the declared stretch value in x direction.

Returns:
the declared stretch value in x direction

setXStretch

public void setXStretch(double stretch)
Sets the given value as stretch value for x direction.

Parameters:
stretch - value to be set

getYStretch

public double getYStretch()
Returns the declared stretch value in y direction.

Returns:
the declared stretch value in y direction

setYStretch

public void setYStretch(double stretch)
Sets the given value as stretch value for y direction.

Parameters:
stretch - value to be set

getXGap

public int getXGap()
Returns the declared x gap value.

Returns:
the declared x gap value

setXGap

public void setXGap(int gap)
Sets the given value as x gap.

Parameters:
gap - value to be set

getYGap

public int getYGap()
Returns the declared y gap value.

Returns:
the declared y gap value

setYGap

public void setYGap(int gap)
Sets the given value as y gap.

Parameters:
gap - value to be set

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getXCellAlignment

public int getXCellAlignment()
Returns the alignment for the x direction.

Returns:
the alignment for the x direction

setXCellAlignment

public void setXCellAlignment(int cellAlignment)
Sets the alignment for the x direction. Possible values are LEFT, RIGHT and CENTER.

Parameters:
cellAlignment - to be used

getXPos

public int getXPos()
Returns the x position (column number).

Returns:
the x position (column number)

setXPos

public void setXPos(int pos)
Sets the x position to be used.

Parameters:
pos - position to be used

getXWeight

public int getXWeight()
Returns the weight for the x direction. The weight determines how many cells are occupied by the component.

Returns:
the weight for the x direction

setXWeight

public void setXWeight(int weight)
Sets the weight value for the x direction.

Parameters:
weight - to be used for the x direction

getYCellAlignment

public int getYCellAlignment()
Returns the alignment for the y direction.

Returns:
the alignment for the y direction

setYCellAlignment

public void setYCellAlignment(int cellAlignment)
Sets the alignment for the y direction. Possible values are TOP, BOTTOM and CENTER.

Parameters:
cellAlignment - to be used

getYPos

public int getYPos()
Returns the y position (row number).

Returns:
the y position (row number)

setYPos

public void setYPos(int pos)
Sets the y position to be used.

Parameters:
pos - position to be used

getYWeight

public int getYWeight()
Returns the weight for the y direction. The weight determines how many cells are occupied by the component.

Returns:
the weight for the y direction

setYWeight

public void setYWeight(int weight)
Sets the weight value for the y direction.

Parameters:
weight - to be used for the y direction

getBounds

public java.awt.Rectangle getBounds()
Returns the bounds which should be used by the corresponding component. This will be used by the layout manager at a fast layouting.

Returns:
used bounds

setBounds

public void setBounds(java.awt.Rectangle bounds)
Sets the bounds which should be used for the component.

Parameters:
bounds - bounds to be used