sub_arctic.lib
Class column

java.lang.Object
  |
  +--sub_arctic.lib.min_interactor
        |
        +--sub_arctic.lib.base_interactor
              |
              +--sub_arctic.lib.base_parent_interactor
                    |
                    +--sub_arctic.lib.column
Direct Known Subclasses:
backdrop_column, menu, style_column, text_flow

public class column
extends base_parent_interactor

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 sub_arctic.lib.base_interactor
active_constraints, add_user_datum, attach_dependent, bound, callback_obj, child_index, child, clear_child_list, clear_constraint_flag_bit, clear_flag_bit, configure, constraint_flag_is_set, constraint_flag_string, constraint_on, custom_fun1, custom_fun2, damage_fixed, damage_from_child, damage_self, damage_self, damage_self, damage_self, damage_self, detach_dependent, do_action, do_action, do_callback, do_callback, drag_feature_point, draw_children, draw_self, enabled_constraint, enabled, enter_local_coordinates, eval_enabled, eval_h, eval_part_a, eval_part_b, eval_visible, eval_w, eval_x, eval_y, eval, exit_local_coords, feature_point_enabled, feature_point, filter_pt, find_child, first_callback_num, fixed_children, flag_is_set, flag_string, focus_set_enter, focus_set_exit, get_awt_component, get_external_constraint, get_part, get_top_level, get_value, global_to_local, global_to_local, h_constraint, h, handle_cycle, inform_ood, inside_bounds, into_local, into_local, into_parent, into_parent, intrinsic_constraints, is_constrained, last_callback_num, local_to_global, local_to_global, mark_all_ood, mark_enabled_ood, mark_h_ood, mark_ood, mark_part_a_ood, mark_part_b_ood, mark_reparented_ood, mark_visible_ood, mark_w_ood, mark_x_ood, mark_y_ood, marked_ood, move_child_downward, move_child_downward, move_child_to_bottom, move_child_to_bottom, move_child_to_top, move_child_to_top, move_child_upward, move_child_upward, move_downward, move_to_bottom, move_to_top, move_upward, new_look_configure, next_sibling, num_actions, num_children, num_feature_points, ood_inform_all, parent, part_a_constraint, part_a, part_b_constraint, part_b, pick_within_children, pick, picked_by, pos, prev_sibling, register_resource_names, remove_user_datum, restyle_look_resources, restyle, set_callback_obj, set_child_index, set_constraint_flag_bit, set_constraint_flag_bit, set_constraint, set_constraint, set_enabled_constraint, set_enabled_constraint, set_enabled_constraint, set_enabled, set_flag_bit, set_flag_bit, set_h_constraint, set_h_constraint, set_h_constraint, set_h, set_intrinsic_h, set_intrinsic_size, set_intrinsic_w, set_parent, set_part_a_constraint, set_part_a_constraint, set_part_a_constraint, set_part_a, set_part_b_constraint, set_part_b_constraint, set_part_b_constraint, set_part_b, set_pos, set_pos, set_raw_enabled, set_raw_h, set_raw_part_a, set_raw_part_b, set_raw_visible, set_raw_w, set_raw_x, set_raw_y, set_size, set_style_lock, set_user_info, set_visible_constraint, set_visible_constraint, set_visible_constraint, set_visible, set_w_constraint, set_w_constraint, set_w_constraint, set_w, set_x_constraint, set_x_constraint, set_x_constraint, set_x, set_y_constraint, set_y_constraint, set_y_constraint, set_y, setup_for_children, setup_for_children, setup_for_fixed_children, size, style_change_local, style_change, supports_children, tag_str, toString, traverse_and_collect_children, traverse_and_collect_parent, traverse_and_collect, trivial_reject, trivial_reject, user_data, user_info, value_ood, visible_constraint, visible, w_constraint, w, x_constraint, x_into_local, x_into_parent, x, y_constraint, y_into_local, y_into_parent, y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_size_by_children

protected boolean _size_by_children
This holds our state variable about whether or not we are sized by our children. This variable should be set at construction time, but can later be changed if necessary. Note: be careful about changing this after construction time! If it was on and you turn it off, nothing will happen, but you should take into account from then on that the column won't size itself to its children automatically. If it was off and you turn it on, your column's size will change at that point, so you should be sure there will be enough room, etc... for it

_boxed

protected boolean _boxed
If this variable is set, the interactor has a box around it.

_opaque

protected boolean _opaque
If this variable is set, the interactor has an opaque background.

_border

protected int _border
Border around all the children.

_colors

protected color_pair _colors
This holds the color pair in use for this object. null indicates to use the system default color pair.

_interchild_space

protected int _interchild_space
The spacing between children.

CENTER_JUSTIFIED

public static final byte CENTER_JUSTIFIED
Constant to denote centered layout.

LEFT_JUSTIFIED

