Java Swing Menu setMenuUp(boolean s, JComponent c)

Here you can find the source of setMenuUp(boolean s, JComponent c)

Description

set Menu Up

License

GNU General Public License

Declaration

public static void setMenuUp(boolean s, JComponent c) 

Method Source Code

//package com.java2s;
/*/*from  www.  j ava 2  s . c o  m*/
 * Copyright (C) 2015  University of Oregon
 *
 * You may distribute under the terms of either the GNU General Public
 * License or the Apache License, as specified in the LICENSE file.
 *
 * For more information, see the LICENSE file.
 */

import javax.swing.*;

public class Main {
    private static boolean menuIsUp = false;
    private static JComponent popupMenu = null;

    public static void setMenuUp(boolean s, JComponent c) {
        menuIsUp = s;
        if (s)
            popupMenu = c;
        else
            popupMenu = null;
    }

    public static void setMenuUp(boolean s) {
        menuIsUp = s;
        popupMenu = null;
    }
}

Related

  1. menuKeystroke(int virtualKey)
  2. removeMenuMnemonics(MenuElement[] elements)
  3. setFontsToMenu(MenuElement menuElement, Font font)
  4. setMenuFont(Object item, Font theFont)
  5. setMenuText(AbstractButton item, String text, boolean useMnemonic)
  6. setViewportMenu(JComponent c)
  7. showContextMenu()
  8. showRCMenu(JTextComponent text, MouseEvent e)
  9. toMenu(List actions)