sub_arctic.lib
Class h_range_slider_display

java.lang.Object
  |
  +--sub_arctic.lib.min_interactor
        |
        +--sub_arctic.lib.base_interactor
              |
              +--sub_arctic.lib.h_slider_display
                    |
                    +--sub_arctic.lib.h_range_slider_display
Direct Known Subclasses:
h_range_slider

public class h_range_slider_display
extends h_slider_display

This the class that knows how to the display-side work of displaying a horizontal scrollbar. It handles outputting a scrollbar from a set of state variables.


Field Summary
protected  int _end_value
          Current value of the slider
protected  int _motion
          Current motion of the slider
protected  int _start_value
          Current value of the slider
protected static int BETWEEN_THUMBS
           
protected static int END_THUMB
           
protected static int START_THUMB
           
 
Fields inherited from class sub_arctic.lib.h_slider_display
_back_img, _boxed, _large_inc, _left_img, _max_val, _min_val, _right_img, _small_inc, _thumb_img, _thumb_shift, _value
 
Fields inherited from class sub_arctic.lib.base_interactor
_child_index, _child_list, _clip_bounds, _constraint_flags, _enabled_constraint, _flags, _h, _h_constraint, _parent, _part_a_constraint, _part_b_constraint, _user_data, _visible_constraint, _w, _w_constraint, _x, _x_constraint, _y, _y_constraint, default_child_hint
 
Constructor Summary
h_range_slider_display(int xv, int yv, int hv, int minv, int maxv, int start_val, int end_val, int sincv, int lincv)
          Construct a new h_slider_display with the artkit look.
h_range_slider_display(int xv, int yv, int hv, int minv, int maxv, int start_val, int end_val, int sincv, int lincv, loaded_image up_im, loaded_image dn_im, loaded_image th_im, loaded_image back_pat)
          Full constructor for the h_slider_display.
 
Method Summary
protected  void conform()
          Make sure min <= max and min <= value <= max
protected  void draw_self_local(drawable d)
          Draw the current image on the drawable provided.
protected  int end_thumb_offset()
          Compute the offset to the thumb in pixels (returns -1 for no thumb)
 int end_value()
          Current value of the slider
 int intrinsic_constraints()
          Indicate that we intrinsically constrain height, but not part_a or part_b.
 int motion()
          Current motion of the slider
 int part_a()
          Return the value of the part_a component of this object.
 int part_b()
          Return the value of the part_b component of this object.
 void set_end_value(int val)
          Set the current value of the slider
 void set_motion(int motion)
          Set the current value of the slider
 void set_part_a(int v)
          Set the part_a component of this object.
 void set_part_b(int v)
          Set the part_a component of this object.
protected  void set_raw_part_a(int v)
          Set part_a value directly bypassing the constraint system (but doing damage).
protected  void set_raw_part_b(int v)
          Set part_a value directly bypassing the constraint system (but doing damage).
 void set_start_value(int val)
          Set the current value of the slider
protected  int start_thumb_offset()
          Compute the offset to the thumb in pixels (returns -1 for no thumb)
 int start_value()
          Current value of the slider
protected  boolean thumbs_fit()
           
 
Methods inherited from class sub_arctic.lib.h_slider_display
back_img, boxed, large_inc, left_img, max_val, min_val, right_img, set_back_img, set_boxed, set_large_inc, set_left_img, set_max_val, set_min_val, set_right_img, set_small_inc, set_thumb_img, set_thumb_shift, set_value, small_inc, thumb_img, thumb_offset, thumb_shift, value
 
