SynthPopupMenuUI
public class BasicPopupMenuUI extends PopupMenuUI
Modifier and Type | Field | Description |
---|---|---|
protected JPopupMenu |
popupMenu |
The instance of
JPopupMenu . |
Constructor | Description |
---|---|
BasicPopupMenuUI() |
Constructs a new instance of
BasicPopupMenuUI . |
Modifier and Type | Method | Description |
---|---|---|
static ComponentUI |
createUI(JComponent x) |
Constructs a new instance of
BasicPopupMenuUI . |
void |
installDefaults() |
Installs default properties.
|
protected void |
installKeyboardActions() |
Registers keyboard actions.
|
protected void |
installListeners() |
Registers listeners.
|
void |
installUI(JComponent c) |
Configures the specified component appropriately for the look and feel.
|
boolean |
isPopupTrigger(MouseEvent e) |
Returns whether or not the given
MouseEvent is the popup menu
trigger event for the platform |
protected void |
uninstallDefaults() |
Uninstalls default properties.
|
protected void |
uninstallKeyboardActions() |
Unregisters keyboard actions.
|
protected void |
uninstallListeners() |
Unregisters listeners.
|
void |
uninstallUI(JComponent c) |
Reverses configuration which was done on the specified component during
installUI . |
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPopup
protected JPopupMenu popupMenu
JPopupMenu
.public BasicPopupMenuUI()
BasicPopupMenuUI
.public static ComponentUI createUI(JComponent x)
BasicPopupMenuUI
.x
- a componentBasicPopupMenuUI
public void installUI(JComponent c)
ComponentUI
ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in class ComponentUI
c
- the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void installDefaults()
protected void installListeners()
protected void installKeyboardActions()
public void uninstallUI(JComponent c)
ComponentUI
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in class ComponentUI
c
- the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void uninstallDefaults()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
public boolean isPopupTrigger(MouseEvent e)
PopupMenuUI
MouseEvent
is the popup menu
trigger event for the platformisPopupTrigger
in class PopupMenuUI
e
- a MouseEvent
MouseEvent e
is the popup menu trigger Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps