|
|||||||||
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.new_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 blank |
_background
Blank used for background |
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 static boolean |
_registration_done
Flag to arrange to execute register_resource_names() at most once. |
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 a look from the current style. |
|
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,
blank back_blnk)
Full constructor for the v_slider_display. |
Method Summary | |
loaded_image |
back_img()
Image for the background (pattern). |
blank |
background()
Blank used for background |
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. |
protected void |
draw_thumb(drawable on_surf,
int x,
int y)
Draw the thumb at the given location on the given drawable |
protected void |
init_look_resources(style from_style)
Get initial resources for the object from a given style. |
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 |
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. |
int |
part_a()
Return the value of the part_a component of this object. |
static void |
register_resource_names()
Register the resource names associated with this class |
protected void |
restyle_look_resources(style new_style)
"Restyle" current style-based resources used by this interactor to conform to the given style. |
void |
set_back_img(loaded_image img)
Set the image for the background -- use null for a default solid color |
void |
set_background(blank new_blank)
Set the blank used for the background. |
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_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). |
int |
thumb_height()
Current height of the thumb. |
protected 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 int _thumb_shift
protected loaded_image _up_img
protected loaded_image _dn_img
protected loaded_image _thumb_img
protected loaded_image _back_img
protected blank _background
protected int _min_val
protected int _max_val
protected int _small_inc
protected int _large_inc
protected int _value
protected static boolean _registration_done
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, blank back_blnk)
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.blank
- back_blnk blank for the background.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 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 buttonprotected loaded_image thumb_img()
public int thumb_height()
protected void draw_thumb(drawable on_surf, int x, int y)
drawable
- on_surf drawable we to draw on.int
- x coordinate of the left edgeint
- y coordinate of the top edgepublic loaded_image back_img()
public void set_back_img(loaded_image img)
loaded_image
- img the image for the background of the sliderpublic blank background()
public void set_background(blank new_blank)
blank
- new_blank the new background blankpublic 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 sliderpublic static void register_resource_names()
protected void init_look_resources(style from_style)
style
- from_style the style we get our resource fromprotected void restyle_look_resources(style new_style)
style
- new_style the style to restyle resources under.protected void new_look_configure()
protected 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 |