|
|||||||||
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.v_slider_display
This the class that knows how to the display-side work of displaying a vertical scrollbar. It handles outputting a scrollbar from a set of state variables.
Field Summary | |
protected loaded_image |
_back_img
Image for the background -- use null for a default solid color |
protected boolean |
_boxed
This variable is a boolean which says if you want a box around the slider or not. |
protected loaded_image |
_dn_img
Image for the down button |
protected int |
_large_inc
Large increment value |
protected int |
_max_val
Maximum value of the slider |
protected int |
_min_val
Minimum value of the slider |
protected int |
_small_inc
Small increment value |
protected loaded_image |
_thumb_img
Image for the "thumb" |
protected int |
_thumb_shift
This variable is how much to offset (in x and in pixels) the slider's thumb by when drawing it. |
protected loaded_image |
_up_img
Image for the up button |
protected int |
_value
Current value of the slider |
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 | |
v_slider_display(int xv,
int yv,
int hv,
int minv,
int maxv,
int init_val,
int sincv,
int lincv)
Construct a new v_slider_display with the artkit look. |
|
v_slider_display(int xv,
int yv,
int hv,
int minv,
int maxv,
int init_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 v_slider_display. |
Method Summary | |
loaded_image |
back_img()
Image for the background (pattern). |
boolean |
boxed()
Return whether or not the user wants a box around the slider or not. |
protected void |
conform()
Make sure min <= max and min <= value <= max |
loaded_image |
dn_img()
Image for the down button |
protected void |
draw_self_local(drawable d)
Draw the current image on the drawable provided. |
int |
intrinsic_constraints()
Indicate that we intrinsically constrain width. |
int |
large_inc()
Return the large increment value (this is the amount the slider's value changes when you click in the thumb area but not on the thumb). |
int |
max_val()
Maximum value of the slider |
int |
min_val()
Minimum value of the slider |
int |
part_a()
Return the value of the part_a component of this object. |
void |
set_back_img(loaded_image img)
Set the image for the background -- use null for a default solid color |
void |
set_boxed(boolean b)
Modify whether or not to box the slider. |
void |
set_dn_img(loaded_image img)
Set the image for the down button |
void |
set_large_inc(int val)
Set the large increment value (amount the value changes when you click on the thumb area but not on the thumb). |
void |
set_max_val(int val)
Set the maximum value of the slider |
void |
set_min_val(int val)
Set the minimum value of the slider |
void |
set_part_a(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). |
void |
set_small_inc(int val)
Set the small increment value (amount the value changes when you click on the end buttons. |
void |
set_thumb_img(loaded_image img)
Set the image for the thumb of the slider |
void |
set_thumb_shift(int v)
Change the amount to shift the thumb by (in the x direction) |
void |
set_up_img(loaded_image img)
Set the image for the up button |
void |
set_value(int val)
Set the current value of the slider |
int |
small_inc()
Return the small increment value (this is the amount the slider's value changes when you push the end buttons). |
loaded_image |
thumb_img()
Image for the thumb |
protected int |
thumb_offset()
Compute the offset to the thumb in pixels (returns -1 for no thumb) |
int |
thumb_shift()
Return how much to shift the thumb by (in x, and in pixels). |
loaded_image |
up_img()
Image for the up button |
int |
value()
Current value of the slider |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected boolean _boxed
protected int _thumb_shift
protected loaded_image _up_img
protected loaded_image _dn_img
protected loaded_image _thumb_img
protected loaded_image _back_img
protected int _min_val
protected int _max_val
protected int _small_inc
protected int _large_inc
protected int _value
Constructor Detail |
public v_slider_display(int xv, int yv, int hv, int minv, int maxv, int init_val, int sincv, int lincv, loaded_image up_im, loaded_image dn_im, loaded_image th_im, loaded_image back_pat)
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
- init_val initial 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.public v_slider_display(int xv, int yv, int hv, int minv, int maxv, int init_val, int sincv, int lincv)
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
- init_val initial value of the slider.int
- sincv small increment value.int
- lincv large increment value.Method Detail |
public boolean boxed()
public void set_boxed(boolean b)
boolean
- b the new boxed state variablepublic int thumb_shift()
public void set_thumb_shift(int v)
int
- v the amount to shift the thumb by in pixelspublic loaded_image up_img()
public void set_up_img(loaded_image img)
loaded_image
- img the image to use for the up buttonpublic loaded_image dn_img()
public void set_dn_img(loaded_image img)
loaded_image
- img the image to use for the down buttonpublic loaded_image thumb_img()
public void set_thumb_img(loaded_image img)
loaded_image
- img the image to use for the thumbpublic loaded_image back_img()
public void set_back_img(loaded_image img)
loaded_image
- img the image for the background of the sliderpublic int min_val()
public void set_min_val(int val)
int
- val the new minimum value of the slider.public int max_val()
public void set_max_val(int val)
int
- val the new maximum value of the slider.public int small_inc()
public void set_small_inc(int val)
int
- val the new small incrementpublic int large_inc()
public void set_large_inc(int val)
int
- val the new small incrementpublic int part_a()
protected void set_raw_part_a(int v)
int
- v the new value of part_a.public void set_part_a(int v)
public int value()
public void set_value(int val)
int
- val the new value of the sliderprotected void conform()
public int intrinsic_constraints()
protected int thumb_offset()
protected void draw_self_local(drawable d)
drawable
- d a drawable for the image or screen you want this object
drawn on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |