sub_arctic.lib
Class tab_parent

java.lang.Object
  |
  +--sub_arctic.lib.min_interactor
        |
        +--sub_arctic.lib.base_interactor
              |
              +--sub_arctic.lib.base_parent_interactor
                    |
                    +--sub_arctic.lib.tab_parent

public class tab_parent
extends base_parent_interactor
implements pressable

tabbed-pannel parent


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  java.util.Hashtable _labels
           
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.
protected  int _vis_child
          Visible child
 
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
tab_parent()
          Minimal tab_parent constructor.
tab_parent(int b, boolean box, boolean o)
          Smaller tab_parent constructor.
tab_parent(int xv, int yv, int wv, int hv, int b, boolean box, boolean o, boolean sbc, color_pair cp)
          Full constructor for a tab_parent.
 
Method Summary
 void add_child(interactor chld)
          Override from base_interactor to also add constraints
 void add_tab(interactor chld, java.lang.String label)
          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
 boolean opaque()
          Return whether or not the interactor has an opaque background
 void pick(int pt_x, int pt_y, pick_collector pick_list)
           
 boolean press(event evt, java.lang.Object user_info)
           
 boolean release(event evt, java.lang.Object user_info)
          Companion to press -- here we ignore the releases.
 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_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.
 void set_vis_child(int i)
           
 boolean size_by_children()
          Return whether or not we are sized by our children.
 int vis_child()
           
 
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, 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

_labels

protected java.util.Hashtable _labels

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

_vis_child

protected int _vis_child
Visible child

_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.
Constructor Detail

tab_parent

public tab_parent(int xv,
                  int yv,
                  int wv,
                  int hv,
                  int b,
                  boolean box,
                  boolean o,
                  boolean sbc,
                  color_pair cp)
Full constructor for a tab_parent.
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.
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.
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).

tab_parent

public tab_parent(int b,
                  boolean box,
                  boolean o)
Smaller tab_parent constructor. This assumes that you want to just set the actual parameters of the tab_parent 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
boolean - box whether or not you want a box around this interactor
boolean - o whether or not the object is opaque

tab_parent

public tab_parent()
Minimal tab_parent constructor. This assumes that you want to use constraints for position and children for size. It makes the tab_parent have a border and be opaque and have no whitespace border around its edges. This uses the system's default colors.
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

vis_child

public int vis_child()
Returns:
int the currently visible child

set_vis_child

public void set_vis_child(int i)
Parameters:
int - i new visible interactor

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

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

pick

public void pick(int pt_x,
                 int pt_y,
                 pick_collector pick_list)
Parameters:
int - pt_x x coordinate of picking point
int - pt_y y coordinate of picking point
pick_collector - pick_list result list
Overrides:
pick in class base_interactor

press

public boolean press(event evt,
                     java.lang.Object user_info)
Specified by:
press in interface pressable
Parameters:
event - evt the press event.
Object - user_info the information associated with this object at pick time.
Returns:
boolean indicating whether the event was consumed.

release

public boolean release(event evt,
                       java.lang.Object user_info)
Companion to press -- here we ignore the releases.
Specified by:
release in interface pressable
Parameters:
event - evt the release event.
Object - user_info information associated with this object at pick time.
Returns:
boolean indicating whether we consumed this input (here always false).

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

add_tab

public void add_tab(interactor chld,
                    java.lang.String label)
Override from base_interactor to also add constraints
Parameters:
interactor - chld the child interactor to add

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