|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPopupMenu com.alee.laf.menu.WebPopupMenu
public class WebPopupMenu
This JPopupMenu extension class provides a direct access to WebPopupMenuUI methods. It also has a few additional methods to simplify popup window positioning.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPopupMenu |
---|
javax.swing.JPopupMenu.AccessibleJPopupMenu, javax.swing.JPopupMenu.Separator |
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 |
---|
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 | |
---|---|
WebPopupMenu()
Constructs new popup menu. |
|
WebPopupMenu(java.lang.String styleId)
Constructs new popup menu with the specified style ID. |
Method Summary | |
---|---|
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()
Returns language container key for container which implements this interface. |
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()
Removes language container key for container which implements this interface. |
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)
Sets language container key for container which implements this interface. |
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. |
Methods inherited from class javax.swing.JPopupMenu |
---|
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, show |
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, 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, 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, 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, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WebPopupMenu()
public WebPopupMenu(java.lang.String styleId)
styleId
- popup menu style IDMethod Detail |
---|
public void addSeparator()
addSeparator
in class javax.swing.JPopupMenu
public void addSeparator(int index)
index
- separator Z-indexpublic WebPopupMenu showAbove(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showAboveStart(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showAboveMiddle(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showAboveEnd(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showBelow(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showBelowStart(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showBelowMiddle(java.awt.Component invoker)
invoker
- invoker component
public WebPopupMenu showBelowEnd(java.awt.Component invoker)
invoker
- invoker component
public java.awt.Insets getMargin()
getMargin
in class javax.swing.JPopupMenu
public WebPopupMenu setMargin(java.awt.Insets margin)
margin
- popup menu content margin
public 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 margin
public WebPopupMenu setMargin(int spacing)
spacing
- popup menu content margin
public PopupMenuPainter getPainter()
public WebPopupMenu setPainter(WebPopupMenuPainter painter)
painter
- new popup menu painter
public int getMenuSpacing()
public WebPopupMenu setMenuSpacing(int spacing)
spacing
- new spacing between menubar popup menus
public boolean isFixLocation()
public WebPopupMenu setFixLocation(boolean fixLocation)
fixLocation
- whether popup menu should try to fix its initial location when displayed or not
public WebPopupMenu setPopupMenuWay(PopupMenuWay way)
way
- approximate popup menu display way
public PopupStyle getPopupStyle()
public WebPopupMenu setPopupStyle(PopupStyle style)
style
- new popup style
public java.awt.Color getBorderColor()
public WebPopupMenu setBorderColor(java.awt.Color color)
color
- new popup border color
public int getRound()
public WebPopupMenu setRound(int round)
round
- decoration corners rounding
public int getShadeWidth()
public WebPopupMenu setShadeWidth(int shadeWidth)
shadeWidth
- decoration shade width
public float getShadeTransparency()
public WebPopupMenu setShadeTransparency(float opacity)
opacity
- new popup shade transparency
public int getCornerWidth()
public WebPopupMenu setCornerWidth(int width)
width
- popup dropdown style corner width
public int getCornerAlignment()
public void setCornerAlignment(int cornerAlignment)
cornerAlignment
- dropdown corner alignmentpublic float getTransparency()
public WebPopupMenu setTransparency(float transparency)
transparency
- popup background transparency
public java.lang.String getStyleId()
getStyleId
in interface Styleable
public void setStyleId(java.lang.String id)
setStyleId
in interface Styleable
id
- custom component style IDpublic java.awt.Shape provideShape()
provideShape
in interface ShapeProvider
public WebPopupMenuUI getWebUI()
public void updateUI()
updateUI
in class javax.swing.JPopupMenu
public int getPreferredWidth()
getPreferredWidth
in interface SizeMethods<WebPopupMenu>
public WebPopupMenu setPreferredWidth(int preferredWidth)
setPreferredWidth
in interface SizeMethods<WebPopupMenu>
preferredWidth
- new component preferred width
public int getPreferredHeight()
getPreferredHeight
in interface SizeMethods<WebPopupMenu>
public WebPopupMenu setPreferredHeight(int preferredHeight)
setPreferredHeight
in interface SizeMethods<WebPopupMenu>
preferredHeight
- new component preferred height
public int getMinimumWidth()
getMinimumWidth
in interface SizeMethods<WebPopupMenu>
public WebPopupMenu setMinimumWidth(int minimumWidth)
setMinimumWidth
in interface SizeMethods<WebPopupMenu>
minimumWidth
- new component minimum width
public int getMinimumHeight()
getMinimumHeight
in interface SizeMethods<WebPopupMenu>
public WebPopupMenu setMinimumHeight(int minimumHeight)
setMinimumHeight
in interface SizeMethods<WebPopupMenu>
minimumHeight
- new component minimum height
public java.awt.Dimension getPreferredSize()
getPreferredSize
in interface SizeMethods<WebPopupMenu>
getPreferredSize
in class javax.swing.JComponent
public void setLanguageContainerKey(java.lang.String key)
setLanguageContainerKey
in interface LanguageContainerMethods
key
- language container keypublic void removeLanguageContainerKey()
removeLanguageContainerKey
in interface LanguageContainerMethods
public java.lang.String getLanguageContainerKey()
getLanguageContainerKey
in interface LanguageContainerMethods
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |