|
||||||||||
| 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
|
+--conga.gui.AbstractPopupMenu
An abstract implementation of a popup menu. This class provides all necessary functionality to enable lightweight popup menus for widgets, except for the actual item manipulation.
| 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 | |
AbstractPopupMenu()
Create a new popup menu. |
|
| Method Summary | |
boolean |
focusInterest()
A widget popup menu is interested in the focus, if it is not disabled. |
int |
getInitialPopupHeight()
The initial height of the popup menu, influenced by the maximum number of visible items. |
int |
getMaxVisible()
Get the maximum number of visible items. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this abstract popup menu, based on the preferred size of the items inside the menu. |
boolean |
handleEvent(java.awt.Event evt)
Handles the necessary key and mouse events, that manipulates menu item in a generic way. |
boolean |
hasInheritedFont()
Check whether the font of this menu has been explicitly set, or whether it is inherited. |
boolean |
isPoppedUp()
Check whether this menu is currently popped up. |
void |
layout()
Layout the contents of the popup menu. |
void |
paint(java.awt.Graphics g,
int cx,
int cy,
int cw,
int ch)
Paint the background of the popupmenu. |
void |
popdown()
Hides this widget popupmenu; it will make sure that the widget that had the focus (before this menu was popped up) re-gains the focus. |
void |
popup(Widget parent,
int x,
int y)
Shows the popup menu at the x, y position relative to the given parent widget, the menu will have the preferred width after popping up. |
void |
popup(Widget parent,
int x,
int y,
int width)
Shows the popup menu at the x, y position relative to the given parent widget, with the given fixed width. |
void |
popupDirected(Widget parent,
int direction,
int alignment)
Popup this popup menu in the given direction, with the given alignment. |
void |
setMaxVisible(int maxVisible)
Set the maximum number of visible items. |
| Methods inherited from class marimba.gui.GroupWidget |
getEditing, getEditor, getFillMode, getFillOptions, getLineMode, getLineOptions, getPattern, getPatternSource, getProperties, init, paramString, 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 |
| Constructor Detail |
public AbstractPopupMenu()
| Method Detail |
public int getMaxVisible()
setMaxVisible(int)public void setMaxVisible(int maxVisible)
getMaxVisible()public int getInitialPopupHeight()
getMaxVisible(),
popup(marimba.gui.Widget, int, int)
public void popup(Widget parent,
int x,
int y)
parent - the widget which defines the coordinate spacex - the x coordinate position to popup the menuy - the y coordinate position to popup the menupopupDirected(marimba.gui.Widget, int, int)
public void popup(Widget parent,
int x,
int y,
int width)
parent - the widget which defines the coordinate spacex - the x coordinate position to popup the menuy - the y coordinate position to popup the menuwidth - the fixed width that the popup menu will have after popping uppopupDirected(marimba.gui.Widget, int, int)public java.awt.Dimension getPreferredSize()
getPreferredSize in class ContainerWidgetpublic void popdown()
popup(marimba.gui.Widget, int, int)public boolean isPoppedUp()
public boolean hasInheritedFont()
public void popupDirected(Widget parent,
int direction,
int alignment)
direction - UP, DOWN, LEFT or RIGHTalignment - LEFT, CENTER or RIGHTpopup(marimba.gui.Widget, int, int)public void layout()
layout in class ContainerWidget
public void paint(java.awt.Graphics g,
int cx,
int cy,
int cw,
int ch)
paint in class GroupWidgetpublic 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)public boolean focusInterest()
focusInterest in class Widgetmarimba.gui.WidgetWidget.focus,
Widget.requestFocus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||