Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.services.swingx

Class XTableConstraints

com.gentleware.services.swingx.XTableConstraints

public class XTableConstraints


Describes the position and resizing behaviour of a single component in a XTableLayout.
An instance of this class is created internally by XTableLayout whenever a string constraint is used when a component is added to the container. XTableConstraints objects can be created explicitly to specify the constraints when adding to a container, but it's much more convenient to stick with the string mechanism.

Copyright: Copyright (c) 2002

Authors:
Stephen Kelvin
See also:
com.gentleware.services.swingx.XTableLayout


 Attribute Summary
public static int  BOTTOM
yAlign value to specify alignment of the component at the bottom of its column  
public static int  CENTER
xAlign or yAlign value to specify alignment of the component at the center of its column or row  
public static int  FILL
xAlign or yAlign value to specify that the component should be expanded to fill its its column or row  
public static int  LEFT
xAlign value to specify alignment of the component at the left of its column  
public static int  NEXT
x or y value to specify that the component should be placed in the column or row following the component added previously  
public static int  RIGHT
xAlign value to specify alignment of the component at the right of its column  
public static int  SAME
x or y value to specify that the component should be placed in same the column or row as the component added previously  
public static int  TOP
yAlign value to specify alignment of the component at the top of its column  
public int  _height
number of rows that the associated component spans  
public int  _width
number of columns that the associated component spans  
public int  _x
column index at which the associated component starts  
public int  _xAlign
horizontal alignment of the associated component within its column  
public double  _xWeight
specifies how much the component's column(s) should expand in relation to all columns  
public int  _y
row index at which the associated component starts  
public int  _yAlign
vertical alignment of the associated component within its row  
public double  _yWeight
specifies how much the component's row(s) should expand in relation to all rows  
arrow_up
 

 Association Summary
public XTableLayout.ComponentInfo  xTableLayout_ComponentInfo
 
arrow_up
 

 Constructor Summary
public   XTableConstraints(String text)
Creates a new constraints object using a string specification. 
public   XTableConstraints(int x, int y)
 
public   XTableConstraints(int x, int y, int width, int height)
Creates a new constraints object using the given position and size and defaults for other values (xAlign = LEFT, yAlign = TOP, xWeight = 0, yWeight = 0). 
public   XTableConstraints(int x, int y, int width, int height, int xAlign, int yAlign)
Creates a new constraints object using the given position, size and alignment and default weights (xWeight = 0, yWeight = 0). 
public   XTableConstraints(int x, int y, int width, int height, int xAlign, int yAlign, double xWeight, double yWeight)
Creates a new constraints object using the given position, size, alignment and weights. 
arrow_up
 

 Method Summary
public boolean   equals(Object other)
Constraints object are strictly value based, so this will return true if all attributes are equal. 
private String   getAlignText(int align)
 
private String   getIndexText(int pos)
 
public int   hashCode()
Overridden to ensure that constraints objects that are equal() have the same hash code. 
public XTableConstraints   resolveRelativePositions(int lastX, int lastY, int lastWidth, int lastHeight)
return a constraint object that has any relative position attributes (NEXT, SAME) replaced by absolute positions using the given base position  
public String   toString()
 
arrow_up
 

Tagged Values
static false
 

 Attribute Detail

BOTTOM

public static int BOTTOM

yAlign value to specify alignment of the component at the bottom of its column  
arrow_up


CENTER

public static int CENTER

xAlign or yAlign value to specify alignment of the component at the center of its column or row  
arrow_up


FILL

public static int FILL

xAlign or yAlign value to specify that the component should be expanded to fill its its column or row  
arrow_up


LEFT

public static int LEFT

xAlign value to specify alignment of the component at the left of its column  
arrow_up


NEXT

public static int NEXT

x or y value to specify that the component should be placed in the column or row following the component added previously  
arrow_up


RIGHT

public static int RIGHT

xAlign value to specify alignment of the component at the right of its column  
arrow_up


SAME

public static int SAME

x or y value to specify that the component should be placed in same the column or row as the component added previously  
arrow_up


TOP

public static int TOP

yAlign value to specify alignment of the component at the top of its column  
arrow_up


_height

public int _height

number of rows that the associated component spans  
arrow_up


_width

public int _width

number of columns that the associated component spans  
arrow_up


_x

public int _x

column index at which the associated component starts  
arrow_up


_xAlign

