de.matthiasmann.twl
Class MenuManager

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.Container
          extended by de.matthiasmann.twl.PopupWindow
              extended by de.matthiasmann.twl.MenuManager

public class MenuManager
extends PopupWindow


Nested Class Summary
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
MenuManager(Widget owner, boolean isMenuBar)
           
 
Method Summary
protected  void afterAddToGUI(GUI gui)
          Called after this widget has been added to a GUI tree.
 void closePopup()
          Closes this pop-up window.
 java.lang.Runnable getCloseCallback()
           
 Widget getPopupForMenu(Menu menu)
          Returns the popup widget for the specified menu
protected  boolean handleEventPopup(Event evt)
          This method can be overriden to customize the event handling of a pop-up window.
protected  void layout()
          Called when the layoutInvalid flag is set.
 
Methods inherited from class de.matthiasmann.twl.PopupWindow
bindMouseDrag, centerPopup, escapePressed, getOwner, getPreferredHeight, getPreferredWidth, getRequestCloseCallback, handleEvent, isCloseOnClickedOutside, isCloseOnEscape, isMouseInside, isOpen, mouseClickedOutside, openPopup, openPopupCentered, openPopupCentered, requestPopupClose, setCloseOnClickedOutside, setCloseOnEscape, setRequestCloseCallback
 
Methods inherited from class de.matthiasmann.twl.Container
getMinHeight, getMinWidth, getPreferredInnerHeight, getPreferredInnerWidth
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, allChildrenRemoved, applyTheme, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, beforeRemoveFromGUI, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, childVisibilityChanged, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, insertChild, invalidateLayout, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, paintWidget, positionChanged, reapplyTheme, removeAllChildren, removeChild, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, setTooltipContent, setVisible, sizeChanged, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuManager

public MenuManager(Widget owner,
                   boolean isMenuBar)
Method Detail

getCloseCallback

public java.lang.Runnable getCloseCallback()

closePopup

public void closePopup()
Description copied from class: PopupWindow
Closes this pop-up window. Keyboard focus is transfered to it's owner.

Overrides:
closePopup in class PopupWindow

getPopupForMenu

public Widget getPopupForMenu(Menu menu)
Returns the popup widget for the specified menu

Parameters:
menu - the menu for which to return the popup
Returns:
the popup widget or null if not open

afterAddToGUI

protected void afterAddToGUI(GUI gui)
Description copied from class: Widget
Called after this widget has been added to a GUI tree.

Overrides:
afterAddToGUI in class Widget
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

layout

protected void layout()
Description copied from class: Widget
Called when the layoutInvalid flag is set. The default implementation does nothing.

Overrides:
layout in class Container

handleEventPopup

protected boolean handleEventPopup(Event evt)
Description copied from class: PopupWindow
This method can be overriden to customize the event handling of a pop-up window.

The default implementation calls Widget.handleEvent(de.matthiasmann.twl.Event)

Overrides:
handleEventPopup in class PopupWindow
Parameters:
evt - the event
Returns:
true if the event has been handled, false otherwise.