jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuBarUI.java
author serb
Mon, 07 Apr 2014 15:34:27 +0400
changeset 24163 d56df89854c4
parent 23010 6dadb192ad81
child 25761 c408b10ef757
permissions -rw-r--r--
8032219: [macosx] Scrollbars looks bad under retina in Motif and Metal L&F Reviewed-by: pchelko, flar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 20169
diff changeset
     2
 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.swing.plaf.basic;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import sun.swing.DefaultLookup;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import sun.swing.UIAction;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.swing.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import javax.swing.event.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.awt.Color;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.awt.Component;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import java.awt.Container;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import java.awt.Dimension;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.awt.Graphics;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import java.awt.Insets;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.awt.Point;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.awt.Rectangle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.awt.event.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import java.beans.PropertyChangeEvent;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import java.beans.PropertyChangeListener;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import javax.swing.border.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import javax.swing.plaf.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
/**
20169
d7fa6d7586c9 8025085: [javadoc] some errors in javax/swing
yan
parents: 5506
diff changeset
    49
 * A default L&F implementation of MenuBarUI.  This implementation
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * is a "combined" view/controller.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * @author Georges Saab
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * @author David Karlton
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * @author Arnaud Weber
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
public class BasicMenuBarUI extends MenuBarUI  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    protected JMenuBar              menuBar = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    protected ContainerListener     containerListener;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    protected ChangeListener        changeListener;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    private Handler handler;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    public static ComponentUI createUI(JComponent x) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        return new BasicMenuBarUI();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    static void loadActionMap(LazyActionMap map) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        map.put(new Actions(Actions.TAKE_FOCUS));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    public void installUI(JComponent c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        menuBar = (JMenuBar) c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        installDefaults();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        installListeners();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        installKeyboardActions();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    protected void installDefaults() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        if (menuBar.getLayout() == null ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
            menuBar.getLayout() instanceof UIResource) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
            menuBar.setLayout(new DefaultMenuLayout(menuBar,BoxLayout.LINE_AXIS));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        LookAndFeel.installProperty(menuBar, "opaque", Boolean.TRUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        LookAndFeel.installBorder(menuBar,"MenuBar.border");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        LookAndFeel.installColorsAndFont(menuBar,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                                              "MenuBar.background",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                                              "MenuBar.foreground",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                                              "MenuBar.font");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    protected void installListeners() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        containerListener = createContainerListener();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        changeListener = createChangeListener();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        for (int i = 0; i < menuBar.getMenuCount(); i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            JMenu menu = menuBar.getMenu(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
            if (menu!=null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                menu.getModel().addChangeListener(changeListener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        menuBar.addContainerListener(containerListener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    protected void installKeyboardActions() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        InputMap inputMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        SwingUtilities.replaceUIInputMap(menuBar,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                           JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        LazyActionMap.installLazyActionMap(menuBar, BasicMenuBarUI.class,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                                           "MenuBar.actionMap");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    InputMap getInputMap(int condition) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            Object[] bindings = (Object[])DefaultLookup.get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
                                (menuBar, this, "MenuBar.windowBindings");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            if (bindings != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                return LookAndFeel.makeComponentInputMap(menuBar, bindings);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    public void uninstallUI(JComponent c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        uninstallDefaults();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        uninstallListeners();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        uninstallKeyboardActions();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        menuBar = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    protected void uninstallDefaults() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        if (menuBar!=null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            LookAndFeel.uninstallBorder(menuBar);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    protected void uninstallListeners() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        menuBar.removeContainerListener(containerListener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        for (int i = 0; i < menuBar.getMenuCount(); i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            JMenu menu = menuBar.getMenu(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            if (menu !=null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                menu.getModel().removeChangeListener(changeListener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        containerListener = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        changeListener = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        handler = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    protected void uninstallKeyboardActions() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        SwingUtilities.replaceUIInputMap(menuBar, JComponent.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                                       WHEN_IN_FOCUSED_WINDOW, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        SwingUtilities.replaceUIActionMap(menuBar, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    protected ContainerListener createContainerListener() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        return getHandler();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    protected ChangeListener createChangeListener() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        return getHandler();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    private Handler getHandler() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        if (handler == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
            handler = new Handler();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        return handler;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    public Dimension getMinimumSize(JComponent c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
    public Dimension getMaximumSize(JComponent c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    private class Handler implements ChangeListener, ContainerListener {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        // ChangeListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        public void stateChanged(ChangeEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
            int i,c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            for(i=0,c = menuBar.getMenuCount() ; i < c ; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                JMenu menu = menuBar.getMenu(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
                if(menu !=null && menu.isSelected()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                    menuBar.getSelectionModel().setSelectedIndex(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                    break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        // ContainerListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        public void componentAdded(ContainerEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            Component c = e.getChild();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
            if (c instanceof JMenu)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                ((JMenu)c).getModel().addChangeListener(changeListener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        public void componentRemoved(ContainerEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
            Component c = e.getChild();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
            if (c instanceof JMenu)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
                ((JMenu)c).getModel().removeChangeListener(changeListener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    private static class Actions extends UIAction {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        private static final String TAKE_FOCUS = "takeFocus";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        Actions(String key) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            super(key);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
        public void actionPerformed(ActionEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            // TAKE_FOCUS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
            JMenuBar menuBar = (JMenuBar)e.getSource();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
            MenuSelectionManager defaultManager = MenuSelectionManager.defaultManager();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
            MenuElement me[];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
            MenuElement subElements[];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
            JMenu menu = menuBar.getMenu(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
            if (menu!=null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
                    me = new MenuElement[3];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
                    me[0] = (MenuElement) menuBar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
                    me[1] = (MenuElement) menu;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
                    me[2] = (MenuElement) menu.getPopupMenu();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
                    defaultManager.setSelectedPath(me);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
}