|
All Methods zio package context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object zio.ZObject zio.ZSlice zio.ZRow
A ZRow
is a horizontal slice of a part of a window.
A ZRow
is almost identical to a ZCol
. One can
be obtained
from the other by transposing the vertical and horizontal
directions. Both are ZObject
s.
A ZRow
will stretch in a horizontal direction
when the user expands a window. If none of the ZObject
s
in a column expands horizontally, the expansion will happen in the
spaces around the ZObject
s; otherwise it happens in those
ZObject
s. (Those which can expand horizontally.)
If any nonexpanding component ZObject
is too short for
the others, it will be centered vertically within the column
It you don't like this, you can get position that ZObject
upwards or downwards by putting a ZCol
around it.
and using atTop()
or atBottom()
.
By default, ZRow
will not expand vertically even
if component object is capable of vertical expansion.
Think of this default state as "half locked". Horizontal
expansion will happen even if none of the component
ZObject
s expands horizontally. Vertical expansion
will not happen even if some of the component objects
expand vertically. From
this half-locked, state you can use the unlock()
suffix
to unlock expansion vertically or the lock()
suffix to
lock expansion horizontally. The lock
suffix overrides
the unlock suffix.
Constructor Summary | |
ZRow(ZObject gu)
Create a ZRow with a single ZObject . |
|
ZRow(ZObject[] gs)
Create a ZRow with multiple objects given in an array. |
|
ZRow(ZObject gu1,
ZObject gu2)
Create a ZRow with two ZObject s. |
|
ZRow(ZObject gu1,
ZObject gu2,
ZObject gu3)
Create a ZRow with three ZObject s. |
|
ZRow(ZObject gu1,
ZObject gu2,
ZObject gu3,
ZObject gu4)
Create a ZRow with four ZObject s. |
Method Summary | |
ZRow |
atLeft()
Suffix that forces leftmost component ZObject to appear
at the left of the row without any intervening space. |
ZRow |
atRight()
Suffix that forces rightmost component ZObject to
appear at the right of the row without any
intervening space. |
ZRow |
background(java.awt.Color c)
Suffix that determines the background color of the row. |
ZRow |
debug(java.lang.String debugId)
Suffix that creates debug output. |
ZRow |
foreground(java.awt.Color c)
Suffix that sets the foreground color of the row. |
ZRow |
framed(int margin)
Suffix that creates an etched frame around the ZRow . |
ZRow |
grid()
Suffix that creates a grid, or two dimensional array, of ZObject s. |
ZRow |
lock()
Causes row to be unexpandable in any direction. |
ZRow |
space(int space)
Suffix that sets minimum spacing. |
ZRow |
unframed(int margin)
Suffix that creates the margin used with a frame without creating the frame. |
ZRow |
uniform()
This suffix causes all component ZObject s to be
the same size. |
ZRow |
unlock()
Suffix that permits row to expand vertically. |
Methods inherited from class zio.ZObject |
getSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZRow(ZObject[] gs)
ZRow
with multiple objects given in an array.
The objects of ZRow
will appear from left to right
in the order
gs[0]
, gs[1]
, ... .
gs
- an array of those ZObjects
which will appear
in the rowpublic ZRow(ZObject gu)
ZRow
with a single ZObject
.
gu
- the object to appear in the rowpublic ZRow(ZObject gu1, ZObject gu2)
ZRow
with two ZObject
s.
gu1
- the leftmost object to appear in the rowgu2
- the rightmost object to appear in the rowpublic ZRow(ZObject gu1, ZObject gu2, ZObject gu3)
ZRow
with three ZObject
s.
gu1
- the leftmost object to appear in the rowgu2
- the middle object to appear in the rowgu3
- the rightmost object to appear in the rowpublic ZRow(ZObject gu1, ZObject gu2, ZObject gu3, ZObject gu4)
ZRow
with four ZObject
s.
gu1
- the leftmost object to appear in the rowgu2
- the left middle object to appear in the rowgu3
- the right middle object to appear in the rowgu4
- the rightmost object to appear in the rowMethod Detail |
public final ZRow debug(java.lang.String debugId)
public ZRow framed(int margin)
ZRow
.
This margin overrides any other spacing on the sides
of the slice. Do not use with unframed()
suffix.
margin
- size of margin between the slice and the framepublic ZRow unframed(int margin)
framed()
suffix.
margin
- size of margin around the slicepublic final ZRow atLeft()
ZObject
to appear
at the left of the row without any intervening space.
public final ZRow atRight()
ZObject
to
appear at the right of the row without any
intervening space.
public final ZRow space(int space)
This minimum always applies to space between
component ZObject
s. It applies to
space at left and right only if no framed()
,
unframed()
, atLeft()
, or atRight()
suffix has been
used.
public final ZRow uniform()
ZObject
s to be
the same size. No component object can be a slice.
The calculated size will be the smallest that
can accommodate the minimum size of all objects.
Causes expandH()
and expandV()
to be ignored.
public final ZRow unlock()
ZObject
s already expands vertically.
public final ZRow lock()
unlock()
suffix to be ignored.
public final ZRow background(java.awt.Color c)
ZObjects
.
c
- the desired colorpublic final ZRow foreground(java.awt.Color c)
ZObjects
.
public ZRow grid()
ZObject
s. ZObject
s in any one
row are forced to have the same height and ZObject
s
in any one column are forced to have the same width.
To make the grid, you must populate this ZRow
only with ZCol
s and each column must have the
same number of ZObject
s.
The only suffixes that work with grid()
are
foreground()
, background()
, space()
,
framed()
, unframed()
and debug()
.
The only suffix that will work on any the ZCol
s that
define the columns of this grid is debug()
. Suffixes
work as normal on the ZObject
s in the grid.
NOT YET IMPLEMENTED.
|
author context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |