|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.alee.laf.panel.WebPanel
com.alee.utils.swing.WebHeavyWeightPopup
com.alee.extended.menu.WebDynamicMenu
public class WebDynamicMenu
Custom dynamic menu with pretty display/hide animations.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected double |
angleRange
Angle which is available for menu elements. |
protected boolean |
clockwise
Menu animation direction. |
protected GlobalFocusListener |
focusListener
Custom global focus listener that closes menu. |
protected WindowFollowAdapter |
followAdapter
Invoker window follow adapter. |
protected DynamicMenuType |
hideType
Menu hide animation type. |
protected int |
hidingCause
Index of menu item that caused menu to close. |
protected java.util.List<WebDynamicMenuItem> |
items
Menu items list. |
protected java.awt.event.AWTEventListener |
mouseListener
Custom global mouse listener that closes menu. |
protected int |
radius
Radius of the menu background in px. |
protected double |
startingAngle
First element position angle in degrees. |
protected DynamicMenuType |
type
Menu animation type. |
Fields inherited from class com.alee.utils.swing.WebHeavyWeightPopup |
---|
alwaysOnTop, animate, closeOnOuterAction, displaying, displayProgress, followInvoker, hideAnimator, hiding, invoker, invokerWindow, listeners, lsync, onFullDisplay, onFullHide, opacity, opaque, popup, showAnimator, stepProgress, sync, window |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
WebDynamicMenu()
Constructs new dynamic menu. |
Method Summary | |
---|---|
WebDynamicMenuItem |
addItem(javax.swing.ImageIcon icon)
|
WebDynamicMenuItem |
addItem(javax.swing.ImageIcon icon,
java.awt.event.ActionListener action)
|
WebDynamicMenuItem |
addItem(WebDynamicMenuItem menuItem)
|
DynamicMenuLayout |
getActualLayout()
Returns actual menu layout manager. |
double |
getAngleRange()
|
DynamicMenuType |
getHideType()
|
int |
getHidingCause()
Returns index of menu item that caused menu to close. |
double |
getItemAngle(java.awt.Component item)
Returns menu item angle relative to vertical axis. |
double |
getItemAngle(int index)
Returns menu item angle relative to vertical axis. |
java.util.List<WebDynamicMenuItem> |
getItems()
|
int |
getRadius()
|
double |
getStartingAngle()
|
DynamicMenuType |
getType()
|
static void |
hideAllDynamicMenus()
Hides all visible dynamic menus. |
protected void |
hideAnimationStepPerformed()
Called with each hide animation step performed. |
void |
hideMenu()
Hides dynamic menu. |
void |
hideMenu(int index)
Hides dynamic menu. |
WebHeavyWeightPopup |
hidePopup()
Hides popup window. |
static boolean |
isAnyDynamicMenuDisplayed()
Returns whether any dynamic menu is currently displayed or not. |
boolean |
isClockwise()
|
void |
setAngleRange(double angleRange)
|
void |
setClockwise(boolean clockwise)
|
void |
setHideType(DynamicMenuType hideType)
|
void |
setRadius(int radius)
|
void |
setStartingAngle(double startingAngle)
|
void |
setType(DynamicMenuType type)
|
protected void |
showAnimationStepPerformed()
Called with each show animation step performed. |
void |
showMenu(java.awt.Component invoker,
int x,
int y)
Displays dynamic menu for the specified invoker location. |
void |
showMenu(java.awt.Component invoker,
java.awt.Point location)
Displays dynamic menu for the specified invoker location. |
WebDynamicMenu |
showPopup(java.awt.Component invoker,
int x,
int y)
Shows popup window. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int radius
protected double startingAngle
protected double angleRange
protected DynamicMenuType type
protected DynamicMenuType hideType
protected boolean clockwise
protected java.util.List<WebDynamicMenuItem> items
protected WindowFollowAdapter followAdapter
protected int hidingCause
protected java.awt.event.AWTEventListener mouseListener
protected GlobalFocusListener focusListener
Constructor Detail |
---|
public WebDynamicMenu()
Method Detail |
---|
public int getRadius()
public void setRadius(int radius)
public double getStartingAngle()
public void setStartingAngle(double startingAngle)
public double getAngleRange()
public void setAngleRange(double angleRange)
public DynamicMenuType getType()
public void setType(DynamicMenuType type)
public DynamicMenuType getHideType()
public void setHideType(DynamicMenuType hideType)
public boolean isClockwise()
public void setClockwise(boolean clockwise)
public java.util.List<WebDynamicMenuItem> getItems()
public WebDynamicMenuItem addItem(javax.swing.ImageIcon icon)
public WebDynamicMenuItem addItem(javax.swing.ImageIcon icon, java.awt.event.ActionListener action)
public WebDynamicMenuItem addItem(WebDynamicMenuItem menuItem)
public int getHidingCause()
public WebDynamicMenu showPopup(java.awt.Component invoker, int x, int y)
showPopup
in class WebHeavyWeightPopup
invoker
- invoker componentx
- popup X coordinate relative to invokery
- popup Y coordinate relative to invoker
public void showMenu(java.awt.Component invoker, java.awt.Point location)
invoker
- menu invokerlocation
- menu locationpublic void showMenu(java.awt.Component invoker, int x, int y)
invoker
- menu invokerx
- menu location X coordinatey
- menu location Y coordinateprotected void showAnimationStepPerformed()
showAnimationStepPerformed
in class WebHeavyWeightPopup
public WebHeavyWeightPopup hidePopup()
hidePopup
in class WebHeavyWeightPopup
public void hideMenu()
public void hideMenu(int index)
index
- menu item that forced menu to hideprotected void hideAnimationStepPerformed()
hideAnimationStepPerformed
in class WebHeavyWeightPopup
public double getItemAngle(java.awt.Component item)
item
- menu item
public double getItemAngle(int index)
index
- menu item index
public DynamicMenuLayout getActualLayout()
public static boolean isAnyDynamicMenuDisplayed()
public static void hideAllDynamicMenus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |