APIdia Launch Partner
Top Fields Constructors Methods
sun.awt.X11

public final Class XPopupMenuPeer

extends XMenuWindow
implements PopupMenuPeer
Class Inheritance
All Implemented Interfaces
java.awt.peer.PopupMenuPeer, java.awt.peer.MenuPeer, java.awt.peer.MenuItemPeer, java.awt.peer.MenuComponentPeer
Imports
java.awt.AWTEvent, .Component, .Dimension, .Event, .Font, .FontMetrics, .Graphics, .MenuItem, .Point, .PopupMenu, .Rectangle, .Toolkit, java.awt.event.KeyEvent, .MouseEvent, java.awt.peer.PopupMenuPeer, java.util.Vector, sun.awt.AWTAccessor, .SunToolkit, sun.util.logging.PlatformLogger

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private XComponentPeer
private static PlatformLogger
log

Hides sun.awt.X11.XMenuWindow.log.

Data members
private PopupMenu
private XMenuPeer

Constructor Summary

AccessConstructor and Description
pack-priv
XPopupMenuPeer(PopupMenu target)

Construction

Method Summary

Modifier and TypeMethod and Description
protected void
doDispose()

Overrides sun.awt.X11.XBaseMenuWindow.doDispose.

Overridden XBaseMenuWindow functions

protected Dimension
getCaptionSize()

Overrides sun.awt.X11.XMenuWindow.getCaptionSize.

Returns height of menu window's caption.

pack-priv Vector<MenuItem>
getMenuTargetItems()

Overrides sun.awt.X11.XMenuWindow.getMenuTargetItems.

Reads vector of items from target This function is overridden in XPopupMenuPeer

pack-priv Font
getTargetFont()

Access to target's fields

pack-priv String
protected Rectangle
getWindowBounds(Point
the origin point specified in show() function converted to global coordinates
origin
,
Dimension
the desired size of menu's window
windowSize
)

Calculates placement of popup menu window given origin in global coordinates and size of menu window.

protected void
handleEvent(AWTEvent event)

Overrides sun.awt.X11.XBaseMenuWindow.handleEvent.

The implementation of base window performs processing of paint events only.

public void
handleKeyPress(XEvent xev)

Overrides sun.awt.X11.XWindow.handleKeyPress.

Overridden XWindow keyboard processing

pack-priv boolean
protected void
paintCaption(Graphics g, Rectangle rect)

Overrides sun.awt.X11.XMenuWindow.paintCaption.

Paints menu window's caption.

public void
setEnabled(boolean enabled)

Implements java.awt.peer.MenuItemPeer.setEnabled.

Enables or disables the menu item.

public void
setFont(Font f)

Implements java.awt.peer.MenuComponentPeer.setFont.

Implementation of interface methods

public void
setLabel(String label)

Implements java.awt.peer.MenuItemPeer.setLabel.

Sets the label to be displayed in this menu item.

public void
show(Event e)

Implements java.awt.peer.PopupMenuPeer.show.

References Deprecated Event is deprecated or references (maybe indirectly) at least one deprecated element.

Shows the popup menu.

pack-priv void
ungrabInputImpl()

Overrides sun.awt.X11.XBaseWindow.ungrabInputImpl.

Overridden XWindow general-purpose functions

Inherited from sun.awt.X11.XMenuWindow:
ensureCreatedgetDesiredSizegetMenuPeergetMenuTargetgetParentMenuWindowgetSubmenuBoundshideisCreatedmappaintPeerpostInitshowupdateSize

Field Detail

CAPTION_MARGIN_TOPback to summary
private static final int CAPTION_MARGIN_TOP
CAPTION_SEPARATOR_HEIGHTback to summary
private static final int CAPTION_SEPARATOR_HEIGHT
componentPeerback to summary
private XComponentPeer componentPeer
logback to summary
private static PlatformLogger log

Hides sun.awt.X11.XMenuWindow.log.

Data members

popupMenuTargetback to summary
private PopupMenu popupMenuTarget
showingMousePressedSubmenuback to summary
private XMenuPeer showingMousePressedSubmenu

Hides sun.awt.X11.XBaseMenuWindow.showingMousePressedSubmenu.

Constructor Detail

XPopupMenuPeerback to summary
pack-priv XPopupMenuPeer(PopupMenu target)

Construction

Method Detail

doDisposeback to summary
protected void doDispose()

Overrides sun.awt.X11.XBaseMenuWindow.doDispose.

Overridden XBaseMenuWindow functions

Annotations
@Override
getCaptionSizeback to summary
protected Dimension getCaptionSize()

Overrides sun.awt.X11.XMenuWindow.getCaptionSize.

Returns height of menu window's caption. Can be overridden for popup menus and tear-off menus

Annotations
@Override
getMenuTargetItemsback to summary
pack-priv Vector<MenuItem> getMenuTargetItems()

Overrides sun.awt.X11.XMenuWindow.getMenuTargetItems.

Doc from sun.awt.X11.XMenuWindow.getMenuTargetItems.

Reads vector of items from target This function is overridden in XPopupMenuPeer

Annotations
@Override
getTargetFontback to summary
pack-priv Font getTargetFont()

Access to target's fields

getTargetLabelback to summary
pack-priv String getTargetLabel()
getWindowBoundsback to summary
protected Rectangle getWindowBounds(Point origin, Dimension windowSize)

Calculates placement of popup menu window given origin in global coordinates and size of menu window. Returns suggested rectangle for menu window in global coordinates

Parameters
origin:Point

the origin point specified in show() function converted to global coordinates

windowSize:Dimension

the desired size of menu's window

handleEventback to summary
protected void handleEvent(AWTEvent event)

Overrides sun.awt.X11.XBaseMenuWindow.handleEvent.

Doc from sun.awt.X11.XBaseMenuWindow.handleEvent.

The implementation of base window performs processing of paint events only. This behaviour is changed in descendants.

Annotations
@Override
handleKeyPressback to summary
public void handleKeyPress(XEvent xev)

Overrides sun.awt.X11.XWindow.handleKeyPress.

Overridden XWindow keyboard processing

Annotations
@Override
isTargetEnabledback to summary
pack-priv boolean isTargetEnabled()
paintCaptionback to summary
protected void paintCaption(Graphics g, Rectangle rect)

Overrides sun.awt.X11.XMenuWindow.paintCaption.

Paints menu window's caption. Can be overridden for popup menus and tear-off menus. Default implementation does nothing

Annotations
@Override
setEnabledback to summary
public void setEnabled(boolean enabled)

Implements java.awt.peer.MenuItemPeer.setEnabled.

Doc from java.awt.peer.MenuItemPeer.setEnabled.

Enables or disables the menu item.

Annotations
@Override
setFontback to summary
public void setFont(Font f)

Implements java.awt.peer.MenuComponentPeer.setFont.

Implementation of interface methods

Annotations
@Override
setLabelback to summary
public void setLabel(String label)

Implements java.awt.peer.MenuItemPeer.setLabel.

Doc from java.awt.peer.MenuItemPeer.setLabel.

Sets the label to be displayed in this menu item.

Annotations
@Override
showback to summary
public void show(Event e)

Implements java.awt.peer.PopupMenuPeer.show.

Doc from java.awt.peer.PopupMenuPeer.show.

References Deprecated

Event is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Shows the popup menu.

Annotations
@Override
@SuppressWarnings:deprecation
ungrabInputImplback to summary
pack-priv void ungrabInputImpl()

Overrides sun.awt.X11.XBaseWindow.ungrabInputImpl.

Overridden XWindow general-purpose functions

Annotations
@Override