|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.lib.min_interactor | +--sub_arctic.lib.base_interactor | +--sub_arctic.lib.h_slider_display | +--sub_arctic.lib.h_slider
This class creates a slider with either the default or other look. It handles all the input side processing and then uses h_slider_display (from which it is derived) to do the display.
Field Summary | |
protected callback_object |
_callback_obj
Object we make callbacks to (if non-null) |
static int |
DYNAMIC_CALLBACK
Constant for dynamic callback (made at each movement) |
static int |
STATIC_CALLBACK
Constant for static callback (made only at end of movement) |
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_slider(int xv,
int yv,
int wv,
int minv,
int maxv,
int init_val,
int sincv,
int lincv,
callback_object call_obj)
Construct a horizontal slider (not a scrollbar) with the default (Artkit) appearance. |
|
h_slider(int xv,
int yv,
int wv,
int minv,
int maxv,
int init_val,
int sincv,
int lincv,
callback_object call_obj,
loaded_image rt_im,
loaded_image lf_im,
loaded_image th_im,
loaded_image back_pat)
Create a new horizontal slider (not scrollbar). |
Method Summary | |
callback_object |
callback_obj()
Object that this slider makes callbacks to when moved. |
boolean |
drag_end(event evt,
java.lang.Object user_info)
End the simple drag of the thumb. |
boolean |
drag_feedback(event evt,
java.lang.Object user_info)
Movement within a drag of the thumb. |
boolean |
drag_start(event evt,
java.lang.Object user_info)
Start of a drag for the thumb. |
protected void |
dynamic_callback(event evt)
Do a "dynamic" callback. |
int |
first_callback_num()
First valid callback number |
int |
last_callback_num()
Last valid callback number |
boolean |
press(event evt,
java.lang.Object user_info)
Handle mouse presses in our bounds -- makes us the drag focus if they click in the thumb. |
boolean |
release(event evt,
java.lang.Object user_info)
Companion for press() -- ignore here, it never gets called because we become the drag focus. |
void |
set_callback_obj(callback_object cb)
Set the callback object that this button makes callbacks to when moved. |
protected void |
static_callback(event evt)
Do a "static" callback (#1). |
Methods inherited from class sub_arctic.lib.h_slider_display |
back_img,
boxed,
conform,
draw_self_local,
intrinsic_constraints,
large_inc,
left_img,
max_val,
min_val,
part_a,
right_img,
set_back_img,
set_boxed,
set_large_inc,
set_left_img,
set_max_val,
set_min_val,
set_part_a,
set_raw_part_a,
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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected callback_object _callback_obj
public static final int STATIC_CALLBACK
public static final int DYNAMIC_CALLBACK
Constructor Detail |
public h_slider(int xv, int yv, int wv, int minv, int maxv, int init_val, int sincv, int lincv, callback_object call_obj, loaded_image rt_im, loaded_image lf_im, loaded_image th_im, loaded_image back_pat)
int
- xv x positionint
- yv y positionint
- wv width in pixelsint
- minv minimum slider valueint
- maxv maximum slider valueint
- init_val initial slider value.int
- sincv small increment value (when the left
or right buttons are pushed).int
- lincv large increment value (the user clicks
in the thumb area but not on the thumb).callback_object
- call_obj the object which receives the
callbacks (see above).loaded_image
- rt_im image for right button.loaded_image
- lf_im image for left button.loaded_image
- th_im image for thumb.loaded_image
- back_pat image for the background pattern.public h_slider(int xv, int yv, int wv, int minv, int maxv, int init_val, int sincv, int lincv, callback_object call_obj)
int
- xv x position.int
- yv y position.int
- wv width in pixels.int
- minv minimum slider value.int
- maxv maximum slider value.int
- init_val initial slider value.int
- sincv small increment value (when the left or
right buttons are pushed).int
- lincv large increment value (the user clicks in
the thumb area but not on the thumb).callback_object
- call_obj the object which receives the callbacks
(see above).Method Detail |
public callback_object callback_obj()
public void set_callback_obj(callback_object cb)
callback_object
- cb the new object to which we make callbacks.public int first_callback_num()
public int last_callback_num()
protected void dynamic_callback(event evt)
event
- evt the event which caused this callbackprotected void static_callback(event evt)
event
- evt the event which caused this callbackpublic boolean press(event evt, java.lang.Object user_info)
event
- evt the press event (mouse down).Object
- user_info the information that was handed to the
pick_collector when this object was deemed to be
picked (this value is given to the drag focus
agent also, so it will be propagated along to the
drag calls below).public boolean release(event evt, java.lang.Object user_info)
event
- evt the release event.Object
- user_info the information that was handed to the
pick_collector when this object was deemed to be
picked.public boolean drag_start(event evt, java.lang.Object user_info)
event
- evt the event that is starting the drag (usually a
press).Object
- user_info the object passed to the simple drag_agentpublic boolean drag_feedback(event evt, java.lang.Object user_info)
event
- evt the drag event (mouse move).Object
- user_info the object passed to the simple drag_agent.public boolean drag_end(event evt, java.lang.Object user_info)
event
- evt the end of the drag event (mouse release usually).Object
- user_info the object passed to the simple drag_agent.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |