sub_arctic.lib
Class row

java.lang.Object
  |
  +--sub_arctic.lib.min_interactor
        |
        +--sub_arctic.lib.base_interactor
              |
              +--sub_arctic.lib.base_parent_interactor
                    |
                    +--sub_arctic.lib.row
Direct Known Subclasses:
backdrop_row

public class row
extends base_parent_interactor

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 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

_boxed

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

_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

_colors

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

_opaque

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

_border

protected int _border
Border (whitespace) around all the children.

_interchild_space

protected int _interchild_space
The spacing between children.

CENTER_JUSTIFIED

public static final byte CENTER_JUSTIFIED
Constant to denote centered layout.

TOP_JUSTIFIED

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

BOTTOM_JUSTIFIED

public static final byte BOTTOM_JUSTIFIED
Constant to denote right justified layout

_layout_type

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

row

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)
Full constructor for row.
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 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).

row

public row(int b,
           int ic,
           boolean box,
           boolean o,
           byte lt)
Smaller row constructor. This assumes that you want to just set the actual parameters of the row and you will use constraints to do all sizing & positioning. It uses the system's default colors for opaque backgrounds.
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).

row

public row(int ic,
           byte lt)
Minimal row constructor. This assumes that you want to use constraints for size & position. It makes the row not have a border and be opaque and have no whitespace border around its edges. It uses the system default colors.
Parameters:
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

boxed

public boolean boxed()
Return whether or not the interactor has a box around it.
Returns:
boolean true if the row 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

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

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

opaque

public boolean opaque()
Return whether or not the interactor has an opaque background
Returns:
boolean true if the row 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

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 row.
Returns:
byte the type of layout in use in this interactor (must be one of the constants CENTER_JUSTIFIED, TOP_JUSTIFIED, BOTTOM_JUSTIFIED).

set_layout_type

public void set_layout_type(byte v)
Set the layout type for this row.
Parameters:
byte - v 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 up 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 row.

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