sub_arctic.lib
Class base_interactor

java.lang.Object
  |
  +--sub_arctic.lib.min_interactor
        |
        +--sub_arctic.lib.base_interactor
Direct Known Subclasses:
backdrop, base_parent_interactor, coord_tracker, editor, h_slider_display, hv_line, icon, interactor_with_parts, line_display, line_parent, menu_item, menubar, multi_button, multi_button, multilist, multilist_list, oneline_text_display, point_snap_target, rgb_color_picker, simple_color_picker, size_tracker, spacer, style_backdrop, text_display, uni_container, v_slider_display, v_slider_display

public class base_interactor
extends min_interactor
implements move_drag_filter

This class provides the basic implementation for interactor objects. Although it is possible to build interactor objects without inheriting from this class (since interactor itself is an interface) all interactor objects currently in the system inherit from this class.

This class provides basic capabilities in 13 areas:

Each of these areas has a section in the source code. See the user's manual for conceptual material related to each area (each of these areas is covered by a sub-section of the user's manual) and see the methods below for the details of each supported routine.

Note: due to limitations on some (most?) platforms that do not allow for protected methods in interfaces, a number of routines here (and in the interactor interface) that should be protected, are currently public. These are marked by comments in the code, and will be reverted to protected as soon as enough platforms allow.

By convention (here and throughout the system) instance variables are all protected and begin with an underscore ('_'). When access methods are provide, the read method has the same name but without the underscore (e.g., x()), while the write method begins with 'set_' followed by the base name (e.g., set_x()).


Field Summary
protected  int _child_index
          Index of this object within the parent's child list.
protected  java.util.Vector _child_list
          Child interactors of this object.
protected  java.awt.Rectangle _clip_bounds
          This is the place where the previous clipping rectangle (the one before we entered the coordinates of this object) is stored until needed.
protected  int _constraint_flags
          Small bitset of flags indicating facts about the constraints of this interactor.
protected  int _enabled_constraint
          Encoding of constraint on enabled.
protected  int _flags
          Small bitset of flags indicating facts about this interactor.
protected  int _h
          Height of the object.
protected  int _h_constraint
          Encoding of constraint on h.
protected  interactor _parent
          Parent of this object.
protected  int _part_a_constraint
          Encoding of constraint on part_a.
protected  int _part_b_constraint
          Encoding of constraint on part_b.
protected  java.util.Vector _user_data
          A collection of Object references we are holding for the user or application.
protected  int _visible_constraint
          Encoding of constraint on visible.
protected  int _w
          Width of the object.
protected  int _w_constraint
          Encoding of constraint on w.
protected  int _x
          X position of the object's top-left corner in parent's coordinate system.
protected  int _x_constraint
          Encoding of constraint on x.
protected  int _y
          Y position of the object's top-left corner in parent's coordinate system.
protected  int _y_constraint
          Encoding of constraint on y.
protected static int default_child_hint
          Default initial allocation for child lists
 
Constructor Summary
base_interactor()
          Constructor that assumes a position of 0,0, and a (temporary) default size.
base_interactor(int x_v, int y_v)
          Constructor that assumes a (temporary) default size.
base_interactor(int x_v, int y_v, int w_v, int h_v)
          Full constructor.
 