public static final byte LEFT_JUSTIFIED
Constant to denote left justified layout.

RIGHT_JUSTIFIED

public static final byte RIGHT_JUSTIFIED
Constant to denote right justified layout

_layout_type

protected byte _layout_type
The layout type for this column.
Constructor Detail

column

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)
Full constructor for a column.
Parameters:
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).

column

public column(int b,
              int ic,
              boolean box,
              boolean o,
              byte lt)
Smaller column constructor. This assumes that you want to just set the actual parameters of the column and you will use constraints to do all positioning. It uses the system default colors and assumes your width and height will be controlled by the children.
Parameters:
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).

column

public column(int ic,
              byte lt)
Minimal column constructor. This assumes that you want to use constraints for position and children for size. It makes the column not have a border and be opaque and have no whitespace border around its edges. This uses the system's default colors.
Parameters:
int - ic the inter-child spacing for this column
byte - b the type of layout you want for this column (must be one of the constants CENTER_JUSTIFIED, LEFT_JUSTIFIED, RIGHT_JUSTIFIED).
Method Detail

size_by_children

public boolean size_by_children()
Return whether or not we are sized by our children.
Returns:
boolean true if we are sized by our children

set_size_by_children

public void set_size_by_children(boolean b)
Control whether or not we are sized by our children. Note: be careful about changing this after construction time! If it was on and you turn it off, nothing will happen, but you should take into account from then on that the column won't size itself to its children automatically. If it was off and you turn it on, your column's size will change at that point, so you should be sure there will be enough room, etc... for it
Parameters:
boolean - b whether to size ourselves by our children

boxed

public boolean boxed()
Return whether or not the interactor has a box around it.
Returns:
boolean true if the column has a box around it

set_boxed

public void set_boxed(boolean b)
Control whether or not the interactor has a box around it.
Parameters:
boolean - b new state of boxedness

opaque

public boolean opaque()
Return whether or not the interactor has an opaque background
Returns:
boolean true if the column is opaque

set_opaque

public void set_opaque(boolean b)
Control whether or not the interactor has an opaque background
Parameters:
boolean - b new state of opaqueness

border

public int border()
Return the border around all the children (in pixels).
Returns:
int the size of the border in pixels

set_border

public void set_border(int v)
Set border all around the children.
Parameters:
int - v the size of the border around the children in pixels

colors

public color_pair colors()
Return the current color pair. If you get null, we are using the system's default color pair. Note that the color pair for this interactor is not consulted if the object is not opaque.
Returns:
color_pair the current color pair

set_colors

public void set_colors(color_pair cp)
Set the current color pair. If you set this to null, you'll get the system default color pair.
Parameters:
color_pair - cp the new color_pair for this interactor

interchild_space

public int interchild_space()
Return the spacing between children.
Returns:
int the space between the children in the row (in pixels)

set_interchild_space

public void set_interchild_space(int v)
Set the spacing between children.
Parameters:
int - v the new interchild spacing

layout_type

public byte layout_type()
The layout type for this column.
Returns:
byte the type of layout in use in this interactor (must be one of the constants CENTER_JUSTIFIED, LEFT_JUSTIFIED, RIGHT_JUSTIFIED)

set_layout_type

public void set_layout_type(byte v)
Set the layout type for this column.
Parameters:
byte - the type of layout you want (must be one of the constants CENTER_JUSTIFIED, TOP_JUSTIFIED, BOTTOM_JUSTIFIED)

set_local_constraints

public void set_local_constraints()
Set the constraint for this object's width and height.

set_child_constraints

protected void set_child_constraints()
Establish or reestablish constraints on children to form a column.

draw_self_local

protected void draw_self_local(drawable d)
Draw the object on the provided drawable
Parameters:
drawable - d the surface to draw on
Overrides:
draw_self_local in class base_interactor

set_child

public void set_child(int at_indx,
                      interactor chld)
Overridden from base_interactor to also add constraints
Parameters:
int - at_indx the index position at which to change the child.
interactor - chld the new child interactor for that position.
Overrides:
set_child in class base_interactor

add_child

public void add_child(interactor chld)
Override from base_interactor to also add constraints
Parameters:
interactor - chld the child interactor to add
Overrides:
add_child in class base_interactor

insert_child

public void insert_child(int at_indx,
                         interactor chld)
Override to also add constraints
Parameters:
int - at_indx the index position at which to insert the child
interactor - chld the child interactor to insert
Overrides:
insert_child in class base_interactor

remove_child

public interactor remove_child(int at_indx)
Override to also add constraints
Parameters:
int - at_indx the index position of the child to remove
Overrides:
remove_child in class base_interactor

remove_child

public void remove_child(interactor the_child)
Override to also add constraints
Parameters:
interactor - the_child the child to remove
Overrides:
remove_child in class base_interactor