|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgui.layout.HIGConstraints
Defines constraints for each component added to container with HIGLayout layout manager. Defines components target area: x, y (column, row) of top left corner, width (number of columns or absolute size in pixels), height (number of rows or absolute size in pixels), anchors string, vertical and horizontal corrections. Usually You will use one instance of this class because HIGLayout copies passed constraint object when adds component to container.
Most of methods returns this object so Your can chain more calls into single line of code.
Field Summary | |
(package private) java.lang.String |
anchor
|
private static java.lang.String |
defaultAnchor
|
(package private) int |
h
|
(package private) int |
hCorrection
|
(package private) int |
w
|
(package private) int |
wCorrection
|
(package private) int |
x
|
(package private) int |
xCorrection
|
(package private) int |
y
|
(package private) int |
yCorrection
|
Constructor Summary | |
|
HIGConstraints()
|
(package private) |
HIGConstraints(HIGConstraints c)
|
Method Summary | |
HIGConstraints |
anchors(java.lang.String anchors)
Sets anchors string. |
int |
c()
Returns current column index. |
HIGConstraints |
c(int c)
Sets column index. |
HIGConstraints |
c(int c,
java.lang.String anchors)
Sets column index and anchors. |
HIGConstraints |
clearCorrection()
Clears all corrections. |
HIGConstraints |
cwh(int c,
int w,
int h)
Sets column index, target area width and height. |
HIGConstraints |
cwh(int c,
int w,
int h,
java.lang.String anchors)
Sets column index, target area width, height and anchors. |
HIGConstraints |
H(int h)
Sets width to absolute size in pixels. |
HIGConstraints |
next2Col()
Increases current column index by two. |
HIGConstraints |
next2Row()
Increases current row index by two. |
HIGConstraints |
nextCol()
Increases current column index by one. |
HIGConstraints |
nextRow()
Increases current row index by one. |
int |
r()
Returns current row index. |
HIGConstraints |
r(int r)
Sets row index. |
HIGConstraints |
r(int r,
java.lang.String anchors)
Sets row index and anchors. |
HIGConstraints |
rc(int r,
int c)
Sets row and column index. |
HIGConstraints |
rc(int r,
int c,
java.lang.String anchors)
Sets row and column index and anchors. |
HIGConstraints |
rcwh(int r,
int c,
int w,
int h)
Sets row and column index, width and height. |
HIGConstraints |
rcwh(int r,
int c,
int w,
int h,
java.lang.String anchors)
Sets row and column index, width, height and anchors. |
HIGConstraints |
rwh(int r,
int w,
int h)
Sets row index, target area width and height. |
HIGConstraints |
rwh(int r,
int w,
int h,
java.lang.String anchors)
Sets row index, target area width, height and anchors. |
HIGConstraints |
setHCorrection(int xCorr,
int wCorr)
Set horizontal correction until changed or cleared. |
HIGConstraints |
setVCorrection(int yCorr,
int hCorr)
Set vertical correction until changed or cleared. |
HIGConstraints |
W(int w)
Sets width to absolute size in pixels. |
int |
x()
Returns current column index. |
HIGConstraints |
x(int x)
Sets column index. |
HIGConstraints |
x(int x,
java.lang.String anchors)
Sets column index and anchors. |
HIGConstraints |
xwh(int x,
int w,
int h)
Sets column index, target area width and height. |
HIGConstraints |
xwh(int x,
int w,
int h,
java.lang.String anchors)
Sets column index, target area width, height and anchors. |
HIGConstraints |
xy(int x,
int y)
Sets row and column index. |
HIGConstraints |
xy(int x,
int y,
java.lang.String anchors)
Sets row and column index and anchors. |
HIGConstraints |
xywh(int x,
int y,
int w,
int h)
Sets row and column index, width and height. |
HIGConstraints |
xywh(int x,
int y,
int w,
int h,
java.lang.String anchors)
Sets row and column index, width, height and anchors. |
int |
y()
Returns current row index. |
HIGConstraints |
y(int y)
Sets row index. |
HIGConstraints |
y(int y,
java.lang.String anchors)
Sets row index and anchors. |
HIGConstraints |
ywh(int y,
int w,
int h)
Sets row index, target area width and height. |
HIGConstraints |
ywh(int y,
int w,
int h,
java.lang.String anchors)
Sets row index, target area width, height and anchors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String defaultAnchor
int x
int y
int w
int h
int xCorrection
int yCorrection
int wCorrection
int hCorrection
java.lang.String anchor
Constructor Detail |
HIGConstraints(HIGConstraints c)
public HIGConstraints()
Method Detail |
public HIGConstraints setHCorrection(int xCorr, int wCorr)
xCorr
- correction of horizontal position, in pixels. Can be negative.wCorr
- correction of width, in pixels. Can be negative.
clearCorrection()
public HIGConstraints setVCorrection(int yCorr, int hCorr)
yCorr
- correction of vertical position, in pixels. Can be negative.hCorr
- correction of height, in pixels. Can be negative.
clearCorrection()
public HIGConstraints clearCorrection()
setHCorrection(int, int)
,
setVCorrection(int, int)
public HIGConstraints nextRow()
public HIGConstraints next2Row()
public HIGConstraints nextCol()
public HIGConstraints next2Col()
public HIGConstraints x(int x)
x
- column index
public HIGConstraints c(int c)
c
- column index
public HIGConstraints x(int x, java.lang.String anchors)
x
- column indexanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints c(int c, java.lang.String anchors)
c
- column indexanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints xwh(int x, int w, int h)
x
- column indexw
- width, number of columnsh
- height, number of rows
public HIGConstraints cwh(int c, int w, int h)
c
- column indexw
- width, number of columnsh
- height, number of rows
public HIGConstraints xwh(int x, int w, int h, java.lang.String anchors)
x
- column indexw
- width, number of columnsh
- height, number of rowsanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints cwh(int c, int w, int h, java.lang.String anchors)
c
- column indexw
- width, number of columnsh
- height, number of rowsanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints y(int y)
y
- row index
public HIGConstraints r(int r)
r
- row index
public HIGConstraints y(int y, java.lang.String anchors)
y
- row indexanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints r(int r, java.lang.String anchors)
r
- row indexanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints ywh(int y, int w, int h)
y
- row indexw
- width, number of columnsh
- height, number of rows
public HIGConstraints rwh(int r, int w, int h)
r
- row indexw
- width, number of columnsh
- height, number of rows
public HIGConstraints ywh(int y, int w, int h, java.lang.String anchors)
y
- row indexw
- width, number of columnsh
- height, number of rowsanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints rwh(int r, int w, int h, java.lang.String anchors)
r
- row indexw
- width, number of columnsh
- height, number of rowsanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints xy(int x, int y)
x
- column indexy
- row index
public HIGConstraints rc(int r, int c)
r
- row indexc
- column index
public HIGConstraints xy(int x, int y, java.lang.String anchors)
x
- column indexy
- row indexanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints rc(int r, int c, java.lang.String anchors)
r
- row indexc
- column indexanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints xywh(int x, int y, int w, int h)
x
- column indexy
- row indexw
- width, number of columnsh
- height, number of rows
public HIGConstraints rcwh(int r, int c, int w, int h)
r
- row indexc
- column indexw
- width, number of columnsh
- height, number of rows
public HIGConstraints xywh(int x, int y, int w, int h, java.lang.String anchors)
x
- column indexy
- row indexw
- width, number of columnsh
- height, number of rowsanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints rcwh(int r, int c, int w, int h, java.lang.String anchors)
r
- row indexc
- column indexw
- width, number of columnsh
- height, number of rowsanchors
- anchors string (of letters 'l','r','t','b')
public HIGConstraints W(int w)
w
- width value in pixels
public HIGConstraints H(int h)
h
- height value in pixels
public HIGConstraints anchors(java.lang.String anchors)
anchors
- anchors string (of letters 'l','r','t','b')
public int x()
public int y()
public int c()
public int r()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |