|
|||||||||
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.multi_button | +--sub_arctic.lib.toggle | +--sub_arctic.lib.label_toggle
These are toggles which occupy a fixed width and have a label just to the right of the image. They support the style interface and can be used to create either labeled check boxes or labeled radio_buttons.
Field Summary | |
protected static int |
_default_separation
Separation between toggle and label. |
protected java.awt.Font |
_font
The font for this object. |
protected loaded_image[] |
_images
|
protected int |
_requested_width
Requested width is the total width of the interactor or -1 if we don't care and want to size by string. |
protected java.lang.String |
_text
The text of the label. |
protected loaded_image[] |
_transition_images
|
protected boolean |
is_radio_button
If this is true, we are going to use the image of radio_button otherwise we use the image of a checkbox. |
Fields inherited from class sub_arctic.lib.toggle |
_default_look,
_group_link |
Fields inherited from class sub_arctic.lib.multi_button |
_callback_obj,
_cur_state,
_in_transition,
_state_looks,
_transition_looks,
BUTTON_ACTION_CALLBACK |
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 | |
label_toggle(boolean radio,
callback_object call_obj,
int width,
java.awt.Font f,
java.lang.String l)
Create a new label_toggle. |
|
label_toggle(boolean radio,
callback_object call_obj,
int width,
java.awt.Font f,
java.lang.String l,
loaded_image[] im)
Constructor which makes a label toggle from a pair of images and doesn't require x and y coordinates. |
|
label_toggle(boolean radio,
callback_object call_obj,
int width,
java.awt.Font f,
java.lang.String l,
loaded_image[] im,
loaded_image[] tim)
$CLO - added. |
|
label_toggle(int x,
int y,
boolean radio,
callback_object call_obj,
int width,
java.awt.Font f,
java.lang.String l)
Create a new label_toggle. |
|
label_toggle(int x,
int y,
boolean radio,
callback_object call_obj,
int width,
java.awt.Font f,
java.lang.String l,
loaded_image[] im)
Same as full constructor, but takes a pair of images to use for the display of the interactor. |
|
label_toggle(int x,
int y,
boolean radio,
callback_object call_obj,
int width,
java.awt.Font f,
java.lang.String l,
loaded_image[] im,
loaded_image[] tim)
$CLO - added. |
Method Summary | |
protected void |
compute_images()
This builds the images of the text & toggle. |
int |
default_separation()
Return the separation between label and toggle. |
java.awt.Font |
font()
Return the font for this object. |
loaded_image[] |
images()
|
int |
requested_width()
Return the width the creator of the label requested. |
void |
set_font(java.awt.Font f)
Set the font in use for this toggle. |
void |
set_requested_width(int w)
Set the width to use for labels. |
void |
set_text(java.lang.String s)
Modify the string in use by the label |
java.lang.String |
text()
Access the text of the label. |
loaded_image[] |
transition_images()
|
Methods inherited from class sub_arctic.lib.toggle |
add_to_group_of,
default_look,
default_transition,
drop_from_group,
group_link,
group_prev,
next_state,
set_cur_state |
Methods inherited from class sub_arctic.lib.multi_button |
calc_size,
callback_obj,
cur_state,
do_action,
do_callback,
draw_self_local,
first_callback_num,
get_state_look,
get_transition_look,
inout_drag_end,
inout_drag_enter,
inout_drag_exit,
inout_drag_start,
intrinsic_constraints,
last_callback_num,
part_a,
press,
release,
set_callback_obj,
set_looks,
set_part_a,
set_raw_part_a,
set_state_look,
set_transition_look,
state_looks,
transition_looks |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected static int _default_separation
protected java.awt.Font _font
protected java.lang.String _text
protected int _requested_width
protected boolean is_radio_button
protected loaded_image[] _images
protected loaded_image[] _transition_images
Constructor Detail |
public label_toggle(int x, int y, boolean radio, callback_object call_obj, int width, java.awt.Font f, java.lang.String l)
int
- x the x position of the object.int
- y the y position of the object.boolean
- radio true if you want the look of a radio
button, false if you want the look of a
checkbox.callback_object
- call_obj the object to deliver callbacks to.int
- width the width of the label in pixels.Font
- f the font to use for this object (or pass
null to get the default font).String
- l the label's string.public label_toggle(boolean radio, callback_object call_obj, int width, java.awt.Font f, java.lang.String l)
callback_object
- call_obj the object to deliver callbacks to.int
- width the width of the label in pixels.Font
- f the font to use for this object (or pass
null to get the default font).String
- l the label's string.public label_toggle(int x, int y, boolean radio, callback_object call_obj, int width, java.awt.Font f, java.lang.String l, loaded_image[] im)
int
- x the x position of the object.int
- y the y position of the object.boolean
- radio true if you want the look of a radio
button, false if you want the look of a
checkbox.callback_object
- call_obj the object to deliver callbacks to.int
- width the width of the label in pixels.Font
- f the font to use for this object (or pass
null to get the default font).String
- l the label's string.loaded_image[]
- im the array of images to use for this
interactor's display (array must be of
size 2)public label_toggle(boolean radio, callback_object call_obj, int width, java.awt.Font f, java.lang.String l, loaded_image[] im)
callback_object
- call_obj the object to deliver callbacks to.int
- width the width of the label in pixels.Font
- f the font to use for this object (or pass
null to get the default font).String
- l the label's string.loaded_image[]
- im the array of images to use for this interactor's
display (array must be of size 2)public label_toggle(boolean radio, callback_object call_obj, int width, java.awt.Font f, java.lang.String l, loaded_image[] im, loaded_image[] tim)
boolean
- radio true if you want the look of a radio
button, false if you want the look of a
checkbox.callback_object
- call_obj the object to deliver callbacks to.int
- width the width of the label in pixels.Font
- f the font to use for this object (or pass
null to get the default font).String
- l the label's string.loaded_image[]
- im the array of images to use for this
interactor's display (array must be of
size 2)loaded_image[]
- tim the array of images to use for this
interactor's transitions (array must be
of size 2)public label_toggle(int x, int y, boolean radio, callback_object call_obj, int width, java.awt.Font f, java.lang.String l, loaded_image[] im, loaded_image[] tim)
int
- x the x position of the object.int
- y the y position of the object.boolean
- radio true if you want the look of a radio
button, false if you want the look of a
checkbox.callback_object
- call_obj the object to deliver callbacks to.int
- width the width of the label in pixels.Font
- f the font to use for this object (or pass
null to get the default font).String
- l the label's string.loaded_image[]
- im the array of images to use for this
interactor's display (array must be of
size 2)loaded_image[]
- tim the array of images to use for this
interactor's transitions (array must be
of size 2)Method Detail |
public int default_separation()
public java.awt.Font font()
public void set_font(java.awt.Font f)
Font
- f the new fontpublic java.lang.String text()
public void set_text(java.lang.String s)
String
- s the string to change the label to.public int requested_width()
public void set_requested_width(int w)
int
- w the new width of the labelprotected void compute_images()
public loaded_image[] images()
public loaded_image[] transition_images()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |