|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.ext.ui.Menu
com.livescribe.ext.ui.RadioMenu
public class RadioMenu
A menu where only one item can be selected at once. Selected and not-selected items have an associated icon.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.livescribe.ext.ui.Menu |
|---|
Menu.MenuAction, Menu.MenuBrowseList, Menu.MenuItem, Menu.MenuListener |
| Constructor Summary | |
|---|---|
RadioMenu(String[] text,
int selectedIndex,
Display display)
Creates a new menu with the specified default selection. |
|
| Method Summary | |
|---|---|
protected Menu.MenuBrowseList |
createBrowseList(Vector items,
BrowseList.Title title)
Creates our own implementation of a browse list. |
static Menu |
createOnOffMenu(boolean flag,
Display display)
A convenience method that creates a radio menu containing "Off" and "On". |
int |
getSelectedIndex()
Gets the index of the currently selected item. |
static void |
setDefaultNotSelectedImage(String image)
Sets the default image for an item that is not selected. |
static void |
setDefaultSelectedImage(String image)
Sets the default image for a selected item. |
void |
setJumpToSelected(boolean flag)
Indicates whether the menu should jump to the currently selected item when it is activated. |
void |
setNotSelectedImage(String image)
Sets the image to use for an item that is not selected. |
void |
setSelectedImage(String image)
Sets the image to use for a selected item. |
void |
setSelectedIndex(int index)
Sets the index of the currently selected item. |
| Methods inherited from class com.livescribe.ext.ui.Menu |
|---|
add, add, add, add, addAction, addMenuListener, doSelect, fireItemChanged, fireItemSelected, fireMenuShown, getBrowseList, getFocusIndex, getItemCount, getMetadata, getMetadata, getParent, getSubmenu, handleMenuEvent, isSelectable, remove, removeMenuListener, setAudio, setBackAPM, setBookmarkable, setDefaultBackAPM, setDefaultForwardAPM, setDefaultSelectAPM, setFocusIndex, setForwardAPM, setIcon, setLastItemBookmarkable, setMetadata, setMetadata, setOneWayParent, setPlayBackAPM, setPlayForwardAPM, setPlaySelectAPM, setSelectable, setSelectAPM, setSubmenu, setText, show, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RadioMenu(String[] text,
int selectedIndex,
Display display)
text - the menu itemsselectedIndex - the initial selectiondisplay - the display object
IndexOutOfBoundsException - if the selected index is out of range.| Method Detail |
|---|
public static Menu createOnOffMenu(boolean flag,
Display display)
flag - the initial selection, true for "On" and
false for "Off"display - the display object
protected Menu.MenuBrowseList createBrowseList(Vector items,
BrowseList.Title title)
createBrowseList in class Menuitems - the itemstitle - the title
public static void setDefaultSelectedImage(String image)
null by default.
image - the new default selected image, null
to unsetpublic static void setDefaultNotSelectedImage(String image)
null by default.
image - the new default not selected image,
null to unsetpublic void setSelectedImage(String image)
default image. If this is set
to null then the default image will be used. This is set
to null by default.
image - the new selected image, null to unsetsetDefaultSelectedImage(String)public void setNotSelectedImage(String image)
default image. If this
is set to null then the default image will be used. This
is set to null by default.
image - the new not selected image, null to
unsetsetDefaultNotSelectedImage(String)public int getSelectedIndex()
public void setJumpToSelected(boolean flag)
true.
flag - the new statepublic void setSelectedIndex(int index)
index - the new selected item index
IndexOutOfBoundsException - if the index is out of range.Menu.getItemCount()
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||