|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--marimba.gui.Widget
|
+--marimba.gui.ChoiceWidget
|
+--marimba.gui.DropDownListBoxWidget
A multiple choice widget.
DropDownMenu| Field Summary | |
int |
align
The arrow button can be displayed at the left or the right. |
protected static Options |
alignOptions
The possible options for the alignment (LEFT or RIGHT). |
boolean |
fillButton
If true, the dropdown button will be filled. |
boolean |
fixedWidth
The menu can have a fixed width or adjust its width to the width of the menu items. |
int |
maxVisible
The maximum number of visible items, if there are more items a scrollbar is used. |
int |
style
A dropdownlistbox can be plain, boxed, filled or underlined. |
protected static Options |
styleOptions
The possible options for the style (PLAIN, BOXED, FILLED, UNDERLINE). |
DropDownTextBoxWidget |
text
The textbox used for this dropdownlistbox. |
| Fields inherited from class marimba.gui.ChoiceWidget |
choices, current, names, NOCHOICE |
| Fields inherited from class marimba.gui.Widget |
adapter, background, clazz, defaultBackground, defaultFont, defaultForeground, defaultHilite, directGraphics, disabled, east, editor, focus, font, foreground, height, hilite, layoutMgr, name, north, nwidgets, parent, script, south, tip, transparent, tx, ty, valid, visible, wBackground, west, wFont, wForeground, wHilite, widgets, width, wScript, wTip, x, y |
| Fields inherited from interface marimba.gui.WidgetConstants |
ALWAYS, ANYWHERE, APPLET, ASCENDING, BLINK, BLUE, BONGO_EVENT, BOTH, BOTTOM, BOXED, BUTTON, CENTER, CHAR, CHECK, COLLAPSE_EVENT, CONTENT, DESCENDING, DETACHED, DIAGONAL, DOWN, DRAG, EXCLUSIVE, EXPAND_EVENT, FILL, FILLED, GREEN, HORIZONTAL, INSIDE, INVISIBLE, JAVA_VERSION, JAVAOS, JDK10, JDK11, LAYERS, LEFT, LOWERED, MAC, MULTIPLE, NETCASTER, NETSCAPE, NEVER, NONE, NT, OPTIONAL, OS_ARCH, OS_NAME, OS_VERSION, OUTLINE, PAGE_DOWN, PAGE_EVENT, PAGE_UP, PATTERN, PC, PICTURE, PLAIN, PROPORTIONAL, RADIO, RAISED, RED, REST_EVENT, RIGHT, ROUNDED, SCALE, SCROLLBAR, SCROLLING, SOLID, SQUARE, TEXT_CHANGED_EVENT, TOP, TOPLEFT, TRUNCATE, UNDERLINE, UNIX, UP, VERTICAL, WAKE_EVENT, WIN95, WINDOWS, WORD |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DropDownListBoxWidget()
Constructor. |
|
DropDownListBoxWidget(java.lang.String value,
int style,
int align,
java.lang.String list)
Constructor that actually does something. |
|
| Method Summary | |
int |
getAlign()
Get align. |
static Options |
getAlignOptions()
Get the possible options for the alignment. |
boolean |
getFillButton()
Check whether the dropdown button is being filled. |
int |
getMaxVisible()
Get the maximum number of visible items in the popup. |
java.awt.Dimension |
getPreferredSize()
Get the preferred size of URL text widgets. |
void |
getProperties(PropertyList list)
Get the properties of this widget. |
int |
getStyle()
Get style. |
static Options |
getStyleOptions()
Get the possible options for the style. |
boolean |
handleEvent(java.awt.Event evt)
Handle events. |
boolean |
hasFixedWidth()
Check whether the menu has a fixed width. |
void |
layout()
Lay out the container. |
protected DropDownMenu |
newDropDown()
Display and return a new dropdownmenu with the required settings for letting it behave like the dropdownlistbox wants it to. |
protected DropDownTextBoxWidget |
newTextBox()
Returns a new textbox with the necessary properties set to let it behave like the dropdownlist wants it to. |
void |
paint(java.awt.Graphics g)
Refreshes text with key value. |
void |
selectNextItem()
Select the next item, if there is no current item yet, it will result in the selection of the first item. |
void |
selectPreviousItem()
Select previous item, if there is no current item yet, it will result in the selection of the last item. |
void |
setAlign(int align)
Set align. |
void |
setDisabled(boolean disabled)
Disable the textbox too, if there is one. |
void |
setFillButton(boolean fillButton)
Fill the dropdown button or not. |
void |
setFixedWidth(boolean fixedWidth)
Let the width be fixed or let it adjust to the menu item(s). |
void |
setMaxVisible(int maxVisible)
Set the maximum number of visible items in the popup. |
void |
setProperties(PropertyList list)
Set the properties of this widget. |
void |
setScrollbarColors(java.awt.Color foreground,
java.awt.Color hilite,
java.awt.Color background)
Set the colors of the scrollbar(s) in the dropdown, if a color is null the default color of this listbox will be used |
void |
setStyle(int style)
Set style. |
void |
setValue(int value)
Set the current choice given the index. |
void |
stop()
Stop. |
| Methods inherited from class marimba.gui.ChoiceWidget |
addChoice, addUniqueChoice, clear, getChildProperties, getChoice, getChoiceCount, getChoiceID, getChoices, getChoicesString, getChoiceText, getChoiceValue, getIntegerValue, getName, getNames, getStringValue, getText, getValue, getValueIndex, hasChoice, insertChoiceAt, isEnabled, paramString, removeAllChoices, removeChoice, removeChoiceAt, setChoices, setChoices, setChoices, setChoices, setText, setValue, setValue |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static Options alignOptions
getAlignOptions(),
alignprotected static Options styleOptions
getStyleOptions(),
stylepublic int style
getStyle(),
setStyle(int),
styleOptionspublic int align
getAlign(),
setAlign(int),
alignOptionspublic DropDownTextBoxWidget text
newTextBox()public int maxVisible
getMaxVisible(),
setMaxVisible(int)public boolean fillButton
getFillButton(),
setFillButton(boolean)public boolean fixedWidth
hasFixedWidth(),
setFixedWidth(boolean)| Constructor Detail |
public DropDownListBoxWidget()
public DropDownListBoxWidget(java.lang.String value,
int style,
int align,
java.lang.String list)
value - Currently displayed value.style - Take care of some mundane matters of appearance.align - Where to put the text. More matters of appearance.list - Some values to show.| Method Detail |
public void getProperties(PropertyList list)
getProperties in class ChoiceWidgetmarimba.gui.Widgetlist - The list in which the current state needs to be saved.Widget.setProperties(PropertyList)public void setProperties(PropertyList list)
setProperties in class ChoiceWidgetmarimba.gui.Widgetlist - The list that contains the new widget state.Widget.getProperties(PropertyList)public java.awt.Dimension getPreferredSize()
getPreferredSize in class Widget
public void setScrollbarColors(java.awt.Color foreground,
java.awt.Color hilite,
java.awt.Color background)
public static Options getAlignOptions()
alignOptionspublic static Options getStyleOptions()
styleOptionspublic void selectNextItem()
ChoiceWidget.currentpublic void selectPreviousItem()
ChoiceWidget.currentpublic int getAlign()
alignpublic void setAlign(int align)
alignpublic boolean getFillButton()
fillButtonpublic void setFillButton(boolean fillButton)
fillButtonpublic boolean hasFixedWidth()
fixedWidthpublic void setFixedWidth(boolean fixedWidth)
fixedWidthpublic int getMaxVisible()
maxVisiblepublic void setMaxVisible(int maxVisible)
maxVisiblepublic int getStyle()
stylepublic void setStyle(int style)
stylepublic void paint(java.awt.Graphics g)
paint in class Widgetpublic void setValue(int value)
setValue in class ChoiceWidgetmarimba.gui.ChoiceWidgetChoiceWidget.currentprotected DropDownTextBoxWidget newTextBox()
textpublic void setDisabled(boolean disabled)
setDisabled in class Widgetmarimba.gui.WidgetWidget.isDisabled(),
Widget.enable(),
Widget.disable()public void stop()
stop in class Widgetpublic void layout()
layout in class Widgetprotected DropDownMenu newDropDown()
public boolean handleEvent(java.awt.Event evt)
handleEvent in class Widgetmarimba.gui.Widgetevt - the event that needs to be handled by the widgetWidget.postEvent(java.awt.Event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||