Method Summary
 int active_constraints()
          Indicate which parts (coordinates/sizes/values) of this object are currently constrained.
 void add_child(interactor chld)
          Add a child to the end of the child list.
 void add_user_datum(java.lang.Object datum)
          Adds a data item to the collection of data items that we are holding for the user of this interactor.
 void attach_dependent(int on_part_num, value_consumer dep_obj, int dep_part)
          Register something as interested in (dependent on) one of the parts (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B) of this object.
 java.awt.Rectangle bound()
          Bounding rectangle of the object (in parent's coordinate system).
 callback_object callback_obj()
          Return the callback object associated with this object.
 int child_index()
          Return the child index of this interactor (within its parent).
 interactor child(int i)
          Return the child at the given index int the child list (whose first element is at index 0).
 void clear_child_list()
          Remove all the children of this interactors.
protected  void clear_constraint_flag_bit(int mask_value)
          Set the given constraint_flag bit(s) to false.
protected  void clear_flag_bit(int mask_value)
          Set the given flag bit(s) to false.
 void configure()
          Do the constraint evaluation necessary to make sure all visible objects in the subtree rooted at this object have up-to-date bounds (and other information) prior to drawing.
 boolean constraint_flag_is_set(int mask_value)
          Determine if a particular bit (or bits) is set in the constraint_flag set for the interactor.
 java.lang.String constraint_flag_string()
          Convert a constraint flag set into a human readable string.
 constraint constraint_on(int coord_code)
          Return a constraint object representing the constraint (if any) attached to the specified part (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).
 int custom_fun1(int val1, int const_val)
          A custom function accessible in the constraint system.
 int custom_fun2(int val1, int val2, int const_val)
          A custom function accessible in the constraint system.
protected  void damage_fixed()
          Indicate that any previous damage to the object's appearance has been fixed (by redrawing it).
 void damage_from_child(interactor originator, java.lang.Object user_info, java.awt.Point top_left, java.awt.Dimension sz)
          Indicate that a change to a child (or grandchild, etc.) affects the given screen region (expressed in the coordinates of this object).
 void damage_self()
          Indicate that the object has been modified in such as way that any or all of its appearance may change and its area of the screen needs to be redrawn.
 void damage_self(interactor originator, java.lang.Object user_info, java.awt.Point top_left, java.awt.Dimension sz)
          Indicate that the object has been modified in such as way that its appearance within the given area of the screen (expressed in local coordinates) might change and needs to be redrawn.
 void damage_self(int left, int top, int wid, int hi)
          Indicate that the object has been modified in such as way that its appearance within the given area of the screen (expressed in local coordinates) might change and needs to be redrawn.
 void damage_self(java.lang.Object user_info)
          Indicate that the object has been modified in such as way that any or all of its appearance may change and its area of the screen needs to be redrawn.
 void damage_self(java.awt.Point top_left, java.awt.Dimension sz)
          Indicate that the object has been modified in such as way that its appearance within the given area of the screen (expressed in local coordinates) might change and needs to be redrawn.
 void detach_dependent(int on_part_num, value_consumer dep_obj, int dep_part)
          Remove an (object,part) pair from the dependent (interested in) list associated with a particular part of this object.
 void do_action(event evt)
          Perform the default or primary actions associated with this interactor.
 void do_action(int action_num, event evt, java.lang.Object parm)
          Perform one of the actions associated with this interactor.
 void do_callback(event evt)
          Perform the default callback action for this object.
 void do_callback(event evt, int callback_num, java.lang.Object callback_info)
          Perform a callback from this object, passing the given parameters as part of the callback parameters.
 int drag_feature_point()
          Indicate the current "feature point" of an object.
protected  void draw_children(drawable d)
          Helper routine to draw the children of this interactor in normal (low to high index) drawing order.
protected  void draw_self_local(drawable d)
          Draw the object's current appearance (along with that of its children).
 void draw_self(drawable parent_d)
          Draw the object's current appearance.
 constraint enabled_constraint()
          Return a constraint object representing the constraint (if any) attached to enabled.
 boolean enabled()
          Indicate if object is enabled.
protected  drawable enter_local_coordinates(drawable parent_draw)
          Given a drawable surface set up for the parent coordinate space, create a new drawable set up for the local coordinate space.
 void eval_enabled()
          Bring enabled up to date with respect to any defining constraint.
 void eval_h()
          Bring h up to date with respect to any defining constraint.
 void eval_part_a()
          Bring part_a up to date with respect to any defining constraint.
 void eval_part_b()
          Bring part_b up to date with respect to any defining constraint.
 void eval_visible()
          Bring visible up to date with respect to any defining constraint.
 void eval_w()
          Bring w up to date with respect to any defining constraint.
 void eval_x()
          Bring x up to date with respect to any defining constraint.
 void eval_y()
          Bring y up to date with respect to any defining constraint.
 void eval(int coord_code)
          Bring the indicated value up to date with respect to any defining constraints.
protected  void exit_local_coords(drawable parent_draw, drawable local_draw)
          Do the work to exit the local coordinate system.
 boolean feature_point_enabled(int indx)
          Indicate whether the indicated "feature point" of an object is considered to be enabled.
 java.awt.Point feature_point(int indx)
          Access to the "feature points" of an object (by index).
 java.awt.Point filter_pt(java.awt.Point original_pt, interactor obj, java.awt.Point feature_pt)
          Default point filter.
 int find_child(interactor the_child)
          Find the given child in the child list and return its index.
 int first_callback_num()
          Indicate the first callback number used by this interactor.
 boolean fixed_children()
          Indicate whether this interactor uses a fixed set of children.
 boolean flag_is_set(int mask_value)
          Determine if a particular bit (or bits) is set in the flag set for the interactor.
 java.lang.String flag_string()
          Convert a flag set into a human readable string.
 void focus_set_enter(event cause_evt, focus_dispatch_agent of_agent, java.lang.Object user_info)
          Default action for entering a focus set.
 void focus_set_exit(event cause_evt, focus_dispatch_agent of_agent, java.lang.Object user_info)
          Default action for exiting a focus set.
 java.awt.Component get_awt_component()
          Retrieve the AWT component that this sub_arctic object is drawn within.
 provider_part_ref get_external_constraint(int for_part)
          Get the external value provider (if any) associated with the given part value (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).
 int get_part(int what_code)
          Get the specified component (X, Y, W, or H) or of object's geometry.
 top_level get_top_level()
          Retrieve the top_level interactor (if any) that this object is installed (perhaps several levels down) under.
 java.lang.Object get_value(int part_number)
          Get an up-to-date copy of a particular part value(X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).
 java.awt.Point global_to_local(int xv, int yv)
          Transform a point in global coordinate space (that is the coordinate system of the top_level object which roots the interactor tree this object is in) into the local space of the object.
 java.awt.Point global_to_local(java.awt.Point global_pt)
          Transform a point in global coordinate space (that is the coordinate system of the top_level object which roots the interactor tree this object is in) into the local space of the object.
 constraint h_constraint()
          Return a constraint object representing the constraint (if any) attached to h.
 int h()
          Height of the object.
 boolean handle_cycle(int part_code)
          Handle a cycle detected in constraints on a given part of this object.
 void inform_ood(int from_type, int from_part, int nth_child)
          Inform the object that the indicated part of a potentially related object is out-of-date (this is called from ood_inform_all()).
 void insert_child(int at_indx, interactor chld)
          Insert a child at the given location, moving current children at or after that index further down in the list.
 boolean inside_bounds(int pt_x, int pt_y)
          Determine if the given point (in the local coordinates of this object) is inside the extent of this object's normal bound.
 java.awt.Point into_local(int xv, int yv)
          Transform a point from parent's coordinate space to local coordinates of this object.
 java.awt.Point into_local(java.awt.Point parent_pt)
          Transform a point from parent's coordinate space to local coordinates of this object.
 java.awt.Point into_parent(int xv, int yv)
          Transform a local point into the parent's coordinate space.
 java.awt.Point into_parent(java.awt.Point local_pt)
          Transform a local point into the parent's coordinate space.
 int intrinsic_constraints()
          Indicate which parts (coordinates/sizes/values) of this object are intrinsically constrained by the internals of the object.
 boolean is_constrained(int coord_code)
          Indicate whether a specific part is currently constrained.
 int last_callback_num()
          Indicate the last callback number used by this interactor.
 java.awt.Point local_to_global(int xv, int yv)
          Transform a point in the local coordinate space into the global space (that is the coordinate system of the top_level object which roots the interactor tree this object is in).
 java.awt.Point local_to_global(java.awt.Point local_pt)
          Transform a point in the local coordinate space into the global space (that is the coordinate system of the top_level object which roots the interactor tree this object is in).
 void mark_all_ood()
          Mark all geometric parts of this object out of date.
 void mark_enabled_ood()
          Mark enabled value and anything that directly or indirectly depends on it as out-of-date.
 void mark_h_ood()
          Mark h value and anything that directly or indirectly depends on it as out-of-date.
 void mark_ood(int coord_code)
          Mark the given value as out of date.
 void mark_part_a_ood()
          Mark part_a value and anything that directly or indirectly depends on it as out-of-date.
 void mark_part_b_ood()
          Mark part_b value and anything that directly or indirectly depends on it as out-of-date.
 void mark_reparented_ood()
          Mark all our geometric parts out-of-date and tell all potentially dependent objects that all our parts are out-of-date (this gets done when we move around in the hierarchy).
 void mark_visible_ood()
          Mark visible value and anything that directly or indirectly depends on it as out-of-date.
 void mark_w_ood()
          Mark w value and anything that directly or indirectly depends on it as out-of-date.
 void mark_x_ood()
          Mark x value and anything that directly or indirectly depends on it as out-of-date.
 void mark_y_ood()
          Mark y value and anything that directly or indirectly depends on it as out-of-date.
 int marked_ood()
          Indicate which values are currently marked as potentially out of date with respect to their constraints.
 void move_child_downward(int chld_indx)
          Move the child currently at the given index in the child list down one position in drawing order (which is one position earlier in the list).
 void move_child_downward(interactor the_child)
          Move the given child down one position in drawing order of the child list (which is earlier in the list).
 void move_child_to_bottom(int chld_indx)
          Move the child currently at the given index in the child list to the bottom in drawing order (which is first in the list).
 void move_child_to_bottom(interactor the_child)
          Move the given child to the bottom of the child list in drawing order (which is first in the list).
 void move_child_to_top(int chld_indx)
          Move the child currently at the given index in the child list to the top in drawing order (which is last in the list).
 void move_child_to_top(interactor the_child)
          Move the given child to the top of the child list in drawing order (which is last in the list).
 void move_child_upward(int chld_indx)
          Move the child currently at the given index in the child list up one position in drawing order (which is one position further into the list).
 void move_child_upward(interactor the_child)
          Move the given child up one position in drawing order of the child list (which is later in the list).
 void move_downward()
          Move this object one position lower in its parent's drawing order (which is one position earlier in its child list).
 void move_to_bottom()
          Move this object to the bottom of its parent's drawing order (first in its child list).
 void move_to_top()
          Move this object to the top of its parent's drawing order (last in its child list).
 void move_upward()
          Move this object one position higher in its parent's drawing order (which is one position further into its child list).
protected  void new_look_configure()
          Recompute the size and other properties of this interactor that may have been changed by a change in style resources.
 interactor next_sibling()
          Return the next sibling of this object (or null if there is none).
 int num_actions()
          Number of actions supported by do_action().
 int num_children()
          Indicate the number of children this interactor currently has.
 int num_feature_points()
          The number of "feature points" of an object.
protected  void ood_inform_all(int which_part)
          Tell all potentially dependent objects about an out of date part.
 interactor parent()
          Return the parent of this interactor.
 constraint part_a_constraint()
          Return a constraint object representing the constraint (if any) attached to part_a.
 int part_a()
          Return the value of part_a.
 constraint part_b_constraint()
          Return a constraint object representing the constraint (if any) attached to part_b.
 int part_b()
          Return the value of part_b.
protected  void pick_within_children(int pt_x, int pt_y, pick_collector pick_list)
          Utility routine to perform pick over children.
 void pick(int pt_x, int pt_y, pick_collector pick_list)
          Determine if this object and/or any of its decedent objects is "picked" by the the given point.
 boolean picked_by(int pt_x, int pt_y)
          Determine if the given point (in the local coordinates of this object) is inside the extent of the object picking purposes.
 java.awt.Point pos()
          Position of the top-left corner of this object in the parent coordinate system.
 interactor prev_sibling()
          Return the previous sibling of this object (or null if there is none).
static void register_resource_names()
          Register any style resource names owned by this class.
 interactor remove_child(int at_indx)
          Remove the child found at the given index and return it.
 void remove_child(interactor the_child)
          Remove the given child from the child list.
 boolean remove_user_datum(java.lang.Object datum)
          Removes a data item from the collection of data items that we are holding for the user of this interactor.
protected  void restyle_look_resources(style new_style)
          "Restyle" current style-based resources used by this interactor to conform to the given style (here in the base class we do nothing).
 void restyle(style new_style)
          Force a restyle of the interactor under the given style.
 void set_callback_obj(callback_object callbk)
          Set the callback object associated with this object.
 void set_child_index(int indx)
          Set the child index of this interactor (within its parent).
 void set_child(int at_indx, interactor chld)
          Set the child at the given index replacing any child that was previously there.
protected  void set_constraint_flag_bit(int mask_value)
          Set the given constraint_flag bit(s) to true.
protected  void set_constraint_flag_bit(int mask_value, boolean v)
          Set the given constraint_flag bit(s) to the given value.
 void set_constraint(int coord_code, constraint a_constraint)
          Establish a constraint on the given value (one of X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).
 void set_constraint(int code, value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the given value (one of X, Y, W, H, VISIBLE, ENABLED, PART_A, PART_B).
 void set_enabled_constraint(constraint a_constraint)
          Establish a constraint on the enabled value of this object.
 void set_enabled_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the enabled value of this object.
 void set_enabled_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the enabled value of this object.
 void set_enabled(boolean v)
          Set the enabled status of the interactor.
protected  void set_flag_bit(int mask_value)
          Set the given flag bit(s) to true.
protected  void set_flag_bit(int mask_value, boolean v)
          Set the given flag bit(s) to the given value.
 void set_h_constraint(constraint a_constraint)
          Establish a constraint on the h value of this object.
 void set_h_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the h value of this object.
 void set_h_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the h value of this object.
 void set_h(int v)
          Set height of object.
protected  void set_intrinsic_h(int hv)
          Set intrinsic height.
protected  void set_intrinsic_size(int wv, int hv)
          Set intrinsic size.
protected  void set_intrinsic_w(int wv)
          Set intrinsic width.
 void set_parent(interactor par)
          Set the parent of this interactor.
 void set_part_a_constraint(constraint a_constraint)
          Establish a constraint on the part_a value of this object.
 void set_part_a_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the part_a value of this object.
 void set_part_a_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the part_a value of this object.
 void set_part_a(int v)
          Set part_a of object.
 void set_part_b_constraint(constraint a_constraint)
          Establish a constraint on the part_b value of this object.
 void set_part_b_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the part_b value of this object.
 void set_part_b_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the part_b value of this object.
 void set_part_b(int v)
          Set part_b of object.
 void set_pos(int xv, int yv)
          Set position of this object in parent coordinate system.
 void set_pos(java.awt.Point p)
          Set position of this object in parent coordinate system.
protected  void set_raw_enabled(boolean v)
          Set enabled value directly bypassing the constraint system (but doing screen damage).
protected  void set_raw_h(int v)
          Set h value directly bypassing the constraint system (but doing movement damage).
protected  void set_raw_part_a(int v)
          Set part_a value directly bypassing the constraint system.
protected  void set_raw_part_b(int v)
          Set part_b value directly bypassing the constraint system.
protected  void set_raw_visible(boolean v)
          Set visible value directly bypassing the constraint system (but doing screen damage).
protected  void set_raw_w(int v)
          Set w value directly bypassing the constraint system (but doing movement damage).
protected  void set_raw_x(int v)
          Set x value directly bypassing the constraint system (but doing movement damage).
protected  void set_raw_y(int v)
          Set y value directly bypassing the constraint system (but doing movement damage).
 void set_size(int wv, int hv)
          Set the size of the object.
 void set_style_lock(boolean lock_v)
          Lock or unlock the style of this interactor.
 void set_user_info(java.lang.Object user_inf)
          Set the uninterpreted "user information" that we are holding for the user of this object.
 void set_visible_constraint(constraint a_constraint)
          Establish a constraint on the visible value of this object.
 void set_visible_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the visible value of this object.
 void set_visible_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the visible value of this object.
 void set_visible(boolean v)
          Set the visibility of the interactor.
 void set_w_constraint(constraint a_constraint)
          Establish a constraint on the w value of this object.
 void set_w_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the w value of this object.
 void set_w_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the w value of this object.
 void set_w(int v)
          Set width of object.
 void set_x_constraint(constraint a_constraint)
          Establish a constraint on the x value of this object.
 void set_x_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the x value of this object.
 void set_x_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the x value of this object.
 void set_x(int v)
          Set x component of position in parent coordinate system.
 void set_y_constraint(constraint a_constraint)
          Establish a constraint on the y value of this object.
 void set_y_constraint(std_ext_constraint ext_cnstr)
          Establish a standard external constraint on the y value of this object.
 void set_y_constraint(value_provider ext_obj, int ext_part)
          Establish an "external" or "heavyweight" constraint on the y value of this object.
 void set_y(int v)
          Set y component of position in parent coordinate system.
protected  void setup_for_children()
          Helper method to set up object to support children.
protected  void setup_for_children(int size_hint)
          Helper method to set up object to support an expandable set of children.
protected  void setup_for_fixed_children(int number)
          Helper method to set up object to support a fixed set of children.
 java.awt.Dimension size()
          Size of the object.
 void style_change_local()
          Inform the interactor that the global current style has changed and that it may need to restyle itself.
 void style_change()
          This calls style_change_local() on itself and all its descendents to notify them of a change in the global current style.
 boolean supports_children()
          Indicate whether this interactor supports children.
 java.lang.String tag_str()
          Convert to a small tag string which indicates the type of interactor along with a (hopefully unique) integer (its hashCode) that can be used to identify it during debugging.
 java.lang.String toString()
          Convert to a human readable string.
 void traverse_and_collect_children(int traversal_kind, int traversal_order, boolean l_to_r, interactor_pred inclusion_test, interactor_pred continue_test, traversal_xform xform_parent_to_child, java.lang.Object parameters, pick_collector collection_result)
          Helper routine for traverse_and_collect() -- does recursive traversal of children in either left-to-right or right-to-left order.
protected  void traverse_and_collect_parent(int traversal_kind, interactor_pred inclusion_test, java.lang.Object parameters, pick_collector collection_result)
          Helper routine for traverse_and_collect() -- this does test on a single (parent) object.
 void traverse_and_collect(int traversal_kind, int traversal_order, interactor_pred inclusion_test, interactor_pred continue_test, traversal_xform xform_parent_to_child, java.lang.Object parameters, pick_collector collection_result)
          Do a traversal of the interactor tree to collect nodes meeting some criteria (or perform actions on qualifying nodes).
 boolean trivial_reject(drawable d)
          Do a trivial reject test that indicates whether the bounds of this object are entirely outside the clipping region of the given drawable object.
static boolean trivial_reject(drawable d, java.awt.Rectangle bounding_box)
          Do a trivial reject test that indicates whether the given bounding box is entirely outside the clipping region of the given drawable object.
 java.util.Enumeration user_data()
          Access to the collection of data items that we are holding for the user of this interactor.
 java.lang.Object user_info()
          Access to uninterpreted "user information" that we are holding for the user of this object.
 void value_ood(int for_part_here, value_provider prov_obj, int prov_part)
          Indicate that a part value (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B) with an external constraint attached should be marked out-of-date because something it depends on (externally) is out-of-date.
 constraint visible_constraint()
          Return a constraint object representing the constraint (if any) attached to visible.
 boolean visible()
          Indicate if the object considers itself visible.
 constraint w_constraint()
          Return a constraint object representing the constraint (if any) attached to w.
 int w()
          Width of the object.
 constraint x_constraint()
          Return a constraint object representing the constraint (if any) attached to x.
 int x_into_local(int xv)
          Transform an x value from parent's coordinate space to local coords.
 int x_into_parent(int xv)
          Transform an x value form local coordinates into the parent's coordinate space.
 int x()
          X position of the top-left corner of this object in the parent coordinate system.
 constraint y_constraint()
          Return a constraint object representing the constraint (if any) attached to y.
 int y_into_local(int yv)
          Transform an y value from parent's coordinate space to local coords.
 int y_into_parent(int yv)
          Transform an y value form local coordinates into the parent's coordinate space.
 int y()
          Y position of the top-left corner of this object in the parent coordinate system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_x

protected int _x
X position of the object's top-left corner in parent's coordinate system. Like all instance variables of this class, this variable should probably never be accessed directly -- use the public access methods instead.
See Also:
x(), set_x(int)

_y

protected int _y
Y position of the object's top-left corner in parent's coordinate system. Like all instance variables of this class, this variable should probably never be accessed directly -- use the public access methods instead.
See Also:
y(), set_y(int)

_w

protected int _w
Width of the object. Like all instance variables of this class, this variable should probably never be accessed directly -- use the public access methods instead.
See Also:
w(), set_w(int)

_h

protected int _h
Height of the object. Like all instance variables of this class, this variable should probably never be accessed directly -- use the public access methods instead.
See Also:
h(), set_h(int)

_x_constraint

protected int _x_constraint
Encoding of constraint on x. This instance variable should never be set directly.
See Also:
constraint, x_constraint(), set_x_constraint(sub_arctic.constraints.constraint)

_y_constraint

protected int _y_constraint
Encoding of constraint on y. This instance variable should never be set directly.
See Also:
constraint, y_constraint(), set_y_constraint(sub_arctic.constraints.constraint)

_w_constraint

protected int _w_constraint
Encoding of constraint on w. This instance variable should never be set directly.
See Also:
constraint, w_constraint(), set_w_constraint(sub_arctic.constraints.constraint)

_h_constraint

protected int _h_constraint
Encoding of constraint on h. This instance variable should never be set directly.
See Also:
constraint, h_constraint(), set_h_constraint(sub_arctic.constraints.constraint)

_visible_constraint

protected int _visible_constraint
Encoding of constraint on visible. This instance variable should never be set directly.
See Also:
constraint, visible_constraint(), set_visible_constraint(sub_arctic.constraints.constraint)

_enabled_constraint

protected int _enabled_constraint
Encoding of constraint on enabled. This instance variable should never be set directly.
See Also:
constraint, enabled_constraint(), set_enabled_constraint(sub_arctic.constraints.constraint)

_part_a_constraint

protected int _part_a_constraint
Encoding of constraint on part_a. This instance variable should never be set directly.
See Also:
constraint, part_a_constraint(), set_part_a_constraint(sub_arctic.constraints.constraint)

_part_b_constraint

protected int _part_b_constraint
Encoding of constraint on part_b. This instance variable should never be set directly.
See Also:
constraint, part_b_constraint(), set_part_b_constraint(sub_arctic.constraints.constraint)

_parent

protected interactor _parent
Parent of this object. Can be null if object is not currently installed in an interactor tree, or if this is a top_level interactor. This instance variable should never be set directly.
See Also:
parent(), set_parent(sub_arctic.lib.interactor)

_child_index

protected int _child_index
Index of this object within the parent's child list. This instance variable should never be set directly.
See Also:
child_index(), set_child_index(int)

_child_list

protected java.util.Vector _child_list
Child interactors of this object. _child_list will be null for interactor classes that do not support children (in that case, the SUPPORTS_CHILDREN bit in _flags should also be 0). Interactor classes with FIXED_CHILDREN set to 1 will always have the same number of children and attempting to assign outside that range will cause an error. In general, entries may be null.
See Also:
num_children(), child(int), set_child(int, sub_arctic.lib.interactor), add_child(sub_arctic.lib.interactor), insert_child(int, sub_arctic.lib.interactor), remove_child(int), find_child(sub_arctic.lib.interactor), move_child_to_top(int), move_child_to_bottom(int), move_child_upward(int), move_child_downward(int)

_flags

protected int _flags
Small bitset of flags indicating facts about this interactor. See interactor_consts.java for possible values and their meaning. Flag values are normally tested and set by flag_is_set(), set_flag_bit(), and clear_flag_bit().
See Also:
interactor_consts, flag_is_set(int), set_flag_bit(int, boolean), clear_flag_bit(int)

_constraint_flags

protected int _constraint_flags
Small bitset of flags indicating facts about the constraints of this interactor. See interactor_consts.java for possible values and their meaning. Flag values are normally tested and set by constraint_flag_is_set(), set_constraint_flag_bit(), and clear_constraint_flag_bit().
See Also:
interactor_consts, constraint_flag_is_set(int), set_constraint_flag_bit(int, boolean), clear_constraint_flag_bit(int)

_user_data

protected java.util.Vector _user_data
A collection of Object references we are holding for the user or application. The Objects in this collection are attached to the interactor, but otherwise the toolkit itself does not touch them. This allows for example, callback objects to retrieve application specific information related to this object.
See Also:
user_data(), add_user_datum(java.lang.Object), remove_user_datum(java.lang.Object), user_info(), set_user_info(java.lang.Object)

_clip_bounds

protected java.awt.Rectangle _clip_bounds
This is the place where the previous clipping rectangle (the one before we entered the coordinates of this object) is stored until needed. We need it when we exit this objects coordinates.

default_child_hint

protected static final int default_child_hint
Default initial allocation for child lists
Constructor Detail

base_interactor

public base_interactor(int x_v,
                       int y_v,
                       int w_v,
                       int h_v)
Full constructor.
Parameters:
int - x_v x position of this interactor within its parent's coordinate system.
int - y_v y position of this interactor within its parent's coordinate system.
int - w_v width of this interactor.
int - h_v height of this interactor.

base_interactor

public base_interactor(int x_v,
                       int y_v)
Constructor that assumes a (temporary) default size.
Parameters:
int - x_v x position of this interactor within its parent's coordinate system.
int - y_v y position of this interactor within its parent's coordinate system.

base_interactor

public base_interactor()
Constructor that assumes a position of 0,0, and a (temporary) default size.
Method Detail

setup_for_children

protected void setup_for_children(int size_hint)
Helper method to set up object to support an expandable set of children. This will normally be called from the constructor of a subclass that wants to support children (by default, base_interactor does not). The size_hint indicates how much storage to initially allocate in the child list Vector (however, num_children() initially returns 0 regardless of what is given here).
Parameters:
int - size_hint hint for initial size allocation for the child vector.

setup_for_children

protected void setup_for_children()
Helper method to set up object to support children. This will normally be called from the constructor of a subclass that wants to support children (by default, base_interactor does not).

setup_for_fixed_children

protected void setup_for_fixed_children(int number)
Helper method to set up object to support a fixed set of children. This will normally be called from the constructor of a subclass that wants to support children (by default base_interactor does not), but which either assigns specific meanings/roles to specific children, or for some other reason limits the number of children it will support. This method allocates the given number of slots for children and sets them each to null. int number the number of children this object will have.

pos

public java.awt.Point pos()
Position of the top-left corner of this object in the parent coordinate system. If either coordinate is controlled by a constraint, it will be brought up to date before this value is returned.
Returns:
Point the position of the object.

x

public int x()
X position of the top-left corner of this object in the parent coordinate system. If this coordinate is controlled by a constraint, it will be brought up to date before this value is returned.
Returns:
int the x position of the object.

y

public int y()
Y position of the top-left corner of this object in the parent coordinate system. If this coordinate is controlled by a constraint, it will be brought up to date before this value is returned.
Returns:
int the y position of the object.

size

public java.awt.Dimension size()
Size of the object. If either the width or height of the object is controlled by a constraint, it will be brought up to date before this value is returned.
Returns:
Dimension the size of the object.

w

public int w()
Width of the object. If this value is controlled by a constraint, it will be brought up to date before being returned.
Returns:
int the width of the object.

h

public int h()
Height of the object. If this value is controlled by a constraint, it will be brought up to date before being returned.
Returns:
int the height of the object.

bound

public java.awt.Rectangle bound()
Bounding rectangle of the object (in parent's coordinate system).
Returns:
Rectangle the bounding rectangle of the object.

get_part

public int get_part(int what_code)
Get the specified component (X, Y, W, or H) or of object's geometry. This also now works for VISIBLE, ENABLED, PART_A, and PART_B.
Parameters:
what_code - part number whose value is being requested.
Returns:
int the value of the requested part (after brining any attached constraints up-to-date).

set_pos

public void set_pos(int xv,
                    int yv)
Set position of this object in parent coordinate system.
Parameters:
int - yv y coordinate of the position.
int - xv x coordinate of the position.

set_pos

public void set_pos(java.awt.Point p)
Set position of this object in parent coordinate system.
Parameters:
Point - p the new position.

set_raw_x

protected void set_raw_x(int v)
Set x value directly bypassing the constraint system (but doing movement damage). This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.
Parameters:
int - v the new value for x.

set_x

public void set_x(int v)
Set x component of position in parent coordinate system.
Parameters:
int - v the new value for x.

set_raw_y

protected void set_raw_y(int v)
Set y value directly bypassing the constraint system (but doing movement damage). This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.
Parameters:
int - v the new value for y.

set_y

public void set_y(int v)
Set y component of position in parent coordinate system.
Parameters:
int - v the new value for y.

set_size

public void set_size(int wv,
                     int hv)
Set the size of the object.
Parameters:
int - wv the new value for w.
int - hv the new value for h.

set_intrinsic_size

protected void set_intrinsic_size(int wv,
                                  int hv)
Set intrinsic size. This method is called by subclasses to establish or change the size of the interactor when its size is considered to be intrinsically constrained. This method marks values out of date, but does not declare damage for the object.
Parameters:
int - wv the new value for w.
int - hv the new value for h.

set_raw_w

protected void set_raw_w(int v)
Set w value directly bypassing the constraint system (but doing movement damage). This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.
Parameters:
int - v the new value for w.

set_w

public void set_w(int v)
Set width of object.
Parameters:
int - v the new value for y.

set_intrinsic_w

protected void set_intrinsic_w(int wv)
Set intrinsic width. This method is called by subclasses to establish or change the width of the interactor when its width is considered to be intrinsically constrained. This method marks values out of date, but does not declare damage for the object.
Parameters:
int - wv new value for w.

set_raw_h

protected void set_raw_h(int v)
Set h value directly bypassing the constraint system (but doing movement damage). This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.
Parameters:
int - v the new value for the height.

set_h

public void set_h(int v)
Set height of object.
Parameters:
int - v the new value for the height.

set_intrinsic_h

protected void set_intrinsic_h(int hv)
Set intrinsic height. This method is called by subclasses to establish or change the height of the interactor when its width is considered to be intrinsically constrained. This method marks values out of date, but does not declare damage for the object.
Parameters:
int - hv the new value for the height.

visible

public boolean visible()
Indicate if the object considers itself visible. If a constraint is attached the value will be brought up-to-date with respect to the constraint first.
Returns:
boolean the visibility status of the object

set_raw_visible

protected void set_raw_visible(boolean v)
Set visible value directly bypassing the constraint system (but doing screen damage). This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.
Parameters:
boolean - v the new visibility status.

set_visible

public void set_visible(boolean v)
Set the visibility of the interactor.
Parameters:
boolean - v the new visibility status.

enabled

public boolean enabled()
Indicate if object is enabled. If a constraint is attached the value will be brought up-to-date with respect to the constraint first.

Note: currently setting an object disabled will keep it from being picked by the normal picking mechanism. This will (normally) disable positional inputs and as a side effect most focus based input (unless the the object is already the focus). However, since enabled status was added after many of the core interactor classes were created, for the most part the interactors in the library do not yet properly reflect the enable/disable status in their visual appearance. This is an important deficiency which we hope to correct in future releases.

Returns:
boolean the enable status of the interactor.

set_raw_enabled

protected void set_raw_enabled(boolean v)
Set enabled value directly bypassing the constraint system (but doing screen damage). This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.
Parameters:
boolean - v the new enable status.

set_enabled

public void set_enabled(boolean v)
Set the enabled status of the interactor.
Parameters:
boolean - v new value of enabled.

part_a

public int part_a()
Return the value of part_a. Part_a is a generic value that may be maintained by an interactor to represent some specific semantically meaningful part of its state that it wants to make available for use in the (lightweight) constraint system. For example, sliders make their "thumb value" available as part_a. Here in the base class, part_a is not implemented (it is intrinsically constrained to 0). see the commented out sample code in the source for details of how to implement a custom part_a for interactor subclasses. Alternately, you can inherit from the interactor_with_parts or parent_with_parts classes rather than base_interactor.
Returns:
int the value of part_a (after constraint evaluation if necessary).
See Also:
interactor_with_parts, parent_with_parts

set_raw_part_a

protected void set_raw_part_a(int v)
Set part_a value directly bypassing the constraint system. This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.

Here in the base class we have not implemented part_a, so this has no effect. In subclasses, this should first test if this is a change. if it is, then this should modify the value and (in most cases) call damage_self(). See the commented out sample code in the source for complete details. Better yet you can just inherit an implementation from interactor_with_parts or parent_with_parts.

Parameters:
int - v the new value for part_a
See Also:
interactor_with_parts, parent_with_parts

set_part_a

public void set_part_a(int v)
Set part_a of object. If part is controlled by a constraint, an exception is thrown. Here in the base class this is always the case.

For subclasses implementing part_a see the commented out sample code in the source or inherit from interactor_with_parts or parent_with_parts.

Parameters:
int - v the new value for part_a

part_b

public int part_b()
Return the value of part_b. Part_b is a generic value that may be maintained by an interactor to represent some specific semantically meaningful part of its state that it wants to make available for use in the (lightweight) constraint system. For example, sliders make their "thumb value" available as part_b. Here in the base class, part_b is not implemented (it is intrinsically constrained to 0). see the commented out sample code in the source for details of how to implement a custom part_b for interactor subclasses. Alternately, you can inherit from the interactor_with_parts or parent_with_parts classes rather than base_interactor.
Returns:
int the value of part_b (after constraint evaluation if necessary).
See Also:
interactor_with_parts, parent_with_parts

set_raw_part_b

protected void set_raw_part_b(int v)
Set part_b value directly bypassing the constraint system. This should normally only be done by the constraint system or some other part of the system which takes care of marking things out-of-date, etc. itself.

Here in the base class we have not implemented part_b, so this has no effect. In subclasses, this should first test if this is a change. if it is, then this should modify the value and (in most cases) call damage_self(). See the commented out sample code in the source for complete details. Better yet you can just inherit an implementation from interactor_with_parts or parent_with_parts.

Parameters:
int - v the new value for part_b
See Also:
interactor_with_parts, parent_with_parts

set_part_b

public void set_part_b(int v)
Set part_b of object. If part is controlled by a constraint, an exception is thrown. Here in the base class this is always the case.

For subclasses implementing part_b see the commented out sample code in the source or inherit from interactor_with_parts or parent_with_parts.

Parameters:
int - v the new value for part_b

local_to_global

public java.awt.Point local_to_global(int xv,
                                      int yv)
Transform a point in the local coordinate space into the global space (that is the coordinate system of the top_level object which roots the interactor tree this object is in).
Parameters:
int - xv x coordinate of point to transform.
int - yv y coordinate of point to transform.
Returns:
Point resulting point.

local_to_global

public java.awt.Point local_to_global(java.awt.Point local_pt)
Transform a point in the local coordinate space into the global space (that is the coordinate system of the top_level object which roots the interactor tree this object is in).
Parameters:
Point - local_pt point to transform.
Returns:
Point resulting point.

global_to_local

public java.awt.Point global_to_local(int xv,
                                      int yv)
Transform a point in global coordinate space (that is the coordinate system of the top_level object which roots the interactor tree this object is in) into the local space of the object.
Parameters:
int - xv x coordinate of point to transform.
int - yv y coordinate of point to transform.
Returns:
Point resulting point.

global_to_local

public java.awt.Point global_to_local(java.awt.Point global_pt)
Transform a point in global coordinate space (that is the coordinate system of the top_level object which roots the interactor tree this object is in) into the local space of the object.
Parameters:
Point - global_pt point to transform.
Returns:
Point resulting point.

into_local

public java.awt.Point into_local(int xv,
                                 int yv)
Transform a point from parent's coordinate space to local coordinates of this object.
Parameters:
int - xv x coordinate of point to transform.
int - yv y coordinate of point to transform.
Returns:
Point resulting point.

into_local

public java.awt.Point into_local(java.awt.Point parent_pt)
Transform a point from parent's coordinate space to local coordinates of this object.
Parameters:
Point - parent_pt point to transform.
Returns:
Point resulting point.

x_into_local

public int x_into_local(int xv)
Transform an x value from parent's coordinate space to local coords.
Parameters:
int - xv x coordinate of to transform.
Returns:
int resulting x coordinate.

y_into_local

public int y_into_local(int yv)
Transform an y value from parent's coordinate space to local coords.
Parameters:
int - yv y coordinate of to transform.
Returns:
int resulting y coordinate.

into_parent

public java.awt.Point into_parent(int xv,
                                  int yv)
Transform a local point into the parent's coordinate space.
Parameters:
int - xv x coordinate of point to transform.
int - yv y coordinate of point to transform.
Returns:
Point resulting point.

into_parent

public java.awt.Point into_parent(java.awt.Point local_pt)
Transform a local point into the parent's coordinate space.
Parameters:
Point - local_pt point to transform.
Returns:
Point resulting point.

x_into_parent

public int x_into_parent(int xv)
Transform an x value form local coordinates into the parent's coordinate space.
Parameters:
int - xv x coordinate of to transform.
Returns:
int resulting x coordinate.

y_into_parent

public int y_into_parent(int yv)
Transform an y value form local coordinates into the parent's coordinate space.
Parameters:
int - yv y coordinate of to transform.
Returns:
int resulting y coordinate.

parent

public interactor parent()
Return the parent of this interactor.
Returns:
interactor the parent of this interactor or null if this object is an orphan or is a top_level (root) interactor.

set_parent

public void set_parent(interactor par)
Set the parent of this interactor.

Warning: this method should be protected (but isn't since various implementations don't allow protected in interfaces). This method should not be invoked from "outside the system". Always use the normal child manipulation routines instead.

Parameters:
interactor - par new parent for this object.

get_top_level

public top_level get_top_level()
Retrieve the top_level interactor (if any) that this object is installed (perhaps several levels down) under. This top_level interactor provides the "global" coordinate space for this interactor. Null is returned if this object is not currently installed somewhere under a top_level interactor.

Returns:
top_level the top_level object we are installed under or null if there is no such object.

get_awt_component

public java.awt.Component get_awt_component()
Retrieve the AWT component that this sub_arctic object is drawn within. If this object is not part of an active interface, null will be returned.


child_index

public int child_index()
Return the child index of this interactor (within its parent). This value is obviously not going to be correct for orphan objects.
Returns:
int index of this interactor within its parent's child list.

set_child_index

public void set_child_index(int indx)
Set the child index of this interactor (within its parent).

Warning: this method should be protected (but isn't since various implementations don't allow protected in interfaces). This method should not be invoked except from the within the normal child manipulation routines.Always use those routines instead.

Parameters:
int - indx the new index of the child.

prev_sibling

public interactor prev_sibling()
Return the previous sibling of this object (or null if there is none).
Returns:
interactor the child before this one in its parent's child list or null if there is no such object.

next_sibling

public interactor next_sibling()
Return the next sibling of this object (or null if there is none).
Returns:
interactor the child after this one in its parent's child list or null if there is no such object.

supports_children

public boolean supports_children()
Indicate whether this interactor supports children. Interactors that support children will have their SUPPORTS_CHILDREN flag set.
Returns:
boolean indicating whether this object supports children.

fixed_children

public boolean fixed_children()
Indicate whether this interactor uses a fixed set of children. This is done if the interactor assigns fixed roles/meanings to particular children, or for some other reason limits its total number of children. If this is not set, then the child list is expandable and the system will move entries over to fill in null children (although you cannot rely on this behavior since it is possible to explicitly set a child at a given index to null and sneak nulls into the child list in other ways). If this is set, then removed children will be set to null, and the child list will not be otherwise modified. In addition, if this is set, then operations that would normally reorder children throw an exception instead. An object which uses fixed children will have its FIXED_CHILDREN flag set.
Returns:
boolean indicating whether this object supports fixed children.

num_children

public int num_children()
Indicate the number of children this interactor currently has. For interactors with fixed children, the interactor will always have this this number, hence it is also the maximum number of children. Interactors that do not support children always return 0. Note: there may be null children in the child list but they are counted as children here.
Returns:
int number of slots in this object's child list.

child

public interactor child(int i)
Return the child at the given index int the child list (whose first element is at index 0). If the index given is beyond the range of the current child list, or the interactor does not support children, then null is returned. Requests for negative children cause an exception. Note that child lists may contain null children.
Parameters:
int - i the index of the requested child.
Returns:
interactor the child object at the requested index.

set_child

public void set_child(int at_indx,
                      interactor chld)
Set the child at the given index replacing any child that was previously there. The child list will be expanded as necessary to accommodate the given child. If the child list is expanded, missing children will be set to null.
Parameters:
int - at_indx position in the child list to replace.
interactor - chld the child object to place at that position.

add_child

public void add_child(interactor chld)
Add a child to the end of the child list.
Parameters:
interactor - chld the child to add.

insert_child

public void insert_child(int at_indx,
                         interactor chld)
Insert a child at the given location, moving current children at or after that index further down in the list.

clear_child_list

public void clear_child_list()
Remove all the children of this interactors. For interactors with no children, this call has no effect.

remove_child

public interactor remove_child(int at_indx)
Remove the child found at the given index and return it. For interactors with fixed children, the child slot at the index is set to null. For other interactors, later children are moved over in the list to fill in the gap.
Parameters:
int - at_indx the index to remove the child from.

remove_child

public void remove_child(interactor the_child)
Remove the given child from the child list. For interactors with fixed children, the child slot is set to null. For other interactors, later children are moved up in the list to fill in the gap. If the child is not in the child list, nothing happens.
Parameters:
interactor - the_child the child to be removed.

find_child

public int find_child(interactor the_child)
Find the given child in the child list and return its index. If the child is no in the child list -1 is returned.
Parameters:
interactor - the_child the child we are searching for.
Returns:
int the index of that child in the child list or -1 if the child is not found.

move_child_to_top

public void move_child_to_top(int chld_indx)
Move the child currently at the given index in the child list to the top in drawing order (which is last in the list).
Parameters:
int - chld_indx the index of the child to move.

move_child_to_top

public void move_child_to_top(interactor the_child)
Move the given child to the top of the child list in drawing order (which is last in the list). If the child is not in the list, nothing happens.
Parameters:
interactor - the_child the child to move.

move_child_to_bottom

public void move_child_to_bottom(int chld_indx)
Move the child currently at the given index in the child list to the bottom in drawing order (which is first in the list).
Parameters:
int - chld_indx the index of the child to move.

move_child_to_bottom

public void move_child_to_bottom(interactor the_child)
Move the given child to the bottom of the child list in drawing order (which is first in the list). If the child is not in the list, nothing happens.
Parameters:
interactor - the_child the child to move.

move_child_upward

public void move_child_upward(int chld_indx)
Move the child currently at the given index in the child list up one position in drawing order (which is one position further into the list).
Parameters:
int - chld_indx the index of the child to move.

move_child_upward

public void move_child_upward(interactor the_child)
Move the given child up one position in drawing order of the child list (which is later in the list). If the child is not in the list, nothing happens.
Parameters:
interactor - the_child the child to move.

move_child_downward

public void move_child_downward(int chld_indx)
Move the child currently at the given index in the child list down one position in drawing order (which is one position earlier in the list).
Parameters:
int - chld_indx the index of the child to move.

move_child_downward

public void move_child_downward(interactor the_child)
Move the given child down one position in drawing order of the child list (which is earlier in the list). If the child is not in the list, nothing happens.
Parameters:
interactor - the_child the child to move.

move_to_top

public void move_to_top()
Move this object to the top of its parent's drawing order (last in its child list).

move_to_bottom

public void move_to_bottom()
Move this object to the bottom of its parent's drawing order (first in its child list).

move_upward

public void move_upward()
Move this object one position higher in its parent's drawing order (which is one position further into its child list).

move_downward

public void move_downward()
Move this object one position lower in its parent's drawing order (which is one position earlier in its child list).

intrinsic_constraints

public int intrinsic_constraints()
Indicate which parts (coordinates/sizes/values) of this object are intrinsically constrained by the internals of the object. For, example an icon object with a fixed size image would intrinsically constrain its width and height. The result is reported as an integer formed from or-ing together zero or more of the constants: X, Y, W, H, VISIBLE, ENABLED, PART_A or PART_B (for the icon described above that would be W | H).
Returns:
int bitset indicating which parts of the object are intrinsically constrained.

active_constraints

public int active_constraints()
Indicate which parts (coordinates/sizes/values) of this object are currently constrained. This always includes the intrinsic constraints, but may also indicate other constraints that have been applied to the object. The result is reported as an integer formed from or-ing together zero or more of the constants: X, Y, W, H, VISIBLE, ENABLED, PART_A and PART_B. Values that are constrained may not be assigned to directly (an exception will be thrown).
Parameters:
int - bitset indicating which parts of the object are constrained.

is_constrained

public boolean is_constrained(int coord_code)
Indicate whether a specific part is currently constrained. The query argument should be one of the constants: X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B. Values that are constrained may not be assigned to (an exception will be thrown).
Parameters:
int - coord_code the object part we are enquiring about.
Returns:
boolean indicating whether it is constrained.

constraint_on

public constraint constraint_on(int coord_code)
Return a constraint object representing the constraint (if any) attached to the specified part (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).
Parameters:
int - coord_code the code for the object part in question.
Returns:
constraint the constraint attached to the given part.

x_constraint

public constraint x_constraint()
Return a constraint object representing the constraint (if any) attached to x.
Returns:
constraint the constraint attached to x.

y_constraint

public constraint y_constraint()
Return a constraint object representing the constraint (if any) attached to y.
Returns:
constraint the constraint attached to x.

w_constraint

public constraint w_constraint()
Return a constraint object representing the constraint (if any) attached to w.
Returns:
constraint the constraint attached to w.

h_constraint

public constraint h_constraint()
Return a constraint object representing the constraint (if any) attached to h.
Returns:
constraint the constraint attached to h.

visible_constraint

public constraint visible_constraint()
Return a constraint object representing the constraint (if any) attached to visible.
Returns:
constraint the constraint attached to visible.

enabled_constraint

public constraint enabled_constraint()
Return a constraint object representing the constraint (if any) attached to enabled.
Returns:
constraint the constraint attached to enabled.

part_a_constraint

public constraint part_a_constraint()
Return a constraint object representing the constraint (if any) attached to part_a.
Returns:
constraint the constraint attached to part_a.

part_b_constraint

public constraint part_b_constraint()
Return a constraint object representing the constraint (if any) attached to part_b.
Returns:
constraint the constraint attached to part_a.

set_constraint

public void set_constraint(int coord_code,
                           constraint a_constraint)
Establish a constraint on the given value (one of X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B). This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
int - coord_code code for the part whose constraint we replace.
constraint - a_constraint the constraint to replace it with.

set_constraint

public void set_constraint(int code,
                           value_provider ext_obj,
                           int ext_part)
Establish an "external" or "heavyweight" constraint on the given value (one of X, Y, W, H, VISIBLE, ENABLED, PART_A, PART_B). This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
int - coord_code code for the part whose constraint we replace.
constraint - a_constraint the constraint to replace it with.

set_x_constraint

public void set_x_constraint(constraint a_constraint)
Establish a constraint on the x value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception. Only horizontally oriented constraints can be attached to x (if a vertically oriented value is need, use an external constraint).
Parameters:
constraint - a_constraint the constraint to replace it with.

set_x_constraint

public void set_x_constraint(value_provider ext_obj,
                             int ext_part)
Establish an "external" or "heavyweight" constraint on the x value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_x_constraint

public void set_x_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the x value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_y_constraint

public void set_y_constraint(constraint a_constraint)
Establish a constraint on the y value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception. Only vertically oriented constraints can be attached to y (if a horizontally oriented value is need, use an external constraint).
Parameters:
constraint - a_constraint the constraint to replace it with.

set_y_constraint

public void set_y_constraint(value_provider ext_obj,
                             int ext_part)
Establish an "external" or "heavyweight" constraint on the y value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_y_constraint

public void set_y_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the y value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_w_constraint

public void set_w_constraint(constraint a_constraint)
Establish a constraint on the w value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception. Only horizontally oriented constraints can be attached to w (if a vertically oriented value is need, use an external constraint).
Parameters:
constraint - a_constraint the constraint to replace it with.

set_w_constraint

public void set_w_constraint(value_provider ext_obj,
                             int ext_part)
Establish an "external" or "heavyweight" constraint on the w value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_w_constraint

public void set_w_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the w value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_h_constraint

public void set_h_constraint(constraint a_constraint)
Establish a constraint on the h value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception. Only vertically oriented constraints can be attached to h (if a horizontally oriented value is need, use an external constraint).
Parameters:
constraint - a_constraint the constraint to replace it with.

set_h_constraint

public void set_h_constraint(value_provider ext_obj,
                             int ext_part)
Establish an "external" or "heavyweight" constraint on the h value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_h_constraint

public void set_h_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the h value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_visible_constraint

public void set_visible_constraint(constraint a_constraint)
Establish a constraint on the visible value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
constraint - a_constraint the constraint to replace it with.

set_visible_constraint

public void set_visible_constraint(value_provider ext_obj,
                                   int ext_part)
Establish an "external" or "heavyweight" constraint on the visible value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_visible_constraint

public void set_visible_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the visible value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_enabled_constraint

public void set_enabled_constraint(constraint a_constraint)
Establish a constraint on the enabled value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
constraint - a_constraint the constraint to replace it with.

set_enabled_constraint

public void set_enabled_constraint(value_provider ext_obj,
                                   int ext_part)
Establish an "external" or "heavyweight" constraint on the enabled value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_enabled_constraint

public void set_enabled_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the enabled value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_part_a_constraint

public void set_part_a_constraint(constraint a_constraint)
Establish a constraint on the part_a value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
constraint - a_constraint the constraint to replace it with.

set_part_a_constraint

public void set_part_a_constraint(value_provider ext_obj,
                                  int ext_part)
Establish an "external" or "heavyweight" constraint on the part_a value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_part_a_constraint

public void set_part_a_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the part_a value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

set_part_b_constraint

public void set_part_b_constraint(constraint a_constraint)
Establish a constraint on the part_b value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
constraint - a_constraint the constraint to replace it with.

set_part_b_constraint

public void set_part_b_constraint(value_provider ext_obj,
                                  int ext_part)
Establish an "external" or "heavyweight" constraint on the part_b value of this object. This attaches a value exported by a particular part of some value_provider object and replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
value_provider - ext_obj the external object providing the value.
int - ext_part the part number of the part of that object providing the value.

set_part_b_constraint

public void set_part_b_constraint(std_ext_constraint ext_cnstr)
Establish a standard external constraint on the part_b value of this object. This replaces any constraint currently in place. However, an attempt to replace an intrinsic constraint will result in an exception.
Parameters:
std_ext_constraint - ext_cnstr the constraint to attach.

marked_ood

public int marked_ood()
Indicate which values are currently marked as potentially out of date with respect to their constraints. Typically this information is needed only by the constraint system, since values are generally brought up to date whenever they are requested.


mark_ood

public void mark_ood(int coord_code)
Mark the given value as out of date. This will recursively mark anything that directly or indirectly depends on the given value. This should normally only be called by the constraint system, since setting values via set_*() will automatically call this routine.
Parameters:
int - the part to mark out-of-date. This should be one of the values: X, Y, W, H, ENABLED, PART_A, or PART_B.

mark_all_ood

public void mark_all_ood()
Mark all geometric parts of this object out of date. This happens for example when we reparent it.

mark_x_ood

public void mark_x_ood()
Mark x value and anything that directly or indirectly depends on it as out-of-date.

mark_y_ood

public void mark_y_ood()
Mark y value and anything that directly or indirectly depends on it as out-of-date.

mark_w_ood

public void mark_w_ood()
Mark w value and anything that directly or indirectly depends on it as out-of-date.

mark_h_ood

public void mark_h_ood()
Mark h value and anything that directly or indirectly depends on it as out-of-date.

mark_visible_ood

public void mark_visible_ood()
Mark visible value and anything that directly or indirectly depends on it as out-of-date.

mark_enabled_ood

public void mark_enabled_ood()
Mark enabled value and anything that directly or indirectly depends on it as out-of-date.

mark_part_a_ood

public void mark_part_a_ood()
Mark part_a value and anything that directly or indirectly depends on it as out-of-date.

mark_part_b_ood

public void mark_part_b_ood()
Mark part_b value and anything that directly or indirectly depends on it as out-of-date.

ood_inform_all

protected void ood_inform_all(int which_part)
Tell all potentially dependent objects about an out of date part. This is used by the lightweight constraint system to infer dependency edges that are not explicitly stored. Basically we tell everyone that might have a dependency edge from us (all the local neighborhood) and they work out whether they have the edge or not based on the attached constraint. If they do have the edge they mark themselves out-of-date, otherwise they ignore this.
Parameters:
int - which_part the code of the part of this object which is informing all the others that it is out-of-date.

mark_reparented_ood

public void mark_reparented_ood()
Mark all our geometric parts out-of-date and tell all potentially dependent objects that all our parts are out-of-date (this gets done when we move around in the hierarchy). This affects, x, y, w, and h, but not visible, enabled, part_a, or part_b.

inform_ood

public void inform_ood(int from_type,
                       int from_part,
                       int nth_child)
Inform the object that the indicated part of a potentially related object is out-of-date (this is called from ood_inform_all()). The related object can be one of OBJCODE_SELF, OBJCODE_PARENT, OBJCODE_SOME_CHILD, OBJCODE_NEXT_SIBLING, or OBJCODE_PREV_SIBLING, and the indicated part can be X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B.

The nth_child parameter is used only if OBJCODE_SOME_CHILD is passed, in which case it indicates the index of the child in question. If parts of this object are actually dependent upon the given part they are marked out-of-date and the mark out-of-date traversal is continued recursively from them. If not, we do nothing.

Parameters:
int - from_type the type of object we are being informed by (must be one of OBJCODE_SELF, OBJCODE_PARENT, OBJCODE_SOME_CHILD, OBJCODE_NEXT_SIBLING, or OBJCODE_PREV_SIBLING).
int - from_part the part code of the part of that object which is informing us that it is out-of-date.
int - nth_child if from_type is OBJCODE_SOME_CHILD, this parameter indicates which child it is (otherwise it is ignored).
See Also:
ood_inform_all(int)

handle_cycle

public boolean handle_cycle(int part_code)
Handle a cycle detected in constraints on a given part of this object. If this routine returns true, then evaluation proceeds. If this returns false then, the current value of the attribute (which may have been set by this routine) is left in place but marked up-to-date. By default, we call manager.handle_cycle() which provides a global policy for handling cycles (manager.handle_cycle() defaults to ignoring the cycle, which amounts to breaking the cycle "once-around", its also possible to print a debugging message, or a stack trace and/or force an error exit).
Parameters:
int - part_code the part of this object that involves a cycle.
Returns:
boolean indicating whether we should proceed with evaluation.
See Also:
manager.handle_cycle(sub_arctic.lib.interactor, int)

eval

public void eval(int coord_code)
Bring the indicated value up to date with respect to any defining constraints. This routine does not typically need to be called explicitly since normal requests for values do evaluations before returning.
Parameters:
int - coord_code the part whose value should be evaluated.

eval_x

public void eval_x()
Bring x up to date with respect to any defining constraint.

eval_y

public void eval_y()
Bring y up to date with respect to any defining constraint.

eval_w

public void eval_w()
Bring w up to date with respect to any defining constraint.

eval_h

public void eval_h()
Bring h up to date with respect to any defining constraint.

eval_visible

public void eval_visible()
Bring visible up to date with respect to any defining constraint.

eval_enabled

public void eval_enabled()
Bring enabled up to date with respect to any defining constraint.

eval_part_a

public void eval_part_a()
Bring part_a up to date with respect to any defining constraint.

eval_part_b

public void eval_part_b()
Bring part_b up to date with respect to any defining constraint.

get_external_constraint

public provider_part_ref get_external_constraint(int for_part)
Get the external value provider (if any) associated with the given part value (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B). Returns null if there is no external provider.
Parameters:
int - for_part the part we are asking about.
Returns:
provider_part_ref the external value provider associated with that part, or null if there is none.

get_value

public java.lang.Object get_value(int part_number)
Get an up-to-date copy of a particular part value(X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B). An Integer object will be returned.
Parameters:
int - part_number the part being requested.
Returns:
Object an Integer object containing the value of the requested part.

attach_dependent

public void attach_dependent(int on_part_num,
                             value_consumer dep_obj,
                             int dep_part)
Register something as interested in (dependent on) one of the parts (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B) of this object. The entity registered is a part within a value_consumer object (typically an external_constraint). Whenever the part value in question is marked out-of-date, the value_ood() method is invoked on each currently registered (object,part) pair.
Parameters:
int - on_part_num the part of this object that the dependency is being attached to.
value_consumer - dep_obj the object that is dependent.
int - dep_part the part within that object which is dependent.

detach_dependent

public void detach_dependent(int on_part_num,
                             value_consumer dep_obj,
                             int dep_part)
Remove an (object,part) pair from the dependent (interested in) list associated with a particular part of this object.
Parameters:
int - on_part_num the part of this object that the dependency is attached to.
value_consumer - dep_obj the object that was dependent.
int - dep_part the part within that object which was dependent.

value_ood

public void value_ood(int for_part_here,
                      value_provider prov_obj,
                      int prov_part)
Indicate that a part value (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B) with an external constraint attached should be marked out-of-date because something it depends on (externally) is out-of-date.
Parameters:
int - for_part_here part within this object that should be marked out-of-date.
value_provider - prov_obj object that we depend on.
int - prov_part part within that object that is

custom_fun1

public int custom_fun1(int val1,
                       int const_val)
A custom function accessible in the constraint system. This function is accessible from the (lightweight) constraint system and can be overridden by particular subclasses to perform custom computations associated with that class. This version is passed a single parameter value derived from a depended upon object, plus a constant value taken from the constraint.

Important note: for the constraint system to work correctly, this function must compute its value solely on its parameters and not access additional information from this object or other objects (since the attribute constrained to the result of this function will not hear about changes and be properly updated).

Parameters:
int - val1 a value from a depended upon object.
int - const_val a constant value taken from the constraint.

custom_fun2

public int custom_fun2(int val1,
                       int val2,
                       int const_val)
A custom function accessible in the constraint system. This function is accessible from the (lightweight) constraint system and can be overridden by particular subclasses to perform custom computations associated with that class. This version is passed two parameter values derived from a depended upon object, plus a constant value taken from the constraint.

Important note: for the constraint system to work correctly, this function must compute its value solely on its parameters and not access additional information from this object or other objects (since the attribute constrained to the result of this function will not hear about changes and be properly updated).

Parameters:
int - val1 a value from a depended upon object.
int - val2 another value from a depended upon object.
int - const_val a constant value taken from the constraint.

configure

public void configure()
Do the constraint evaluation necessary to make sure all visible objects in the subtree rooted at this object have up-to-date bounds (and other information) prior to drawing. This routine implements the "configure" pass which occurs right before the pass that does the actual drawing.

Important note: In addition to the work done here in the base class (which should almost always be done by invoking super() from any subclass implementations), each subclass should also be certain to update anything which could effect its bounds here, and not in draw_self_local(). So for example if the height of an object depends on a font that might have changed, the potentially new height must be computed and set here and not in draw_self_local(). In general, for things to work out right it must be the case that this object's bound is correct once this method returns. The reason for this is that by the time draw_self_local() is called, the clipping region corresponding to the bound of this object will have already been set and changing the bound then will not modify the clipping region accordingly (so the drawing may be incorrect).


inside_bounds

public boolean inside_bounds(int pt_x,
                             int pt_y)
Determine if the given point (in the local coordinates of this object) is inside the extent of this object's normal bound. You should not normally override this routine to handle picking of non-rectangular objects. Do that in picked_by() instead.
Parameters:
int - pt_x x coordinate of the query point.
int - pt_y y coordinate of the query point.
Returns:
boolean indicating whether the point is inside the objects bounding box.
See Also:
picked_by(int, int)

picked_by

public boolean picked_by(int pt_x,
                         int pt_y)
Determine if the given point (in the local coordinates of this object) is inside the extent of the object picking purposes. Be default, this method just checks the normal bound (bounding box), however, it can be overridden to support accurate picking of non-rectangular objects.
Parameters:
int - pt_x x coordinate of the query point.
int - pt_y y coordinate of the query point.
Returns:
boolean indicating whether the point is inside the objects bounding box.
See Also:
inside_bounds(int, int)

pick

public void pick(int pt_x,
                 int pt_y,
                 pick_collector pick_list)
Determine if this object and/or any of its decedent objects is "picked" by the the given point. If it is, it must add itself to the end of the given given pick_collection by calling report_pick(). If not, it should leave the pick_collector as is.

This method is also responsible for recursively invoking itself as appropriate for its children (this is usually done using the pick_within_children() utility routine). By default we pick against any children first (since they are by default drawn last) and then this object. However, if the drawing order is changed from the default, this method must be changed to reflect (the reverse of) that non-standard order. For example, if this object does drawing both under and on top of its children, two sets of part specific tests would typically be needed, one before recursively picking the children, and one after.

Parameters:
int - pt_x x coordinate of the query point.
int - pt_y y coordinate of the query point.
pick_collector - pick_list object that collects and returns pick results.
See Also:
pick_within_children(int, int, sub_arctic.input.pick_collector)

pick_within_children

protected void pick_within_children(int pt_x,
                                    int pt_y,
                                    pick_collector pick_list)
Utility routine to perform pick over children. The point is given in local coordinates of the parent object.
Parameters:
int - pt_x x coordinate of the query point.
int - pt_y y coordinate of the query point.
pick_collector - pick_list object that collects and returns pick results.

callback_obj

public callback_object callback_obj()
Return the callback object associated with this object. Here in the base class we always return null since we aren't actually implementing callbacks.
Returns:
callback_object the object to which callbacks from this interactor are made.
See Also:
sub_arctic.lib.input#callback_object

set_callback_obj

public void set_callback_obj(callback_object callbk)
Set the callback object associated with this object. Here in the base class, this causes an exception to be thrown since we aren't actually implementing callbacks here.
Parameters:
callback_object - callbk the object to which callbacks from this interactor will be made.
See Also:
sub_arctic.lib.input#callback_object

first_callback_num

public int first_callback_num()
Indicate the first callback number used by this interactor. This defaults to 0. Note: if you are not overriding do_action() to do something other than the default of invoking the callback, this must return 0.
Returns:
int the first valid callback number used by this object to make callbacks.
See Also:
sub_arctic.lib.input#callback_object, do_action(int, sub_arctic.input.event, java.lang.Object)

last_callback_num

public int last_callback_num()
Indicate the last callback number used by this interactor. (Callback numbers are passed as the the 3rd parameter to callback() messages.) This defaults to -1 so that the set of valid callbacks is by default empty.
Returns:
int the last valid callback number used by this object to make callbacks.
See Also:
sub_arctic.lib.input#callback_object

do_callback

public void do_callback(event evt)
Perform the default callback action for this object. This should invoke the callback corresponding to the primary or most common action associated with this object. (Here in the base class this is assumed to be the callback numbered first_callback_num()) The event passed here is the one which should be considered to have "caused" the input. However, the object is allowed to modifify (a copy of) this event before passing it on in order to make it meet preconditions necessary for proper operation. For example, button objects might force the x,y position of the event to be within their bounds.
Parameters:
event - evt the event which "caused" the callback.

do_callback

public void do_callback(event evt,
                        int callback_num,
                        java.lang.Object callback_info)
Perform a callback from this object, passing the given parameters as part of the callback parameters. The event passed here is the one which should be considered to have "caused" the input. However, the object is allowed to modifify (a copy of) this event before passing it on in order to make it meet preconditions necessary for proper operation. For example, button objects might force the x,y position of the event to be within their bounds. Type checking should be performed to ensure that the callback_num given is within range for this interactor, and that the callback_info object (if any) is of the proper type for the callback.
Parameters:
event - evt the event which "caused" the callback.
int - callback_num which callback type this is.
Object - callback_info additional information about this callback (the exact type of this information is determined by the callback type).

num_actions

public int num_actions()
Number of actions supported by do_action(). Valid action numbers will range from 0 to num_actions()-1. Here in the base class this defaults to last_callback_num()+1.
Returns:
int number of actions supported by this interactor
See Also:
do_action(int, sub_arctic.input.event, java.lang.Object)

do_action

public void do_action(int action_num,
                      event evt,
                      java.lang.Object parm)
Perform one of the actions associated with this interactor. Action number 0 is the default or primary action of the interactor. Particular subclasses may define secondary actions. Here in the base class by default we simply call the callback corresponding to the action number if that is in the range of valid callbacks, otherwise we throw an exception. The event parameter is the event which "caused" this action (and is passed to any callbacks made as a result). The parm object is a subclass specific parameter to the action. Here in the base class we default to passing this object as a parameter to do_callback().
Parameters:
int - action_num which action type this is (the interpretation of this value is subclass dependent, here in the base class we use this as the callback number. 0 is always interpreted as the primary or default action of this interactor.
event - evt the event which "caused" the action.
Object - parm additional information to serve as a parameter to the action (the exact type of this information is determined by the subclass). Here is the base class we default to passing this object as the last "callback_info" parameter to do_callback().
See Also:
do_callback(sub_arctic.input.event)

do_action

public void do_action(event evt)
Perform the default or primary actions associated with this interactor. Here in the base class by default we simply call the full version of do_action, passing a 0 for the action number and null for the parameter.
Parameters:
event - evt the event which "caused" the action.
See Also:
do_callback(sub_arctic.input.event)

traverse_and_collect

public void traverse_and_collect(int traversal_kind,
                                 int traversal_order,
                                 interactor_pred inclusion_test,
                                 interactor_pred continue_test,
                                 traversal_xform xform_parent_to_child,
                                 java.lang.Object parameters,
                                 pick_collector collection_result)
Do a traversal of the interactor tree to collect nodes meeting some criteria (or perform actions on qualifying nodes). Traversals are given a specialized "kind" so that subclasses can recognize and override behavior for certain traversals, while keeping default behavior for the rest. In addition, several traversal orders are provided. Qualification for collection (or action) is done by an inclusion test predicate object. This predicate is given the interactor in question as well as some (optional) data specific to the predicate. This data is passed in from the root of the traversal and (optionally) transformed from parent to child values as the traversal proceeds. Objects are collected (along with optional additional data) by adding them to a pick_collector object. Recursive traversal is stopped when either leaves are reached or the continue_test predicate for an interior node fails (in which case its children will not be visited).

Examples of possible traversals include:
Replacement for the normal pick operation:

    traverse_and_collect(pick_trav, TRAV_DRAW, pt_inside_bounds, pt_inside_bounds,
                         coord_parent_to_local, pick_pt, result);
  
and a tree dump:
    traverse_and_collect(dump_trav, TRAV_PRE, dump_interactor, incr_int,
                         null, new Integer(0), result)
  
where dump_interactor printed to the node to System.out at the indentation level of its Integer parameter, but always returns false
Parameters:
traversal_kind - a unique integer (i.e., generated by manager.unique_int()) that represents the kind of traversal being performed.
traversal_order - one of TRAV_DRAW, TRAV_PICK, TRAV_PRE, or TRAV_POST indicating drawing order, pick order, left-to-right pre-order, or left-to-right post-order traversal.
inclusion_test - an interactor predicate object which is to perform the inclusion test for this traversal. If the traversal is being done for its action side-effects (rather than a collection, per se) then this object's test() method should perform that action on selected nodes. A null inclusion_test is treated as a function that selects everything (always returns true).
continue_test - an interactor_predicate object which determines if the given object's children are traversed. If this method returns false, then the children will not be visited. A null continue_test is is treated as a function that always returns true.
xform_parent_to_child - object containing a method to transform the parameters data (passed to the inclusion_test) from its parent condition to the condition suitable for use by a given child. This can be used, for example, to transform a point from the parent's coordinates into those of a child. A null object is treated as the identity transformation (i.e. uses the parent's parameters directly for all children).
parameters - the initial parameters data passed to the inclusion_test at the root, then transformed by xform_parent_to_child for recursive calls on children.
collection_result - a pick_collector object which holds a list of interactors collected by this traversal (and optional associated data). If an object determines that it should be a part of the collection of this traversal, it should add itself to this collection by calling its report_pick() method.

traverse_and_collect_parent

protected void traverse_and_collect_parent(int traversal_kind,
                                           interactor_pred inclusion_test,
                                           java.lang.Object parameters,
                                           pick_collector collection_result)
Helper routine for traverse_and_collect() -- this does test on a single (parent) object.
Parameters:
int - traversal_kind the identifier for this traversal type.
interactor_pred - inclusion_test the predicate we are testing this object against.
Object - parameters the additional parameters to be passed to that predicate.
pick_collector - collection_result the object that collects and returns any objects which are selected.
See Also:
traverse_and_collect(int, int, sub_arctic.lib.interactor_pred, sub_arctic.lib.interactor_pred, sub_arctic.lib.traversal_xform, java.lang.Object, sub_arctic.input.pick_collector)

traverse_and_collect_children

public void traverse_and_collect_children(int traversal_kind,
                                          int traversal_order,
                                          boolean l_to_r,
                                          interactor_pred inclusion_test,
                                          interactor_pred continue_test,
                                          traversal_xform xform_parent_to_child,
                                          java.lang.Object parameters,
                                          pick_collector collection_result)
Helper routine for traverse_and_collect() -- does recursive traversal of children in either left-to-right or right-to-left order.
Parameters:
int - traversal_kind the traversal type id.
int - traversal_order traversal order we are to use.
boolean - l_to_r true for left-to-right traversal, false for right-to-left.
interactor_pred - inclusion_test the inclusion test for the traversal (see traverse_and_collect()).
interactor_pred - continue_test the continue test for the traversal(see traverse_and_collect()).
traversal_xform - xform_parent_to_child the parameter transformer for the traversal(see traverse_and_collect()).
Object - parameters the parameters passed to the inclusion and continue test predicates.
pick_collector - collection_result the object which collects and returns the selected objects.
See Also:
traverse_and_collect(int, int, sub_arctic.lib.interactor_pred, sub_arctic.lib.interactor_pred, sub_arctic.lib.traversal_xform, java.lang.Object, sub_arctic.input.pick_collector)

flag_is_set

public final boolean flag_is_set(int mask_value)
Determine if a particular bit (or bits) is set in the flag set for the interactor. In the case of testing for multiple flag bits, they must all be set to get a result of true. See interactor_consts for possible values that can be queried.
Parameters:
int - mask_value the flag bit or bits we are enquiring about.
Returns:
boolean indicating whether the bit or bits are (all) set.
See Also:
interactor_consts

set_flag_bit

protected final void set_flag_bit(int mask_value,
                                  boolean v)
Set the given flag bit(s) to the given value. See interactor_consts for possible values that can be set.
Parameters:
int - mask_value the bit or bits to be modified within the flags.
boolean - v the value to set those bits to.
See Also:
interactor_consts

set_flag_bit

protected final void set_flag_bit(int mask_value)
Set the given flag bit(s) to true. See interactor_consts for possible values that can be set.
Parameters:
int - mask_value the bit or bits to be modified within the flags.
See Also:
interactor_consts

clear_flag_bit

protected final void clear_flag_bit(int mask_value)
Set the given flag bit(s) to false. See interactor_consts for possible values that can be set.
Parameters:
int - mask_value the bit or bits to be modified within the flags.
See Also:
interactor_consts

constraint_flag_is_set

public final boolean constraint_flag_is_set(int mask_value)
Determine if a particular bit (or bits) is set in the constraint_flag set for the interactor. In the case of testing for multiple constraint_flag bits, they must all be set to get a result of true. See interactor_consts for possible values that can be queried.

set_constraint_flag_bit

protected final void set_constraint_flag_bit(int mask_value,
                                             boolean v)
Set the given constraint_flag bit(s) to the given value. See interactor_consts for possible values that can be set.
Parameters:
int - mask_value the bit or bits to be modified within the flags.
boolean - v the value to set those bits to.
See Also:
interactor_consts

set_constraint_flag_bit

protected final void set_constraint_flag_bit(int mask_value)
Set the given constraint_flag bit(s) to true. See interactor_consts for possible values that can be set.
Parameters:
int - mask_value the bit or bits to be modified within the flags.
See Also:
interactor_consts

clear_constraint_flag_bit

protected final void clear_constraint_flag_bit(int mask_value)
Set the given constraint_flag bit(s) to false. See interactor_consts for possible values that can be set.
Parameters:
int - mask_value the bit or bits to be modified within the flags.
See Also:
interactor_consts

enter_local_coordinates

protected drawable enter_local_coordinates(drawable parent_draw)
Given a drawable surface set up for the parent coordinate space, create a new drawable set up for the local coordinate space. This surface will have a translation installed corresponding to the local origin, and will clip to the extent of the local object.
Parameters:
drawable - parent_draw the drawable set up for the parent.
Returns:
drawable a new drawable set up for the child. (Note: this will be the same drawable passed in for most cases)

exit_local_coords

protected void exit_local_coords(drawable parent_draw,
                                 drawable local_draw)
Do the work to exit the local coordinate system. Here this does nothing since we just revert to the original parent drawable. However, this is here as a useful hook for subclasses that need to do something else at this point.
Parameters:
drawable - parent_draw the drawable used by our parent.
drawable - local_draw the drawable derived from it used by us (note: In most cases these are the same!)

trivial_reject

public static boolean trivial_reject(drawable d,
                                     java.awt.Rectangle bounding_box)
Do a trivial reject test that indicates whether the given bounding box is entirely outside the clipping region of the given drawable object. Returns true if nothing inside the box will survive the clip and hence need not be drawn. This can also be used for optimizing drawing by testing whether an expensive object is completely clipped away before trying to draw it.
Parameters:
drawable - d the drawable whose current clipping we are testing against.
Rectangle - bounding_box the bounding box we are comparing that with.

trivial_reject

public boolean trivial_reject(drawable d)
Do a trivial reject test that indicates whether the bounds of this object are entirely outside the clipping region of the given drawable object. The drawable object is assumed to be configured for our parent's coordinate system. Returns true if nothing inside our bounds will survive the clip and hence need not be drawn. This test is used in draw_self() to avoid drawing anything for the object if none of it could show up anyway.
Parameters:
drawable - d the drawable whose current clipping we are testing against.
Rectangle - bounding_box the bounding box we are comparing that with.
See Also:
draw_self(sub_arctic.output.drawable)

draw_self

public void draw_self(drawable parent_d)
Draw the object's current appearance. The drawable object passed in is still set up in the parent's coordinate system. This routine normally sets up the transformation for the local coordinate system, then calls draw_self_local(). Consequently, most interactors do not override this routine, but instead override draw_self_local().
Parameters:
drawable - parent_d a drawable (still set up for the parent) to produce output on.
See Also:
draw_self_local(sub_arctic.output.drawable)

draw_self_local

protected void draw_self_local(drawable d)
Draw the object's current appearance (along with that of its children). The drawable object passed in will be set up for the local coordinate system. Most interactors override this routine to provide a custom appearance, but this routine is not called directly to produce output (that is done with draw_self()).

Normal drawing order with respect to children is to draw the this object (the parent) first, then draw the children (so they appear on top). Drawing children (in normal low to high index order) can be done by the draw_children() utility routine. Note that if normal drawing order is overridden changes also must be made to the picking routines (pick() and pick_within_children()) as well.

Parameters:
drawable - d a drawable object (set up for this object) to produce output on.
See Also:
draw_self(sub_arctic.output.drawable), draw_children(sub_arctic.output.drawable), pick(int, int, sub_arctic.input.pick_collector), pick_within_children(int, int, sub_arctic.input.pick_collector)

draw_children

protected void draw_children(drawable d)
Helper routine to draw the children of this interactor in normal (low to high index) drawing order. This simply calls draw_self() for each child in order. Note that if normal drawing order is overridden changes also must be made to the picking routines (pick() and pick_within_children()) as well.
Parameters:
drawable - d a drawable object (set up for this object) to produce output on.
See Also:
draw_self(sub_arctic.output.drawable), draw_self_local(sub_arctic.output.drawable), pick(int, int, sub_arctic.input.pick_collector), pick_within_children(int, int, sub_arctic.input.pick_collector)

damage_fixed

protected void damage_fixed()
Indicate that any previous damage to the object's appearance has been fixed (by redrawing it). This is normally called automatically by draw_self and need not be called elsewhere.

damage_self

public void damage_self(java.awt.Point top_left,
                        java.awt.Dimension sz)
Indicate that the object has been modified in such as way that its appearance within the given area of the screen (expressed in local coordinates) might change and needs to be redrawn. This does not update any attributes controlling size and position of this object or any other object up the parent chain, but instead uses existing values (reflecting the existing sizes and positions). If you need to damage this object's updated position, explicitly update it first.
Parameters:
Point - top_left top left corner of the damaged rectangle.
Dimension - sz size of the damaged rectangle.

damage_self

public void damage_self(int left,
                        int top,
                        int wid,
                        int hi)
Indicate that the object has been modified in such as way that its appearance within the given area of the screen (expressed in local coordinates) might change and needs to be redrawn. This does not update any attributes controlling size and position of this object or any other object up the parent chain, but instead uses existing values (reflecting the existing sizes and positions). If you need to damage this object's updated position, explicitly update it first.
Parameters:
int - left left edge of the damaged rectangle.
int - top top edge of the damaged rectangle.
int - wid width of the damaged rectangle.
int - hi height of the damaged rectangle.

damage_self

public void damage_self()
Indicate that the object has been modified in such as way that any or all of its appearance may change and its area of the screen needs to be redrawn.

damage_from_child

public void damage_from_child(interactor originator,
                              java.lang.Object user_info,
                              java.awt.Point top_left,
                              java.awt.Dimension sz)
Indicate that a change to a child (or grandchild, etc.) affects the given screen region (expressed in the coordinates of this object). This is responsible for passing damage up the tree.
Parameters:
interactor - originator the interactor that caused the damage.
Object - user_info uninterpreted information supplied by the originator at damage time.
Point - top_left top-left corner of child's damage area (in our coordinate system).
Dimension - sz size of the damage area.

damage_self

public void damage_self(java.lang.Object user_info)
Indicate that the object has been modified in such as way that any or all of its appearance may change and its area of the screen needs to be redrawn.
Parameters:
Object - user_info uninterpreted information supplied by the originator at damage time.

damage_self

public void damage_self(interactor originator,
                        java.lang.Object user_info,
                        java.awt.Point top_left,
                        java.awt.Dimension sz)
Indicate that the object has been modified in such as way that its appearance within the given area of the screen (expressed in local coordinates) might change and needs to be redrawn. The damage may have been caused by a child (or grandchild, ...), in which case the originator parameter indicates the responsible interactor. The damage_type parameter is an uninterpreted Object reference which was supplied by the originator at the time the damage was reported.

This method does not update any attributes controlling size and position of this object or any other object up the parent chain, but instead uses existing values (reflecting the existing sizes and positions). If you need to damage this object's updated position, explicitly update it first.

Parameters:
interactor - originator the interactor that caused the damage.
Object - user_info uninterpreted information supplied by the originator at damage time.
Point - top_left top-left corner of child's damage area (in our coordinate system).
Dimension - sz size of the damage area.

num_feature_points

public int num_feature_points()
The number of "feature points" of an object. Feature points are points within an object which are interesting for alignment, snapping or other purposes. They are used by the move_drag and snap_drag agents.

Feature points are expressed in the local coordinates of the object in question. Objects by default provide 5 points corresponding to their corners and center. Constants representing indexes for these standard points are defined in interactor_consts. Additional points with specialized meanings may be provided by subclasses.

Returns:
int the number of feature points this object has.
See Also:
move_drag_focus_agent, move_draggable, move_drag_filter, std_drag_filters, snap_drag_agent, snap_draggable, snap_targetable, interactor_consts

feature_point

public java.awt.Point feature_point(int indx)
Access to the "feature points" of an object (by index). Feature points are points within an object which are interesting for alignment, snapping or other purposes. They are used by the move_drag and snap_drag agents.

Feature points are expressed in the local coordinates of the object in question. Objects by default provide 5 points corresponding to their corners and center. Constants representing indexes for these standard points are defined in interactor_consts. Additional points with specialized meanings may be provided by subclasses. If an index out of range is given the top-left corner (index FEATURE_TOP_LEFT which is always 0,0) is returned.

Parameters:
int - indx the index of the requested feature point.
Returns:
Point the location of the requested feature point in local coordinates.
See Also:
move_drag_focus_agent, move_draggable, move_drag_filter, std_drag_filters, snap_drag_agent, snap_draggable, snap_targetable, interactor_consts

feature_point_enabled

public boolean feature_point_enabled(int indx)
Indicate whether the indicated "feature point" of an object is considered to be enabled. Feature points are points within an object which are interesting for alignment, snapping or other purposes. They are used by the move_drag and snap_drag agents.

Feature points are expressed in the local coordinates of the object in question. Objects by default provide 5 points corresponding to their corners and center. Constants representing indexes for these standard points are defined in interactor_consts. Additional points with specialized meanings may be provided by subclasses.

By default all standard feature points are always enabled. If an index out of range is given false will always be returned.

Parameters:
int - indx the index of the feature point in question.
Returns:
boolean indicating whether it is enabled.
See Also:
move_drag_focus_agent, move_draggable, move_drag_filter, std_drag_filters, snap_drag_agent, snap_draggable, snap_targetable, interactor_consts

drag_feature_point

public int drag_feature_point()
Indicate the current "feature point" of an object. This point will be used by the move_drag agent to control dragging. Feature points are points within an object which are interesting for alignment, snapping or other purposes. The current feature point is used by the move_drag agent. See that agent for complete details. Feature points are expressed in the local coordinates of the object in question. Objects by default provide 5 points corresponding to their corners and center. Constants representing indexes for these standard points are defined in interactor_consts. Additional points with specialized meanings may be provided by subclasses.

Note: this routine and the ones that use it ignore the enable status of the point as returned by feature_point_enabled(). This routine defaults to the top left corner of the object.

Returns:
the index of the current feature point.
See Also:
move_drag_focus_agent, move_draggable, move_drag_filter, std_drag_filters, interactor_consts

focus_set_enter

public void focus_set_enter(event cause_evt,
                            focus_dispatch_agent of_agent,
                            java.lang.Object user_info)
Default action for entering a focus set. Several of the focus agents handle focus entry in custom ways (and do not call this routine) and many objects don't need to do anything special when they enter the focus set since they requested the focus themselves. So we provide a default here for ignoring the dispatch. This is only relevant for objects implementing the focusable interface (or one of the other input dispatch protocol interfaces derived from it), but its easy enough to do here and saves a bit of coding in subclasses.
Parameters:
event - cause_evt the event that caused the focus.
focus_dispatch_agent - of_agent the agent doing the focus.
Object - user_info uninterpreted information that was given to the agent when the focus was requested.
See Also:
focusable, focus_dispatch_agent

focus_set_exit

public void focus_set_exit(event cause_evt,
                           focus_dispatch_agent of_agent,
                           java.lang.Object user_info)
Default action for exiting a focus set. Several of the focus agents handle focus entry in custom ways (and do not call this routine) and many objects don't need to do anything special when they enter the focus set since they requested the focus themselves. So we provide a default here for ignoring the dispatch. This is only relevant for objects implementing the focusable interface (or one of the other input dispatch protocol interfaces derived from it), but its easy enough to do here and saves a bit of coding in subclasses.
Parameters:
event - cause_evt the event that caused the focus.
focus_dispatch_agent - of_agent the agent doing the focus.
Object - user_info uninterpreted information that was given to the agent when the focus was requested.
See Also:
focusable, focus_dispatch_agent

filter_pt

public java.awt.Point filter_pt(java.awt.Point original_pt,
                                interactor obj,
                                java.awt.Point feature_pt)
Default point filter. Point filters are used by the move_drag agent to limit the area of a drag or transform the path of a drag. Here we use the identity filter, so it imposes no limit or translation. A collection of useful filters that can be called from subclass specializations of this method can be found in std_drag_filters.
Specified by:
filter_pt in interface move_drag_filter
Parameters:
original_pt - the point to be filtered (in parent's coords).
drag_obj - the object being dragged.
feature_pt - the feature point within the object being dragged that is being filtered (in object's coords).
Returns:
the location of the filtered point
See Also:
move_drag_filter, move_drag_focus_agent, move_draggable, std_drag_filters, interactor_consts

user_data

public java.util.Enumeration user_data()
Access to the collection of data items that we are holding for the user of this interactor. These data items are for the use of the application or user only, and are typically used to associate application specific information with a particular interactor. Data items can be entered using add_user_datum(), and deleted using remove_user_datum(). These data items are not modified by the toolkit, and can later be retrieved with this method as needed. The ordering of the data items in the returned Enumeration is not guaranteed to follow any rules, and may change between invocations.
See Also:
add_user_datum(java.lang.Object), remove_user_datum(java.lang.Object)

add_user_datum

public void add_user_datum(java.lang.Object datum)
Adds a data item to the collection of data items that we are holding for the user of this interactor. These data items are for the use of the application or user only, and are typically used to associate application specific information with a particular interactor. Data items can be entered using this method. The same Object can be entered multiple times, and will occur in the Enumeration returned by user_data() multiple times. Data items can be deleted using remove_user_datum(). These data items are not modified by the toolkit, and can later be retrieved with user_data() as needed.
Parameters:
Object - datum the data item to associate with this interactor.
See Also:
user_data(), remove_user_datum(java.lang.Object)

remove_user_datum

public boolean remove_user_datum(java.lang.Object datum)
Removes a data item from the collection of data items that we are holding for the user of this interactor. These data items are for the use of the application or user only, and are typically used to associate application specific information with a particular interactor. Data items can be entered using add_user_datum(), and deleted using this method. If the given Object is not associated with the interactor, no changes are made and a value of false is returned. If the given Object has been entered multiple times, only one instance is removed by invoking this method. These data items are not modified by the toolkit, and can later be retrieved with user_data() as needed.
Parameters:
Object - datum the data item to remove from association with this interactor.
See Also:
user_data(), add_user_datum(java.lang.Object)

user_info

public java.lang.Object user_info()
Access to uninterpreted "user information" that we are holding for the user of this object. This information is for use of the user or application only and is typically used to associated application specific information with a particular interactor object. This information can be entered using set_user_info(). It is not modified by the toolkit, and can later be retrieved with this routine as needed.

Note that only one "user information" object can be associated with an interactor. The "user data" methods maintain a collection of objects.

See Also:
user_data(), add_user_datum(java.lang.Object),

, set_user_info(java.lang.Object)

set_user_info

public void set_user_info(java.lang.Object user_inf)
Set the uninterpreted "user information" that we are holding for the user of this object. This information is for use of the user or application only and is typically used to associated application specific information with a particular interactor object. This information can be entered using this routine. It is not modified by the toolkit, and can later be retrieved with user_info() as needed.

Note that only one "user information" object can be associated with an interactor. The "user data" methods maintain a collection of objects.

Parameters:
Object - user_inf the object to associate with this interactor.
See Also:
user_data(), add_user_datum(java.lang.Object),

, user_info()

register_resource_names

public static void register_resource_names()
Register any style resource names owned by this class. This should be overriden by any subclass which needs to declare resource names and called by a static initialization block in that class. This code may also force other classes it implicitly depends on (e.g. for fallback names) register their names by calling their register_resource_names() methods. Note: This may be called more than once, so it should be set up so that calling it more than once causes does not register the names more than once.

set_style_lock

public void set_style_lock(boolean lock_v)
Lock or unlock the style of this interactor. When the style is locked, restyling requests are ignored.
Parameters:
boolean - lock_v new value of locked status (true == locked)

style_change_local

public void style_change_local()
Inform the interactor that the global current style has changed and that it may need to restyle itself. This should reconstruct any style-based resources used by the interactor under the new current style and recompute the size of the object and any other properties that this effects. If the interactor is style-locked, this has no effect. Here in the base class, this is equivalent to calling "restyle(style_mangager.current_style())".
See Also:
restyle(sub_arctic.style.style)

style_change

public void style_change()
This calls style_change_local() on itself and all its descendents to notify them of a change in the global current style.
See Also:
style_change_local()

restyle

public void restyle(style new_style)
Force a restyle of the interactor under the given style. This should reconstruct any style-based resources held by the interactor under the given style, and then recompute the size of the object and any other properties that this effects. If the interactor is style-locked, this has no effect.
Parameters:
style - new_style the style to put the interactor under.

restyle_look_resources

protected void restyle_look_resources(style new_style)
"Restyle" current style-based resources used by this interactor to conform to the given style (here in the base class we do nothing).
Parameters:
style - new_style the style to restyle resources under.

new_look_configure

protected void new_look_configure()
Recompute the size and other properties of this interactor that may have been changed by a change in style resources. This should be called whenever the interactor has been restyled (e.g., it is called automatically from restyle()) or resources affecting the size of the object or its visual appearance are changed in some other way. Here in the base class, this does nothing.

flag_string

public java.lang.String flag_string()
Convert a flag set into a human readable string.
Returns:
String displaying the values of the flag set.

constraint_flag_string

public java.lang.String constraint_flag_string()
Convert a constraint flag set into a human readable string.
Returns:
String displaying the values of the flag set.

toString

public java.lang.String toString()
Convert to a human readable string.
Returns:
String a human readable dump of the object.
Overrides:
toString in class java.lang.Object

tag_str

public java.lang.String tag_str()
Convert to a small tag string which indicates the type of interactor along with a (hopefully unique) integer (its hashCode) that can be used to identify it during debugging.
Returns:
String an terse identifying tag string for the object.