|
|||||||||
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.column
This object is a composition that puts its children in a tiled column from top to bottom. It can be aligned with LEFT, RIGHT, or CENTER justification.
Field Summary | |
protected int |
_border
Border 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 column. |
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 |
CENTER_JUSTIFIED
Constant to denote centered layout. |
static byte |
LEFT_JUSTIFIED
Constant to denote left justified layout. |
static byte |
RIGHT_JUSTIFIED
Constant to denote right 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 | |
column(int ic,
byte lt)
Minimal column constructor. |
|
column(int b,
int ic,
boolean box,
boolean o,
byte lt)
Smaller column constructor. |
|
column(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 a column. |
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 column. |
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 column. |
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 column. |
void |
set_local_constraints()
Set 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 _size_by_children
protected boolean _boxed
protected boolean _opaque
protected int _border
protected color_pair _colors
protected int _interchild_space
public static final byte CENTER_JUSTIFIED
public static final byte LEFT_JUSTIFIED
public static final byte RIGHT_JUSTIFIED
protected byte _layout_type
Constructor Detail |
public column(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 column.int
- ic the inter-child spacing for this column.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 pass true if this column's size should be controlled
by its children, false to use the size passed by
the user and/or constraints.byte
- lt the type of layout you want for this column (must
be one of the constants CENTER_JUSTIFIED,
RIGHT_JUSTIFIED, LEFT_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 column(int b, int ic, boolean box, boolean o, byte lt)
int
- b the border around the children of this rowint
- ic the inter-child spacing for this rowboolean
- box whether or not you want a box around this interactorboolean
- o whether or not the object is opaquebyte
- b the type of layout you want for this row (must be one
of the constants CENTER_JUSTIFIED, TOP_JUSTIFIED,
BOTTOM_JUSTIFIED).public column(int ic, byte lt)
int
- ic the inter-child spacing for this columnbyte
- b the type of layout you want for this column (must be one
of the constants CENTER_JUSTIFIED, LEFT_JUSTIFIED,
RIGHT_JUSTIFIED).Method Detail |
public boolean size_by_children()
public void set_size_by_children(boolean b)
boolean
- b whether to size ourselves by our childrenpublic boolean boxed()
public void set_boxed(boolean b)
boolean
- b new state of boxednesspublic 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 color_pair colors()
public void set_colors(color_pair cp)
color_pair
- cp the new color_pair for this interactorpublic 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
- 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 child.interactor
- chld the new child interactor for that position.public 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 |