Methods inherited from class sub_arctic.lib.base_interactor
active_constraints, add_child, add_user_datum, attach_dependent, bound, callback_obj, child_index, child, clear_child_list, clear_constraint_flag_bit, clear_flag_bit, configure, constraint_flag_is_set, constraint_flag_string, constraint_on, custom_fun1, custom_fun2, damage_fixed, damage_from_child, damage_self, damage_self, damage_self, damage_self, damage_self, detach_dependent, do_action, do_action, do_callback, do_callback, drag_feature_point, draw_children, draw_self, enabled_constraint, enabled, enter_local_coordinates, eval_enabled, eval_h, eval_part_a, eval_part_b, eval_visible, eval_w, eval_x, eval_y, eval, exit_local_coords, feature_point_enabled, feature_point, filter_pt, find_child, first_callback_num, fixed_children, flag_is_set, flag_string, focus_set_enter, focus_set_exit, get_awt_component, get_external_constraint, get_part, get_top_level, get_value, global_to_local, global_to_local, h_constraint, h, handle_cycle, inform_ood, insert_child, inside_bounds, into_local, into_local, into_parent, into_parent, is_constrained, last_callback_num, local_to_global, local_to_global, mark_all_ood, mark_enabled_ood, mark_h_ood, mark_ood, mark_part_a_ood, mark_part_b_ood, mark_reparented_ood, mark_visible_ood, mark_w_ood, mark_x_ood, mark_y_ood, marked_ood, move_child_downward, move_child_downward, move_child_to_bottom, move_child_to_bottom, move_child_to_top, move_child_to_top, move_child_upward, move_child_upward, move_downward, move_to_bottom, move_to_top, move_upward, new_look_configure, next_sibling, num_actions, num_children, num_feature_points, ood_inform_all, parent, part_a_constraint, part_b_constraint, pick_within_children, pick, picked_by, pos, prev_sibling, register_resource_names, remove_child, remove_child, remove_user_datum, restyle_look_resources, restyle, set_callback_obj, set_child_index, set_child, set_constraint_flag_bit, set_constraint_flag_bit, set_constraint, set_constraint, set_enabled_constraint, set_enabled_constraint, set_enabled_constraint, set_enabled, set_flag_bit, set_flag_bit, set_h_constraint, set_h_constraint, set_h_constraint, set_h, set_intrinsic_h, set_intrinsic_size, set_intrinsic_w, set_parent, set_part_a_constraint, set_part_a_constraint, set_part_a_constraint, set_part_b_constraint, set_part_b_constraint, set_part_b_constraint, set_pos, set_pos, set_raw_enabled, set_raw_h, set_raw_visible, set_raw_w, set_raw_x, set_raw_y, set_size, set_style_lock, set_user_info, set_visible_constraint, set_visible_constraint, set_visible_constraint, set_visible, set_w_constraint, set_w_constraint, set_w_constraint, set_w, set_x_constraint, set_x_constraint, set_x_constraint, set_x, set_y_constraint, set_y_constraint, set_y_constraint, set_y, setup_for_children, setup_for_children, setup_for_fixed_children, size, style_change_local, style_change, supports_children, tag_str, toString, traverse_and_collect_children, traverse_and_collect_parent, traverse_and_collect, trivial_reject, trivial_reject, user_data, user_info, value_ood, visible_constraint, visible, w_constraint, w, x_constraint, x_into_local, x_into_parent, x, y_constraint, y_into_local, y_into_parent, y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_THUMB

protected static final int START_THUMB

BETWEEN_THUMBS

protected static final int BETWEEN_THUMBS

END_THUMB

protected static final int END_THUMB

_start_value

protected int _start_value
Current value of the slider

_end_value

protected int _end_value
Current value of the slider

_motion

protected int _motion
Current motion of the slider
Constructor Detail

h_range_slider_display

public h_range_slider_display(int xv,
                              int yv,
                              int hv,
                              int minv,
                              int maxv,
                              int start_val,
                              int end_val,
                              int sincv,
                              int lincv,
                              loaded_image up_im,
                              loaded_image dn_im,
                              loaded_image th_im,
                              loaded_image back_pat)
