| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | XMenuWindow.
Mapping data |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int[] | |
| private static final int[] | |
| private static PlatformLogger | log
Data members
|
| private XMenuPeer | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | XMenuWindow(XMenuPeer menuPeer)
Constructs XMenuWindow for specified XMenuPeer null for XPopupMenuWindow |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| protected Dimension | |
| pack-priv Dimension | |
| pack-priv XMenuPeer | |
| protected Window | |
| pack-priv Vector | |
| protected XBaseMenuWindow | getParentMenuWindow()
Implements abstract sun. Returns parent menu window (not the X-hierarchy parent window) |
| protected Rectangle | getSubmenuBounds(Rectangle itemBounds, Dimension windowSize)
Implements abstract sun. Calculates placement of submenu window given bounds of item with submenu and size of submenu window. |
| pack-priv void | |
| pack-priv boolean | |
| protected XMenuWindow. | |
| protected void | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| protected void | updateSize()
Implements abstract sun. It's likely that size of items was changed invoke resizing of window on eventHandlerThread |
| CHECKMARK_SIZE | back to summary |
|---|---|
| private static final int CHECKMARK_SIZE | |
| CHECKMARK_X | back to summary |
|---|---|
| private static final int[] CHECKMARK_X | |
| CHECKMARK_Y | back to summary |
|---|---|
| private static final int[] CHECKMARK_Y | |
| log | back to summary |
|---|---|
| private static PlatformLogger log Hides sun. Data members | |
| menuPeer | back to summary |
|---|---|
| private XMenuPeer menuPeer | |
| WINDOW_ITEM_INDENT | back to summary |
|---|---|
| private static final int WINDOW_ITEM_INDENT | |
| WINDOW_ITEM_MARGIN_BOTTOM | back to summary |
|---|---|
| private static final int WINDOW_ITEM_MARGIN_BOTTOM | |
| WINDOW_ITEM_MARGIN_LEFT | back to summary |
|---|---|
| private static final int WINDOW_ITEM_MARGIN_LEFT | |
| WINDOW_ITEM_MARGIN_RIGHT | back to summary |
|---|---|
| private static final int WINDOW_ITEM_MARGIN_RIGHT | |
| WINDOW_ITEM_MARGIN_TOP | back to summary |
|---|---|
| private static final int WINDOW_ITEM_MARGIN_TOP | |
| WINDOW_SHORTCUT_SPACING | back to summary |
|---|---|
| private static final int WINDOW_SHORTCUT_SPACING | |
| WINDOW_SPACING_BOTTOM | back to summary |
|---|---|
| private static final int WINDOW_SPACING_BOTTOM | |
| WINDOW_SPACING_LEFT | back to summary |
|---|---|
| private static final int WINDOW_SPACING_LEFT | |
| WINDOW_SPACING_RIGHT | back to summary |
|---|---|
| private static final int WINDOW_SPACING_RIGHT | |
| WINDOW_SPACING_TOP | back to summary |
|---|---|
| private static final int WINDOW_SPACING_TOP | |
| XMenuWindow | back to summary |
|---|---|
| pack-priv XMenuWindow(XMenuPeer menuPeer) Constructs XMenuWindow for specified XMenuPeer null for XPopupMenuWindow | |
| ensureCreated | back to summary |
|---|---|
| pack-priv boolean ensureCreated() Performs delayed creation of menu window if necessary | |
| getCaptionSize | back to summary |
|---|---|
| protected Dimension getCaptionSize() Returns size of menu window's caption or null if window has no caption. Can be overridden for popup menus and tear-off menus | |
| getDesiredSize | back to summary |
|---|---|
| pack-priv Dimension getDesiredSize() Returns desired size calculated while mapping | |
| getMenuPeer | back to summary |
|---|---|
| pack-priv XMenuPeer getMenuPeer() Returns corresponding menu peer | |
| getMenuTarget | back to summary |
|---|---|
| protected Window getMenuTarget() | |
| getMenuTargetItems | back to summary |
|---|---|
| pack-priv Vector Reads vector of items from target This function is overridden in XPopupMenuPeer | |
| getParentMenuWindow | back to summary |
|---|---|
| protected XBaseMenuWindow getParentMenuWindow() Implements abstract sun. Doc from sun. Returns parent menu window (not the X-hierarchy parent window)
| |
| getSubmenuBounds | back to summary |
|---|---|
| protected Rectangle getSubmenuBounds(Rectangle itemBounds, Dimension windowSize) Implements abstract sun. Doc from sun. Calculates placement of submenu window given bounds of item with submenu and size of submenu window. Returns suggested rectangle for submenu window in global coordinates
| |
| hide | back to summary |
|---|---|
| pack-priv void hide() Hides menu window | |
| isCreated | back to summary |
|---|---|
| pack-priv boolean isCreated() Checks if menu window is created | |
| map | back to summary |
|---|---|
| protected XMenuWindow. Implements abstract sun. Doc from sun. Performs mapping of items in window. This function creates and fills specific descendant of MappingData and sets mapping coordinates of items This function should return default menu data if errors occur
| |
| paintCaption | back to summary |
|---|---|
| protected void paintCaption(Graphics g, Rectangle rect) Paints menu window's caption. Can be overridden for popup menus and tear-off menus. Default implementation does nothing | |
| paintPeer | back to summary |
|---|---|
| public void paintPeer(Graphics g) Overrides sun. Paints menu window
| |
| postInit | back to summary |
|---|---|
| pack-priv void postInit(XCreateWindowParams params) Overrides sun. Initialization
| |
| show | back to summary |
|---|---|
| pack-priv void show(Rectangle bounds) Init window if it's not inited yet and show it at specified coordinates
| |
| updateSize | back to summary |
|---|---|
| protected void updateSize() Implements abstract sun. It's likely that size of items was changed invoke resizing of window on eventHandlerThread
| |
| Modifier and Type | Field and Description |
|---|---|
| private Rectangle | captionRect
Rectangle for the caption Necessary to fix 6267144: PIT: Popup menu label is not shown, XToolkit |
| private Dimension | desiredSize
Desired size of menu window |
| private int | leftMarkWidth
Width of largest checkmark At the same time the left origin of all item's text |
| private int | rightMarkOrigin
The origin of right mark (submenu's arrow) |
| private int | shortcutOrigin
Left origin of all shortcut labels |
| Access | Constructor and Description |
|---|---|
| pack-priv | MappingData(XMenuItemPeer[] items, Rectangle captionRect, Dimension desiredSize, int leftMarkWidth, int shortcutOrigin, int rightMarkOrigin)
|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Rectangle | |
| public Dimension | |
| public int | |
| public int | |
| public int |
| captionRect | back to summary |
|---|---|
| private Rectangle captionRect Rectangle for the caption Necessary to fix 6267144: PIT: Popup menu label is not shown, XToolkit | |
| desiredSize | back to summary |
|---|---|
| private Dimension desiredSize Desired size of menu window | |
| leftMarkWidth | back to summary |
|---|---|
| private int leftMarkWidth Width of largest checkmark At the same time the left origin of all item's text | |
| rightMarkOrigin | back to summary |
|---|---|
| private int rightMarkOrigin The origin of right mark (submenu's arrow) | |
| shortcutOrigin | back to summary |
|---|---|
| private int shortcutOrigin Left origin of all shortcut labels | |
| MappingData | back to summary |
|---|---|
| pack-priv MappingData(XMenuItemPeer[] items, Rectangle captionRect, Dimension desiredSize, int leftMarkWidth, int shortcutOrigin, int rightMarkOrigin) | |
| MappingData | back to summary |
|---|---|
| pack-priv MappingData() Constructs MappingData without items This constructor should be used in case of errors | |
| getCaptionRect | back to summary |
|---|---|
| public Rectangle getCaptionRect() | |
| getDesiredSize | back to summary |
|---|---|
| public Dimension getDesiredSize() | |
| getLeftMarkWidth | back to summary |
|---|---|
| public int getLeftMarkWidth() | |
| getRightMarkOrigin | back to summary |
|---|---|
| public int getRightMarkOrigin() | |
| getShortcutOrigin | back to summary |
|---|---|
| public int getShortcutOrigin() | |