|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--marimba.gui.Widget
|
+--marimba.gui.ContainerWidget
|
+--marimba.gui.GroupWidget
|
+--marimba.gui.PopupWidget
|
+--marimba.gui.PopupMenu
|
+--marimba.gui.DropDownMenu
|
+--marimba.gui.SparseDropDownMenu
A sparse drop down menu, it calls a method called 'getData' of its user to get the currently visible items.
| Field Summary | |
protected int |
firstItem
The first item that is currently in the menu. |
protected int |
itemCount
The total number of items in this menu. |
protected int |
lastItem
The last item that is currently in the menu. |
| Fields inherited from class marimba.gui.DropDownMenu |
autoSize, user |
| Fields inherited from class marimba.gui.PopupMenu |
container, current, dragged, itemFocus, maxVisible, mouseUpPopDown, owner, poppingDown, scrollJump, ticking |
| Fields inherited from class marimba.gui.PopupWidget |
player |
| Fields inherited from class marimba.gui.GroupWidget |
editing, fillMode, fillOptions, lineMode, lineOptions, patsrc, pattern, prevtx, prevty |
| Fields inherited from class marimba.gui.ContainerWidget |
content |
| 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 | |
SparseDropDownMenu(SparseDropDownListBoxWidget user,
int itemCount,
boolean autoSize)
Constructor that does not set the max number of visible items. |
|
SparseDropDownMenu(SparseDropDownListBoxWidget user,
int itemCount,
boolean autoSize,
int maxVisible)
Constructor: Show a SparseDropDownMenu that belongs to the given widget. |
|
| Method Summary | |
PopupMenuItemWidget |
getItem(int index)
Get the item with the given index. |
int |
getItemCount()
Get the number of items in this menu. |
int |
getItemHeight()
Get the height of a menu item, based on the font: in a sparse dropdown menu every item has the same height. |
protected int |
getPopupHeight()
The initial height of the popup menu. |
java.awt.Dimension |
getPreferredSize()
Compute the best size for this menu. |
int[] |
getView()
Get the index of the first and last visible item. |
boolean |
handleEvent(java.awt.Event evt)
Handle events. |
int |
indexOf(PopupMenuItemWidget item)
Return index of given item. |
void |
layout()
Lay out the menu items. |
void |
select(int index)
Select the item with the given index, that item will be visible afterwards: the content will be scrolled to that item. |
long |
tick(long tm,
java.lang.Object arg)
Take care of timer scrolls. |
void |
updateView()
Update the view, which means adding and removing items as needed; this is done using the new view that the method getView() returns. |
| Methods inherited from class marimba.gui.DropDownMenu |
fit, popup, selectNextItem, selectPreviousItem |
| Methods inherited from class marimba.gui.PopupMenu |
add, add, addSeparator, addSeparator, clear, focusInterest, getCurrentItem, getItemFocus, getMaxVisible, getOwner, insert, insert, layoutContainer, nextItem, paint, popdown, popup, popup, preferredSize, previousItem, remove, remove, remove, select, selectNextItem, selectPreviousItem, setItemFocus, setMaxVisible, setMouseUpPopDown, setOwner |
| Methods inherited from class marimba.gui.PopupWidget |
getPlayerPanel, isShowing, paramString, popup, postEvent, repaint, repaint, repaintParent, replace |
| Methods inherited from class marimba.gui.GroupWidget |
getEditing, getEditor, getFillMode, getFillOptions, getLineMode, getLineOptions, getPattern, getPatternSource, getProperties, init, setEditing, setFillMode, setLineMode, setPattern, setProperties, update, updateArea, waitForPattern |
| Methods inherited from class marimba.gui.ContainerWidget |
findInFocus, findWidget, firstInFocus, getChildProperties, getContent, newContent, nextInFocus, previousInFocus |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int itemCount
protected int firstItem
protected int lastItem
| Constructor Detail |
public SparseDropDownMenu(SparseDropDownListBoxWidget user,
int itemCount,
boolean autoSize)
autoSize - if false, the width of the widget is used.itemsInfo - array containing index of first and last item and the total number of items
public SparseDropDownMenu(SparseDropDownListBoxWidget user,
int itemCount,
boolean autoSize,
int maxVisible)
autoSize - if false, the width of the choicewidget is used.itemsInfo - array containing index of first and last item and the total number of items| Method Detail |
protected int getPopupHeight()
getPopupHeight in class PopupMenuDropDownMenu.popup()public void layout()
layout in class PopupMenupublic java.awt.Dimension getPreferredSize()
getPreferredSize in class PopupMenupublic int getItemCount()
getItemCount in class PopupMenupublic int getItemHeight()
public PopupMenuItemWidget getItem(int index)
getItem in class PopupMenupublic int indexOf(PopupMenuItemWidget item)
indexOf in class PopupMenuselect(int)public void select(int index)
select in class PopupMenumarimba.gui.PopupMenuPopupMenu.current,
PopupMenu.indexOf(marimba.gui.PopupMenuItemWidget),
PopupMenu.add(java.lang.String)
public long tick(long tm,
java.lang.Object arg)
tick in class PopupMenumarimba.gui.WidgetTimerClientpublic int[] getView()
public void updateView()
getView()public boolean handleEvent(java.awt.Event evt)
handleEvent in class DropDownMenumarimba.gui.DropDownMenuDropDownMenu.user,
PopupMenu.owner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||