|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.lib.min_interactor | +--sub_arctic.lib.base_interactor | +--sub_arctic.lib.base_parent_interactor | +--sub_arctic.lib.row
This object puts its children in a tiled row, from left to right. They can be aligned along the TOP, CENTER, or BOTTOM.
Field Summary | |
protected int |
_border
Border (whitespace) around all the children. |
protected boolean |
_boxed
If this variable is set, the interactor has a box around it. |
protected color_pair |
_colors
This holds the color pair in use for this object. |
protected int |
_interchild_space
The spacing between children. |
protected byte |
_layout_type
The layout type for this row. |
protected boolean |
_opaque
If this variable is set, the interactor has an opaque background. |
protected boolean |
_size_by_children
This holds our state variable about whether or not we are sized by our children. |
static byte |
BOTTOM_JUSTIFIED
Constant to denote right justified layout |
static byte |
CENTER_JUSTIFIED
Constant to denote centered layout. |
static byte |
TOP_JUSTIFIED
Constant to denote left justified layout. |
Fields inherited from class sub_arctic.lib.base_interactor |
_child_index,
_child_list,
_clip_bounds,
_constraint_flags,
_enabled_constraint,
_flags,
_h,
_h_constraint,
_parent,
_part_a_constraint,
_part_b_constraint,
_user_data,
_visible_constraint,
_w,
_w_constraint,
_x,
_x_constraint,
_y,
_y_constraint,
default_child_hint |
Constructor Summary | |
row(int ic,
byte lt)
Minimal row constructor. |
|
row(int b,
int ic,
boolean box,
boolean o,
byte lt)
Smaller row constructor. |
|
row(int xv,
int yv,
int wv,
int hv,
int b,
int ic,
boolean box,
boolean o,
boolean sbc,
byte lt,
color_pair cp)
Full constructor for row. |
Method Summary | |
void |
add_child(interactor chld)
Override from base_interactor to also add constraints |
int |
border()
Return the border around all the children (in pixels). |
boolean |
boxed()
Return whether or not the interactor has a box around it. |
color_pair |
colors()
Return the current color pair. |
protected void |
draw_self_local(drawable d)
Draw the object on the provided drawable |
void |
insert_child(int at_indx,
interactor chld)
Override to also add constraints |
int |
interchild_space()
return the spacing between children. |
byte |
layout_type()
The layout type for this row. |
boolean |
opaque()
Return whether or not the interactor has an opaque background |
interactor |
remove_child(int at_indx)
Override to also add constraints |
void |
remove_child(interactor the_child)
Override to also add constraints |
void |
set_border(int v)
Set border all around the children. |
void |
set_boxed(boolean b)
Control whether or not the interactor has a box around it. |
protected void |
set_child_constraints()
Establish or reestablish constraints on children to form a row. |
void |
set_child(int at_indx,
interactor chld)
Overridden from base_interactor to also add constraints |
void |
set_colors(color_pair cp)
Set the current color pair. |
void |
set_interchild_space(int v)
Set the spacing between children. |
void |
set_layout_type(byte v)
Set the layout type for this row. |
void |
set_local_constraints()
Set up the constraint for this object's width and height. |
void |
set_opaque(boolean b)
Control whether or not the interactor has an opaque background |
void |
set_size_by_children(boolean b)
Control whether or not we are sized by our children. |
boolean |
size_by_children()
Return whether or not we are sized by our children. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected boolean _boxed
protected boolean _size_by_children
protected color_pair _colors
protected boolean _opaque
protected int _border
protected int _interchild_space
public static final byte CENTER_JUSTIFIED
public static final byte TOP_JUSTIFIED
public static final byte BOTTOM_JUSTIFIED
protected byte _layout_type
Constructor Detail |
public row(int xv, int yv, int wv, int hv, int b, int ic, boolean box, boolean o, boolean sbc, byte lt, color_pair cp)
int
- xv the x position of this interactor.int
- yv the y position of this interactor.int
- wv the width of this interactor.int
- hv the height of this interactor.int
- b the border around the children of this row.int
- ic the inter-child spacing for this row.boolean
- box whether or not you want a box around this interactor.boolean
- o whether or not the object has an opaque background.boolean
- sbc size by children (true if you want this object to
derive its size from its children).byte
- b the type of layout you want for this row (must be
one of the constants CENTER_JUSTIFIED,
TOP_JUSTIFIED, BOTTOM_JUSTIFIED).color_pair
- cp the color pair to use if this object is opaque (if
you use null here you'll get the system's default
color pair).public row(int b, int ic, boolean box, boolean o, byte lt)
int
- b the border around the children of this row.int
- ic the inter-child spacing for this row.boolean
- box whether or not you want a box around this interactor.boolean
- o whether or not the object is opaque.byte
- b the type of layout you want for this row (must be one
of the constants CENTER_JUSTIFIED, TOP_JUSTIFIED,
BOTTOM_JUSTIFIED).public row(int ic, byte lt)
int
- ic the inter-child spacing for this row.byte
- b the type of layout you want for this row (must be one of
the constants CENTER_JUSTIFIED, TOP_JUSTIFIED,
BOTTOM_JUSTIFIED).Method Detail |
public boolean boxed()
public void set_boxed(boolean b)
boolean
- b new state of boxednesspublic boolean size_by_children()
public void set_size_by_children(boolean b)
boolean
- b whether to size ourselves by our childrenpublic color_pair colors()
public void set_colors(color_pair cp)
color_pair
- cp the new color_pair for this interactorpublic boolean opaque()
public void set_opaque(boolean b)
boolean
- b new state of opaquenesspublic int border()
public void set_border(int v)
int
- v the size of the border around the children in pixelspublic int interchild_space()
public void set_interchild_space(int v)
int
- v the new interchild spacingpublic byte layout_type()
public void set_layout_type(byte v)
byte
- v the type of layout you want (must be one of the constants
CENTER_JUSTIFIED, TOP_JUSTIFIED, BOTTOM_JUSTIFIED).public void set_local_constraints()
protected void set_child_constraints()
protected void draw_self_local(drawable d)
drawable
- d the surface to draw onpublic void set_child(int at_indx, interactor chld)
int
- at_indx the index position at which to change the childinteractor
- chld the new child interactor for that positionpublic void add_child(interactor chld)
interactor
- chld the child interactor to addpublic void insert_child(int at_indx, interactor chld)
int
- at_indx the index position at which to insert the childinteractor
- chld the child interactor to insertpublic interactor remove_child(int at_indx)
int
- at_indx the index position of the child to removepublic void remove_child(interactor the_child)
interactor
- the_child the child to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |