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

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
 

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.4.0 (Build 15)
2009/05/20 08:15:11
Copyright (c) 2002-2007 Ergon Informatik AG