EchoPoint
1.0

echopoint.layout
Class GridLayoutManager.CellConstraints

java.lang.Object
  extended byechopoint.layout.GridLayoutManager.CellConstraints
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
GridLayoutManager

public static class GridLayoutManager.CellConstraints
extends java.lang.Object
implements java.io.Serializable

This class is designed to be used as a contraints object with GridLayoutManager. It denotes a col1,row1,col2,row2 position of a Component within the GridLayoutManager.

See Also:
Serialized Form

Field Summary
static int PERCENT_UNITS
          A constant used in the setWidthUnits() and setHeightUnits() methods.
static int PIXEL_UNITS
          A constant used in the setWidthUnits() and setHeightUnits() methods.
 
Constructor Summary
GridLayoutManager.CellConstraints(int col1, int row1)
          CellConstraints constructor for col1 == col2 and row1 == row2.
GridLayoutManager.CellConstraints(int col1, int row1, int col2, int row2)
          CellConstraints constructor.
 
Method Summary
 nextapp.echo.Color getBackground()
           
 int getCol1()
          Returns the Col1 co-ord
 int getCol2()
          Returns the Col2 co-ord
 nextapp.echo.Font getFont()
           
 nextapp.echo.Color getForeground()
           
 int getHeight()
          Returns the current height value of the cell or -1 if its not set
 int getHeightUnits()
          Returns the height untis in action for this cell.
 int getRow1()
          Returns the Row1 co-ord
 int getRow2()
          Returns the Row1 co-ord
 int getWidth()
          Returns the current width value of the cell or -1 if its not set
 int getWidthUnits()
          Returns the width untis in action for this cell.
 boolean overlaps(GridLayoutManager.CellConstraints cell)
          Returns true of the current GridCellContraint overlaps with the provided one.
 void setBackground(nextapp.echo.Color background)
           
 void setFont(nextapp.echo.Font font)
           
 void setForeground(nextapp.echo.Color foreground)
           
 void setHeight(int height)
          Sets the height of the cell
 GridLayoutManager.CellConstraints setHeightInPercent(int height)
           
 GridLayoutManager.CellConstraints setHeightInPixels(int height)
           
 void setHeightUnits(int units)
          Sets the height units of the cell
 void setWidth(int width)
          Sets the width of the cell
 GridLayoutManager.CellConstraints setWidthInPercent(int width)
           
 GridLayoutManager.CellConstraints setWidthInPixels(int width)
           
 void setWidthUnits(int units)
          Sets the width units of the cell
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PIXEL_UNITS

public static final int PIXEL_UNITS
A constant used in the setWidthUnits() and setHeightUnits() methods. This value specifies that pixel-based units are used in defining the individual column or row sizes and the overall width and height of the grid.

See Also:
Constant Field Values

PERCENT_UNITS

public static final int PERCENT_UNITS
A constant used in the setWidthUnits() and setHeightUnits() methods. This value specifies that percent-based are used in defining both the individual column or row sizes and the overall width or height of the grid.

See Also:
Constant Field Values
Constructor Detail

GridLayoutManager.CellConstraints

public GridLayoutManager.CellConstraints(int col1,
                                         int row1)
CellConstraints constructor for col1 == col2 and row1 == row2. The co-ordinates will be normalised so that 0 <= col1 >= col2 and 0 <= row1 >= row2.


GridLayoutManager.CellConstraints

public GridLayoutManager.CellConstraints(int col1,
                                         int row1,
                                         int col2,
                                         int row2)
CellConstraints constructor. The co-ordinates will be normalised so that 0 <= col1 >= col2 and 0 <= row1 >= row2.

Method Detail

getCol1

public int getCol1()
Returns the Col1 co-ord

Returns:
int

getCol2

public int getCol2()
Returns the Col2 co-ord

Returns:
int

getRow1

public int getRow1()
Returns the Row1 co-ord

Returns:
int

getRow2

public int getRow2()
Returns the Row1 co-ord

Returns:
int

overlaps

public boolean overlaps(GridLayoutManager.CellConstraints cell)
Returns true of the current GridCellContraint overlaps with the provided one.


toString

public java.lang.String toString()

getHeight

public int getHeight()
Returns the current height value of the cell or -1 if its not set

Returns:
the current height value of the cell or -1 if its not set

getWidth

public int getWidth()
Returns the current width value of the cell or -1 if its not set

Returns:
the current width value of the cell or -1 if its not set

getHeightUnits

public int getHeightUnits()
Returns the height untis in action for this cell.

Returns:
the height untis in action for this cell.

getWidthUnits

public int getWidthUnits()
Returns the width untis in action for this cell.

Returns:
the width untis in action for this cell.

setHeight

public void setHeight(int height)
Sets the height of the cell

Parameters:
height - - the height of the cell

setHeightUnits

public void setHeightUnits(int units)
Sets the height units of the cell

Parameters:
units - - the height units of the cell

setWidth

public void setWidth(int width)
Sets the width of the cell

Parameters:
width - the width of the cell

setWidthUnits

public void setWidthUnits(int units)
Sets the width units of the cell

Parameters:
units - - the width units of the cell

setHeightInPixels

public GridLayoutManager.CellConstraints setHeightInPixels(int height)

setHeightInPercent

public GridLayoutManager.CellConstraints setHeightInPercent(int height)

setWidthInPixels

public GridLayoutManager.CellConstraints setWidthInPixels(int width)

setWidthInPercent

public GridLayoutManager.CellConstraints setWidthInPercent(int width)

getBackground

public nextapp.echo.Color getBackground()
Returns:
Returns the background.

setBackground

public void setBackground(nextapp.echo.Color background)
Parameters:
background - The background to set.

getFont

public nextapp.echo.Font getFont()
Returns:
Returns the font.

setFont

public void setFont(nextapp.echo.Font font)
Parameters:
font - The font to set.

getForeground

public nextapp.echo.Color getForeground()
Returns:
Returns the foreground.

setForeground

public void setForeground(nextapp.echo.Color foreground)
Parameters:
foreground - The foreground to set.

EchoPoint
1.0