public int _xAlign

horizontal alignment of the associated component within its column  
arrow_up


_xWeight

public double _xWeight

specifies how much the component's column(s) should expand in relation to all columns  
arrow_up


_y

public int _y

row index at which the associated component starts  
arrow_up


_yAlign

public int _yAlign

vertical alignment of the associated component within its row  
arrow_up


_yWeight

public double _yWeight

specifies how much the component's row(s) should expand in relation to all rows  
arrow_up
 Association Detail

xTableLayout_ComponentInfo

public XTableLayout.ComponentInfo xTableLayout_ComponentInfo

arrow_up
 Constructor Detail

XTableConstraints

public XTableConstraints XTableConstraints(String text)


Creates a new constraints object using a string specification. Defaults for missing values are width = 1, height = 1, xAlign = LEFT, yAlign = TOP, xWeight = 0, yWeight = 0  
Parameters:
text - constraints in the form "x y [width height [xAlign yAlign [xWeigth yWeigth]]]"
Returns:
See also:
int,
arrow_up


XTableConstraints

public XTableConstraints XTableConstraints(int x, int y)

Parameters:
x -
y -
Returns:
arrow_up


XTableConstraints

public XTableConstraints XTableConstraints(int x, int y, int width, int height)


Creates a new constraints object using the given position and size and defaults for other values (xAlign = LEFT, yAlign = TOP, xWeight = 0, yWeight = 0).  
Parameters:
x - column index where the component should start, must be non-negative integer value or SAME or NEXT
y - row index where the component should start, must be non-negative integer value or SAME or NEXT
width - number of columns that the component spans, must be positiv
height - number of rows that the component spans, must be positiv
Returns:
arrow_up


XTableConstraints

public XTableConstraints XTableConstraints(int x, int y, int width, int height, int xAlign, int yAlign)


Creates a new constraints object using the given position, size and alignment and default weights (xWeight = 0, yWeight = 0).  
Parameters:
x - column index where the component should start, must be non-negative integer value or SAME or NEXT
y - row index where the component should start, must be non-negative integer value or SAME or NEXT
width - number of columns that the component spans, must be positiv
height - number of rows that the component spans, must be positiv
xAlign - one of LEFT, CENTER, RIGHT or FILL
yAlign - one of TOP, CENTER, BOTTOM or FILL
Returns:
arrow_up


XTableConstraints

public XTableConstraints XTableConstraints(int x, int y, int width, int height, int xAlign, int yAlign, double xWeight, double yWeight)


Creates a new constraints object using the given position, size, alignment and weights.  
Parameters:
x - column index where the component should start, must be non-negative integer value or SAME or NEXT
y - row index where the component should start, must be non-negative integer value or SAME or NEXT
width - number of columns that the component spans, must be positiv
height - number of rows that the component spans, must be positiv
xAlign - one of LEFT, CENTER, RIGHT or FILL
yAlign - one of TOP, CENTER, BOTTOM or FILL
xWeight - specifies how much the component's column(s) should expand in relation to all columns
yWeight - specifies how much the component's row(s) should expand in relation to all rows
Returns:
arrow_up
 Method Detail

equals

public boolean equals(Object other)


Constraints object are strictly value based, so this will return true if all attributes are equal.  
Parameters:
other - the reference object with which to compare.
Returns:
true if this object is the same as the other argument; false otherwise.
See also:
#hashCode()
arrow_up


getAlignText

private String getAlignText(int align)

Parameters:
align -
Returns:
arrow_up


getIndexText

private String getIndexText(int pos)

Parameters:
pos -
Returns:
arrow_up


hashCode

public int hashCode()


Overridden to ensure that constraints objects that are equal() have the same hash code.  
Returns:
a hash code value for this object.
See also:
#equals(java.lang.Object)
arrow_up


resolveRelativePositions

public XTableConstraints resolveRelativePositions(int lastX, int lastY, int lastWidth, int lastHeight)


return a constraint object that has any relative position attributes (NEXT, SAME) replaced by absolute positions using the given base position  
Parameters:
lastX - base column index to which NEXT or SAME x values are resolved
lastY - base row index to which NEXT or SAME x values are resolved
lastWidth - increment to add to lastX for NEXT value
lastHeight - increment to add to lastY for NEXT value
Returns:
arrow_up


toString

public String toString()

Returns:
arrow_up
Created  2004 - 10 - 21

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.