org.openpermis.editor.policy.gui
Class SmartConstraints

java.lang.Object
  extended by org.openpermis.editor.policy.gui.SmartConstraints

public class SmartConstraints
extends Object

Smarter version of CellConstraints that holds the current locataion.

Since:
0.3.0

Field Summary
private  com.jgoodies.forms.layout.CellConstraints cellConstraints
          The actual cell constraints object used.
private  int initialX
          The initial x coordinate to reset to.
private  int x
          The current x coordinate.
private  int y
          The current y coordinate.
 
Constructor Summary
SmartConstraints()
          Returns a new smart constraints object starting at (1, 1).
SmartConstraints(int x, int y)
          Creates a new smart constraints object with the specified initial coordinates.
 
Method Summary
 void reset(int startX, int startY)
          Resets the smart constraints to the specified coordinates.
 com.jgoodies.forms.layout.CellConstraints x(int offsetX)
          Returns a cell constraints with the current location and a width and height of one.
 com.jgoodies.forms.layout.CellConstraints xw(int offsetX, int width)
          Returns a cell constraints with the current location, the specified width and height of one.
 com.jgoodies.forms.layout.CellConstraints y(int offsetY)
          Returns a cell constraints with the current location and a width and height of one.
 com.jgoodies.forms.layout.CellConstraints yw(int offsetY, int width)
          Returns a cell constraints with the current location and a width and height of one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cellConstraints

private final com.jgoodies.forms.layout.CellConstraints cellConstraints
The actual cell constraints object used.

Since:
0.3.0

initialX

private int initialX
The initial x coordinate to reset to.

Since:
0.3.0

x

private int x
The current x coordinate.

Since:
0.3.0

y

private int y
The current y coordinate.

Since:
0.3.0
Constructor Detail

SmartConstraints

public SmartConstraints()
Returns a new smart constraints object starting at (1, 1).

The initial x coordinate is also set to 1.

Since:
0.3.0

SmartConstraints

public SmartConstraints(int x,
                        int y)
Creates a new smart constraints object with the specified initial coordinates.

Parameters:
x - the x coordinate, also serves as initial x coordinate.
y - the y coordinate.
Since:
0.3.0
Method Detail

reset

public void reset(int startX,
                  int startY)
Resets the smart constraints to the specified coordinates.

The x coordinate also server as initial x coordinate.

Parameters:
startX - the x coordinate, also serves as initial x coordinate.
startY - the y coordinate.
Since:
0.3.0

x

public com.jgoodies.forms.layout.CellConstraints x(int offsetX)
Returns a cell constraints with the current location and a width and height of one.

The x coordinate is incremented by the specified offset once the constraints are determined, the y coordinate is left untouched.

Parameters:
offsetX - the x coordinate offset.
Returns:
the cell constraints requested.
Since:
0.3.0

xw

public com.jgoodies.forms.layout.CellConstraints xw(int offsetX,
                                                    int width)
Returns a cell constraints with the current location, the specified width and height of one.

The x coordinate is incremented by the specified offset once the constraints are determined, the y coordinate is left untouched.

Parameters:
offsetX - the x coordinate offset.
width - the width of the cell constraint returned.
Returns:
the cell constraints requested.
Since:
0.3.0

y

public com.jgoodies.forms.layout.CellConstraints y(int offsetY)
Returns a cell constraints with the current location and a width and height of one.

The x coordinate is reset to the initial value and the y coordinate is incremented by the specified offset once the constraints are determined.

Parameters:
offsetY - the y coordinate offset.
Returns:
the cell constraints requested.
Since:
0.3.0

yw

public com.jgoodies.forms.layout.CellConstraints yw(int offsetY,
                                                    int width)
Returns a cell constraints with the current location and a width and height of one.

The x coordinate is reset to the initial value and the y coordinate is incremented by the specified offset once the constraints are determined.

Parameters:
offsetY - the y coordinate offset.
width - the width of the cell constraint returned.
Returns:
the cell constraints requested.
Since:
0.3.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG