kirk.gui
Class GridSpanConstraints

java.lang.Object
  |
  +--kirk.gui.GridSpanConstraints
All Implemented Interfaces:
java.lang.Cloneable

public class GridSpanConstraints
extends java.lang.Object
implements java.lang.Cloneable

This class represents a constraints object for GridSpanLayout. Various methods are available to set the correct settings for each associated Component. For more information, see GridSpanLayout.

Version:
1
Author:
Berend "Kirk" Wouda
See Also:
GridSpanLayout, GridBagConstraints

Field Summary
protected  int height
          The height of the associated Component, in cells.
protected  double horizontalanchor
          The relative position of the associated Component on the x-axis of the space it is in.
protected  double horizontalfill
          Whether the associated Component should be as high as the space it is in.
protected  double verticalanchor
          The relative position of the associated Component on the y-axis of the space it is in.
protected  double verticalfill
          Whether the associated Component should be as wide as the space it is in.
protected  int width
          The width of the associated Component, in cells.
protected  int x
          The X coordinate of the associated Component, in cells.
protected  int y
          The Y coordinate of the associated Component, in cells.
 
Constructor Summary
GridSpanConstraints()
          Constructs a new GridSpanConstraints with the default settings.
GridSpanConstraints(int x, int y, int width, int height)
          Constructs a new GridSpanConstraints with the given settings, and the default values for the rest.
GridSpanConstraints(int x, int y, int width, int height, double horizontalfill, double verticalfill, double horizontalanchor, double verticalanchor)
          Constructs a new GridSpanConstraints with the passed settings.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
 int getHeight()
          Returns the height of the associated Component.
 double getHorizontalAnchor()
          Returns the horizontal anchor of the associated Component.
 double getHorizontalFill()
          Returns the horizontal fill of the associated Component.
 double getVerticalAnchor()
          Returns the vertical anchor of the associated Component.
 double getVerticalFill()
          Returns the vertical fill of the associated Component.
 int getWidth()
          Returns the width of the associated Component.
 int getX()
          Returns the x coordinate of the associated Component.
 int getY()
          Returns the y coordinate of the associated Component.
 void setHeight(int height)
          Sets the height of the associated Component.
 void setHorizontalAnchor(double horizontalanchor)
          Sets the horizontal anchor of the associated Component.
 void setHorizontalFill(double horizontalfill)
          Sets the horizontal fill of the associated Component.
 void setVerticalAnchor(double verticalanchor)
          Sets the vertical anchor of the associated Component.
 void setVerticalFill(double verticalfill)
          Sets the vertical fill of the associated Component.
 void setWidth(int width)
          Sets the width of the associated Component.
 void setX(int x)
          Sets the x coordinate of the associated Component.
 void setY(int y)
          Sets the y coordinate of the associated Component.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected int x
The X coordinate of the associated Component, in cells.


y

protected int y
The Y coordinate of the associated Component, in cells.


width

protected int width
The width of the associated Component, in cells.


height

protected int height
The height of the associated Component, in cells.


horizontalfill

protected double horizontalfill
Whether the associated Component should be as high as the space it is in.


verticalfill

protected double verticalfill
Whether the associated Component should be as wide as the space it is in.


horizontalanchor

protected double horizontalanchor
The relative position of the associated Component on the x-axis of the space it is in.


verticalanchor

protected double verticalanchor
The relative position of the associated Component on the y-axis of the space it is in.

Constructor Detail

GridSpanConstraints

public GridSpanConstraints(int x,
                           int y,
                           int width,
                           int height,
                           double horizontalfill,
                           double verticalfill,
                           double horizontalanchor,
                           double verticalanchor)
Constructs a new GridSpanConstraints with the passed settings.

Parameters:
x - The x coordinate.
y - The y coordinate.
width - The width coordinate.
height - The height coordinate.

GridSpanConstraints

public GridSpanConstraints(int x,
                           int y,
                           int width,
                           int height)
Constructs a new GridSpanConstraints with the given settings, and the default values for the rest. See the no parameter constructor for the default values.

Parameters:
x - The x coordinate.
y - The y coordinate.
width - The width coordinate.
height - The height coordinate.

GridSpanConstraints

public GridSpanConstraints()
Constructs a new GridSpanConstraints with the default settings. These are:

Method Detail

setX

public void setX(int x)
Sets the x coordinate of the associated Component.

Parameters:
x - The x coordinate.

getX

public int getX()
Returns the x coordinate of the associated Component.

Returns:
The x coordinate.

setY

public void setY(int y)
Sets the y coordinate of the associated Component.

Parameters:
y - The y coordinate.

getY

public int getY()
Returns the y coordinate of the associated Component.

Returns:
The y coordinate.

setWidth

public void setWidth(int width)
Sets the width of the associated Component.

Parameters:
width - The width.

getWidth

public int getWidth()
Returns the width of the associated Component.

Returns:
The width.

setHeight

public void setHeight(int height)
Sets the height of the associated Component.

Parameters:
height - The height.

getHeight

public int getHeight()
Returns the height of the associated Component.

Returns:
The height.

setHorizontalFill

public void setHorizontalFill(double horizontalfill)
Sets the horizontal fill of the associated Component.

Parameters:
horizontalfill - The horizontal fill.

getHorizontalFill

public double getHorizontalFill()
Returns the horizontal fill of the associated Component.

Returns:
The horizontal fill.

setVerticalFill

public void setVerticalFill(double verticalfill)
Sets the vertical fill of the associated Component.

Parameters:
verticalfill - The vertical fill.

getVerticalFill

public double getVerticalFill()
Returns the vertical fill of the associated Component.

Returns:
The vertical fill.

setHorizontalAnchor

public void setHorizontalAnchor(double horizontalanchor)
Sets the horizontal anchor of the associated Component.

Parameters:
horizontalanchor - The horizontal anchor.

getHorizontalAnchor

public double getHorizontalAnchor()
Returns the horizontal anchor of the associated Component.

Returns:
The horizontal anchor.

setVerticalAnchor

public void setVerticalAnchor(double verticalanchor)
Sets the vertical anchor of the associated Component.

Parameters:
verticalanchor - The vertical anchor.

getVerticalAnchor

public double getVerticalAnchor()
Returns the vertical anchor of the associated Component.

Returns:
The vertical anchor.

clone

public java.lang.Object clone()
Returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
A copy of this object.
See Also:
Object.clone()