public class WebPopupMenu extends javax.swing.JPopupMenu implements Styleable, ShapeProvider, SizeMethods<WebPopupMenu>, com.alee.managers.language.LanguageContainerMethods
javax.swing.JPopupMenu.AccessibleJPopupMenu, javax.swing.JPopupMenu.Separatorjavax.swing.JComponent.AccessibleJComponentaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
WebPopupMenu()
Constructs new popup menu.
|
WebPopupMenu(java.lang.String styleId)
Constructs new popup menu with the specified style ID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSeparator()
Adds separator into menu.
|
void |
addSeparator(int index)
Adds separator into menu at the specified Z-index.
|
java.awt.Color |
getBorderColor()
Returns popup border color.
|
int |
getCornerAlignment()
Returns dropdown corner alignment.
|
int |
getCornerWidth()
Returns popup dropdown style corner width.
|
java.lang.String |
getLanguageContainerKey() |
java.awt.Insets |
getMargin()
Returns popup menu content margin.
|
int |
getMenuSpacing()
Returns spacing between menubar popup menus.
|
int |
getMinimumHeight()
Returns component minimum height.
|
int |
getMinimumWidth()
Returns component minimum width.
|
PopupMenuPainter |
getPainter()
Returns popup menu painter.
|
PopupStyle |
getPopupStyle()
Returns popup style.
|
int |
getPreferredHeight()
Returns component preferred height.
|
java.awt.Dimension |
getPreferredSize()
Returns component preferred size.
|
int |
getPreferredWidth()
Returns component preferred width.
|
int |
getRound()
Returns decoration corners rounding.
|
float |
getShadeTransparency()
Returns popup shade transparency.
|
int |
getShadeWidth()
Returns decoration shade width.
|
java.lang.String |
getStyleId()
Returns component style ID.
|
float |
getTransparency()
Returns popup background transparency.
|
WebPopupMenuUI |
getWebUI()
Returns Web-UI applied to this class.
|
boolean |
isFixLocation()
Returns whether popup menu should try to fix its initial location when displayed or not.
|
java.awt.Shape |
provideShape()
Returns component shape.
|
void |
removeLanguageContainerKey() |
WebPopupMenu |
setBorderColor(java.awt.Color color)
Sets popup border color.
|
void |
setCornerAlignment(int cornerAlignment)
Sets dropdown corner alignment.
|
WebPopupMenu |
setCornerWidth(int width)
Sets popup dropdown style corner width.
|
WebPopupMenu |
setFixLocation(boolean fixLocation)
Sets whether popup menu should try to fix its initial location when displayed or not.
|
void |
setLanguageContainerKey(java.lang.String key) |
WebPopupMenu |
setMargin(java.awt.Insets margin)
Sets popup menu content margin.
|
WebPopupMenu |
setMargin(int spacing)
Sets popup menu content margin.
|
WebPopupMenu |
setMargin(int top,
int left,
int bottom,
int right)
Sets popup menu content margin.
|
WebPopupMenu |
setMenuSpacing(int spacing)
Sets spacing between menubar popup menus.
|
WebPopupMenu |
setMinimumHeight(int minimumHeight)
Sets component minimum height.
|
WebPopupMenu |
setMinimumWidth(int minimumWidth)
Sets component minimum width.
|
WebPopupMenu |
setPainter(WebPopupMenuPainter painter)
Sets popup menu painter.
|
WebPopupMenu |
setPopupMenuWay(PopupMenuWay way)
Assists popup menu to allow it choose the best position relative to invoker.
|
WebPopupMenu |
setPopupStyle(PopupStyle style)
Sets popup style.
|
WebPopupMenu |
setPreferredHeight(int preferredHeight)
Sets component preferred height.
|
WebPopupMenu |
setPreferredWidth(int preferredWidth)
Sets component preferred width.
|
WebPopupMenu |
setRound(int round)
Sets decoration corners rounding.
|
WebPopupMenu |
setShadeTransparency(float opacity)
Sets popup shade transparency.
|
WebPopupMenu |
setShadeWidth(int shadeWidth)
Sets decoration shade width.
|
void |
setStyleId(java.lang.String id)
Sets custom component style ID.
|
WebPopupMenu |
setTransparency(float transparency)
Sets popup background transparency.
|
WebPopupMenu |
showAbove(java.awt.Component invoker)
Displays popup menu above the invoker component starting at its leading side.
|
WebPopupMenu |
showAboveEnd(java.awt.Component invoker)
Displays popup menu above the invoker component starting at its trailing side.
|
WebPopupMenu |
showAboveMiddle(java.awt.Component invoker)
Displays popup menu above the invoker component at its middle.
|
WebPopupMenu |
showAboveStart(java.awt.Component invoker)
Displays popup menu above the invoker component starting at its leading side.
|
WebPopupMenu |
showBelow(java.awt.Component invoker)
Displays popup menu under the invoker component starting at its leading side.
|
WebPopupMenu |
showBelowEnd(java.awt.Component invoker)
Displays popup menu under the invoker component starting at its trailing side.
|
WebPopupMenu |
showBelowMiddle(java.awt.Component invoker)
Displays popup menu under the invoker component at its middle.
|
WebPopupMenu |
showBelowStart(java.awt.Component invoker)
Displays popup menu under the invoker component starting at its leading side.
|
void |
updateUI()
Installs a Web-UI into this component.
|
add, add, add, addMenuKeyListener, addPopupMenuListener, createActionChangeListener, createActionComponent, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMenuKeyListeners, getPopupMenuListeners, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processFocusEvent, processKeyEvent, processKeyEvent, processMouseEvent, remove, removeMenuKeyListener, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, showaddAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, 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, unregisterKeyboardAction, updateadd, 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, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, 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, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, 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, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic WebPopupMenu()
public WebPopupMenu(java.lang.String styleId)
styleId - popup menu style IDpublic void addSeparator()
addSeparator in class javax.swing.JPopupMenupublic void addSeparator(int index)
index - separator Z-indexpublic WebPopupMenu showAbove(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showAboveStart(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showAboveMiddle(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showAboveEnd(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showBelow(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showBelowStart(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showBelowMiddle(java.awt.Component invoker)
invoker - invoker componentpublic WebPopupMenu showBelowEnd(java.awt.Component invoker)
invoker - invoker componentpublic java.awt.Insets getMargin()
getMargin in class javax.swing.JPopupMenupublic WebPopupMenu setMargin(java.awt.Insets margin)
margin - popup menu content marginpublic WebPopupMenu setMargin(int top, int left, int bottom, int right)
top - top popup menu content marginleft - left popup menu content marginbottom - bottom popup menu content marginright - right popup menu content marginpublic WebPopupMenu setMargin(int spacing)
spacing - popup menu content marginpublic PopupMenuPainter getPainter()
public WebPopupMenu setPainter(WebPopupMenuPainter painter)
painter - new popup menu painterpublic int getMenuSpacing()
public WebPopupMenu setMenuSpacing(int spacing)
spacing - new spacing between menubar popup menuspublic boolean isFixLocation()
public WebPopupMenu setFixLocation(boolean fixLocation)
fixLocation - whether popup menu should try to fix its initial location when displayed or notpublic WebPopupMenu setPopupMenuWay(PopupMenuWay way)
way - approximate popup menu display waypublic PopupStyle getPopupStyle()
public WebPopupMenu setPopupStyle(PopupStyle style)
style - new popup stylepublic java.awt.Color getBorderColor()
public WebPopupMenu setBorderColor(java.awt.Color color)
color - new popup border colorpublic int getRound()
public WebPopupMenu setRound(int round)
round - decoration corners roundingpublic int getShadeWidth()
public WebPopupMenu setShadeWidth(int shadeWidth)
shadeWidth - decoration shade widthpublic float getShadeTransparency()
public WebPopupMenu setShadeTransparency(float opacity)
opacity - new popup shade transparencypublic int getCornerWidth()
public WebPopupMenu setCornerWidth(int width)
width - popup dropdown style corner widthpublic int getCornerAlignment()
public void setCornerAlignment(int cornerAlignment)
cornerAlignment - dropdown corner alignmentpublic float getTransparency()
public WebPopupMenu setTransparency(float transparency)
transparency - popup background transparencypublic java.lang.String getStyleId()
getStyleId in interface Styleablepublic void setStyleId(java.lang.String id)
setStyleId in interface Styleableid - custom component style IDpublic java.awt.Shape provideShape()
provideShape in interface ShapeProviderpublic WebPopupMenuUI getWebUI()
public void updateUI()
updateUI in class javax.swing.JPopupMenupublic int getPreferredWidth()
getPreferredWidth in interface SizeMethods<WebPopupMenu>public WebPopupMenu setPreferredWidth(int preferredWidth)
setPreferredWidth in interface SizeMethods<WebPopupMenu>preferredWidth - new component preferred widthpublic int getPreferredHeight()
getPreferredHeight in interface SizeMethods<WebPopupMenu>public WebPopupMenu setPreferredHeight(int preferredHeight)
setPreferredHeight in interface SizeMethods<WebPopupMenu>preferredHeight - new component preferred heightpublic int getMinimumWidth()
getMinimumWidth in interface SizeMethods<WebPopupMenu>public WebPopupMenu setMinimumWidth(int minimumWidth)
setMinimumWidth in interface SizeMethods<WebPopupMenu>minimumWidth - new component minimum widthpublic int getMinimumHeight()
getMinimumHeight in interface SizeMethods<WebPopupMenu>public WebPopupMenu setMinimumHeight(int minimumHeight)
setMinimumHeight in interface SizeMethods<WebPopupMenu>minimumHeight - new component minimum heightpublic java.awt.Dimension getPreferredSize()
getPreferredSize in interface SizeMethods<WebPopupMenu>getPreferredSize in class javax.swing.JComponentpublic void setLanguageContainerKey(java.lang.String key)
setLanguageContainerKey in interface com.alee.managers.language.LanguageContainerMethodspublic void removeLanguageContainerKey()
removeLanguageContainerKey in interface com.alee.managers.language.LanguageContainerMethodspublic java.lang.String getLanguageContainerKey()
getLanguageContainerKey in interface com.alee.managers.language.LanguageContainerMethods