Full constructor for the h_slider_display. If you do not supply an image for any of the image slots (i.e. you pass null) a default look will be applied for you.
Parameters:
int - xv x position of the slider.
int - yv y position of the slider.
int - hv height of the slider (in pixels).
int - minv minimum value of the slider.
int - maxv maximum value of the slider.
int - start_val start value of the slider.
int - end_val end value of the slider.
int - sincv small increment value.
int - lincv large increment value.
loaded_image - up_im image for the up button.
loaded_image - dn_im image for the down button.
loaded_image - th_im image for the thumb.
loaded_image - back_pat image for the background of the slider.

h_range_slider_display

public h_range_slider_display(int xv,
                              int yv,
                              int hv,
                              int minv,
                              int maxv,
                              int start_val,
                              int end_val,
                              int sincv,
                              int lincv)
Construct a new h_slider_display with the artkit look.
Parameters:
int - xv x position of the slider.
int - yv y position of the slider.
int - hv height of the slider (in pixels).
int - minv minimum value of the slider.
int - maxv maximum value of the slider.
int - start_val start value of the slider.
int - end_val end value of the slider.
int - sincv small increment value.
int - lincv large increment value.
Method Detail

intrinsic_constraints

public int intrinsic_constraints()
Indicate that we intrinsically constrain height, but not part_a or part_b.
Returns:
int bitset indicating parts we intrinsically constrain.
Overrides:
intrinsic_constraints in class h_slider_display

part_a

public int part_a()
Return the value of the part_a component of this object. In our case this is stored in _value.
Returns:
int the value of part_a.
Overrides:
part_a in class h_slider_display

set_raw_part_a

protected void set_raw_part_a(int v)
Set part_a value directly bypassing the constraint system (but doing 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. In this case part_a is stored in _value.
Parameters:
int - v the new value of part_a.
Overrides:
set_raw_part_a in class h_slider_display

set_part_a

public void set_part_a(int v)
Set the part_a component of this object. In our case this is stored in _value.
Overrides:
set_part_a in class h_slider_display

part_b

public int part_b()
Return the value of the part_b component of this object. In our case this is stored in _value.
Returns:
int the value of part_b.
Overrides:
part_b in class base_interactor

set_raw_part_b

protected void set_raw_part_b(int v)
Set part_a value directly bypassing the constraint system (but doing 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. In this case part_b is stored in _value.
Parameters:
int - v the new value of part_b.
Overrides:
set_raw_part_b in class base_interactor

set_part_b

public void set_part_b(int v)
Set the part_a component of this object. In our case this is stored in _value.
Overrides:
set_part_b in class base_interactor

start_value

public int start_value()
Current value of the slider
Returns:
int the value of the slider.

set_start_value

public void set_start_value(int val)
Set the current value of the slider
Parameters:
int - val the new value of the slider

end_value

public int end_value()
Current value of the slider
Returns:
int the value of the slider.

set_end_value

public void set_end_value(int val)
Set the current value of the slider
Parameters:
int - val the new value of the slider

motion

public int motion()
Current motion of the slider
Returns:
int the mition of the slider.

set_motion

public void set_motion(int motion)
Set the current value of the slider
Parameters:
int - val the new value of the slider

conform

protected void conform()
Make sure min <= max and min <= value <= max
Overrides:
conform in class h_slider_display

start_thumb_offset

protected int start_thumb_offset()
Compute the offset to the thumb in pixels (returns -1 for no thumb)
Returns:
int the amount the thumb should be shifted down to account for the value of the slider.

end_thumb_offset

protected int end_thumb_offset()
Compute the offset to the thumb in pixels (returns -1 for no thumb)
Returns:
int the amount the thumb should be shifted down to account for the value of the slider.

thumbs_fit

protected boolean thumbs_fit()

draw_self_local

protected void draw_self_local(drawable d)
Draw the current image on the drawable provided.
Parameters:
drawable - d a drawable for the image or screen you want this object drawn on.
Overrides:
draw_self_local in class h_slider_display