3147N/A * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 1472N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any 0N/A /************************************************ 0N/A ************************************************/ 0N/A * dimension constants 2230N/A private static final int[]
CHECKMARK_X =
new int[] {
1,
25,
56,
124,
124,
85,
64};
// X-coords 2230N/A private static final int[]
CHECKMARK_Y =
new int[] {
59,
35,
67,
0,
12,
66,
123};
// Y-coords 2230N/A /************************************************ 2230N/A ************************************************/ 2230N/A * Rectangle for the caption 2230N/A * Necessary to fix 6267144: PIT: Popup menu label is not shown, XToolkit 0N/A * Desired size of menu window 0N/A * Width of largest checkmark 4321N/A * At the same time the left origin 0N/A * of all item's text 0N/A * Left origin of all shortcut labels 0N/A * The origin of right mark 4321N/A * Constructs MappingData without items 4321N/A * This constructor should be used in case of errors 4321N/A /************************************************ 4321N/A ************************************************/ 4321N/A * Constructs XMenuWindow for specified XMenuPeer 4321N/A * null for XPopupMenuWindow 4321N/A // Get menus from the target. 4321N/A /************************************************ 4321N/A ************************************************/ 4321N/A //Fixed 6267182: PIT: Menu is not visible after 4321N/A //showing and disposing a file dialog, XToolkit 4321N/A //toFront() is called on every show 4321N/A /************************************************ 4321N/A * Implementation of abstract methods 4321N/A ************************************************/ 4321N/A * @see XBaseMenuWindow.getParentMenuWindow() 4321N/A * @see XBaseMenuWindow.map() 4321N/A //TODO:Implement popup-menu caption mapping and painting and tear-off 4321N/A //We need maximum width of components before calculating item's bounds 2230N/A //Text metrics could not be determined because of errors 0N/A //Map item with empty rectangle 2230N/A * @see XBaseMenuWindow.getSubmenuBounds() 0N/A * It's likely that size of items was changed 0N/A * invoke resizing of window on eventHandlerThread 0N/A /************************************************ 2230N/A * Overridable caption-painting functions 0N/A * Necessary to fix 6267144: PIT: Popup menu label is not shown, XToolkit 0N/A ************************************************/ 2230N/A * Returns size of menu window's caption or null 2230N/A * if window has no caption. 2230N/A * Can be overriden for popup menus and tear-off menus 2230N/A * Paints menu window's caption. 2230N/A * Can be overriden for popup menus and tear-off menus. 2230N/A * Default implementation does nothing 0N/A /************************************************ 0N/A * General-purpose utility functions 0N/A ************************************************/ 0N/A * Returns corresponding menu peer 0N/A * Reads vector of items from target 0N/A * This function is overriden in XPopupMenuPeer 2230N/A * Returns desired size calculated while mapping 2230N/A * Checks if menu window is created 0N/A * Performs delayed creation of menu window if necessary 0N/A * Init window if it's not inited yet 0N/A * and show it at specified coordinates 0N/A * @param bounds bounding rectangle of window 0N/A * in global coordinates 0N/A //Fixed 6267182: PIT: Menu is not visible after 0N/A //showing and disposing a file dialog, XToolkit 2230N/A /************************************************ 4030N/A ************************************************/ 2230N/A //Fill background of rectangle 2442N/A //calculate arrow coordinates 2442N/A //calculate checkmark coordinates