|
|||||||||
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.base_parent_interactor | +--sub_arctic.lib.listbox_display
This is the class that handles the output side of the behavior of a listbox. It has no input behavior of its own.
Field Summary | |
protected listbox_child_display |
_child_display
The underlying listbox_display_children. |
protected listbox_helper |
_display_parent
The parent interactor which holds the listbox display and the horiz scrollbar. |
protected h_scrollbar |
_external_h_scrollbar
This is an "external" horizontal scrollbar. |
protected v_scrollbar |
_external_v_scrollbar
This is an "external" vertical scrollbar. |
protected h_scrollbar |
_horiz
This is the horizontal scrollbar for this listbox (which is created even if not used. |
protected int |
_horiz_status
This holds the status of the horizontal scrollbar. |
protected v_scrollbar |
_vert
This is the vertical scrollbar for this listbox (which is created even if not used). |
protected int |
_vert_status
This holds the status of the vertical scrollbar. |
static int |
SCROLLBAR_ALWAYS
This is the constant which expresses that you always want a scrollbar, even if the display doesn't fill the object. |
static int |
SCROLLBAR_AS_NECESSARY
This is the constant which expresses that you want scrollbars only when they are necessary. |
static int |
SCROLLBAR_NEVER
This is the constant which expresses that you never want a scrollbar, no matter what the size of the list. |
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 | |
listbox_display()
Create a new listbox display. |
|
listbox_display(int w,
int h)
Create a new listbox display with a given size. |
Method Summary | |
int |
above_space()
Retrieve the above spacing around a listbox. |
void |
add_to_selected_set(int start,
int end)
Add objects to the selected set. |
int |
below_space()
Retrieve the below spacing around a listbox. |
void |
callback(interactor from_obj,
event evt,
int callback_num,
java.lang.Object callback_info)
This is the callback object code. |
void |
child_size_changed()
This method is called by our child to tell us the size has changed. |
void |
clear_selected()
Clear the set of selected items. |
void |
clear()
Clear the set of objects that are displayed. |
void |
configure()
We override configure so we can become informed of our size changing and do the resizing of the displayed objects if necessary. |
java.util.Vector |
contents_raw()
Retreive the contents of the listbox as list_elements. |
java.util.Vector |
contents()
Retreive the contents of the listbox transformed by the listbox elements via convert_to_object. |
void |
ensure_thumb_size()
This function is called to ensure that the size displayed by the scrollbar thumb(s) is correct. |
void |
ensure_visible(int target)
This function makes sure that a given index position of the selected_set is visible on the screen. |
boolean |
have_v_scrollbar()
This is a utility to find out if we have (our own, not an external) scrollbar. |
h_scrollbar |
horizontal_scrollbar()
This function returns the current horizontal scrollbar for the purposes of callback handling and the setting of the scrollbar thumb. |
int |
horizontal_status()
Retrieve the status of the horizontal scrollbar. |
int |
index_for_screen_point(int y)
This is a convenience function for users to call when they want to know what index is at a given screen cordinate. |
int |
left_space()
Retrieve the left hand spacing around a listbox. |
protected void |
move_down()
This function gets called (via the special scrollbar) when the user wishes to move to the next item. |
protected void |
move_up()
This function gets called (via the special scrollbar) when the user wishes to move to the previous item. |
protected void |
reconfigure_children()
This function is the one that does the work of deciding if we need the scrollbars and if so how big the thumbs of the scrollbars should be. |
void |
remove_from_selected_set(int start,
int end)
Remove a items from the selected set based on their item number. |
int |
right_space()
Retrieve the right hand spacing around a listbox. |
java.util.Vector |
selected_set_raw()
This function retreives the currently selected set of objects as list_elements. |
java.util.Vector |
selected_set()
This function retreives the currently selected set of objects as values. |
void |
set_above_space(int v)
Set the above spacing around a listbox. |
void |
set_below_space(int v)
Set the below spacing around a listbox. |
void |
set_contents(java.util.Vector contents)
Set the objects that are displayed. |
void |
set_external_h_scrollbar(h_scrollbar n)
This function sets the external horizontal scrollbar. |
void |
set_external_v_scrollbar(v_scrollbar n)
This function sets the external vertical scrollbar. |
void |
set_horizontal_status(int status)
Set the status of the horizontal scrollbar. |
void |
set_left_space(int v)
Set the left hand spacing around a listbox. |
void |
set_right_space(int v)
Set the right hand spacing around a listbox. |
void |
set_scrolled_x(int x)
This function will move the scrolled object (the display of objects) to a particular logical point in x. |
void |
set_scrolled_y(int y)
This function will move the scrolled object in such a way that the parameter given will be at the top of the displayed area. It takes into account margins and bevelling. |
void |
set_selected_by_index(java.util.Vector selected)
This functions sets the selected set of objects by their index numbers. |
void |
set_selected(java.util.Vector selected)
Set the selected set of objects. |
void |
set_vertical_status(int status)
Set the status of the vertical scrollbar. |
protected void |
setup_children()
This function gets called to set up the heirarchy of interactors that a listbox needs. |
v_scrollbar |
vertical_scrollbar()
This function returns the current vertical scrollbar for the purposes of callback handling and the setting of the scrollbar thumb. |
int |
vertical_status()
Retrieve the status of the vertical scrollbar. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected listbox_child_display _child_display
protected listbox_helper _display_parent
protected h_scrollbar _horiz
protected v_scrollbar _vert
protected v_scrollbar _external_v_scrollbar
protected h_scrollbar _external_h_scrollbar
public static final int SCROLLBAR_AS_NECESSARY
public static final int SCROLLBAR_ALWAYS
public static final int SCROLLBAR_NEVER
protected int _vert_status
protected int _horiz_status
Constructor Detail |
public listbox_display()
public listbox_display(int w, int h)
int
- w the width of the interactorint
- h the height of the interactorMethod Detail |
protected void setup_children()
public int vertical_status()
public int horizontal_status()
public void set_vertical_status(int status)
public void set_horizontal_status(int status)
public void child_size_changed()
public void configure()
public void clear()
public void set_contents(java.util.Vector contents)
Vector
- contents the objects to displaypublic java.util.Vector contents()
public java.util.Vector contents_raw()
public void set_selected(java.util.Vector selected)
Vector
- selected the objects which are now to be selectedpublic void add_to_selected_set(int start, int end)
int
- start the first object to be addedint
- end the last object to be added (inclusive)public void remove_from_selected_set(int start, int end)
int
- start the first item to removepublic void clear_selected()
public void callback(interactor from_obj, event evt, int callback_num, java.lang.Object callback_info)
interactor
- from_obj the source of the callbackevent
- evt the event causing the callbackint
- callback_num the callback numberObject
- callback_info the callback supplied informationprotected void reconfigure_children()
public void set_scrolled_x(int x)
int
- x the new x position of the scrolled objectpublic void set_scrolled_y(int y)
It takes into account margins and bevelling.
int
- y in the index of the object to displayprotected void move_down()
protected void move_up()
public java.util.Vector selected_set_raw()
public java.util.Vector selected_set()
public void ensure_visible(int target)
int
- target the object's index to make visiblepublic void set_selected_by_index(java.util.Vector selected)
Vector
- selected a vector of Integer objectspublic v_scrollbar vertical_scrollbar()
public h_scrollbar horizontal_scrollbar()
public void set_external_v_scrollbar(v_scrollbar n)
v_scrollbar
- n the new vertical scrollbarpublic void set_external_h_scrollbar(h_scrollbar n)
h_scrollbar
- n the new horizontal scrollbarpublic int right_space()
public int left_space()
public int above_space()
public int below_space()
public void set_right_space(int v)
int
- v the new value for the spacingpublic void set_left_space(int v)
int
- v the new value for the spacingpublic void set_above_space(int v)
int
- v the new value for the spacingpublic void set_below_space(int v)
int
- v the new value for the spacingpublic void ensure_thumb_size()
public boolean have_v_scrollbar()
public int index_for_screen_point(int y)
int
- y the y coodinate to test
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |