Java JPopupMenu isPopupMenuSeparator(Component component)

Here you can find the source of isPopupMenuSeparator(Component component)

Description

Tells whether or not the given component is a JPopupMenu.Separator .

License

Apache License

Parameter

Parameter Description
component the component that will be checked.

Return

true if the given component is a JPopupMenu.Separator , false otherwise.

Declaration

public static boolean isPopupMenuSeparator(Component component) 

Method Source Code


//package com.java2s;
/*/*from   w w w.  j a  v a 2  s .co m*/
 * Zed Attack Proxy (ZAP) and its related class files.
 * 
 * ZAP is an HTTP/HTTPS proxy for assessing web application security.
 * 
 * Copyright 2014 The ZAP Development Team
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.awt.Component;

import javax.swing.JPopupMenu;

public class Main {
    /**
     * Tells whether or not the given {@code component} is a {@code JPopupMenu.Separator}.
     * 
     * @param component the component that will be checked.
     * @return {@code true} if the given component is a {@code JPopupMenu.Separator}, {@code false} otherwise.
     * @see javax.swing.JPopupMenu.Separator
     * @see #isExtensionPopupMenu(Component)
     * @see #isExtensionPopupMenuItem(Component)
     */
    public static boolean isPopupMenuSeparator(Component component) {
        return (component instanceof JPopupMenu.Separator);
    }
}

Related

  1. getOnlyPopupMenu(Container owner)
  2. getPopupMenu()
  3. getPopupMenuShowPoint(JPopupMenu popup, int x, int y)
  4. insertSeparatorIfNeeded(JPopupMenu popupMenu, int position)
  5. installPopupMenuColorAndFonts(final JComponent contentPane)
  6. makePopupMenu(JPopupMenu menu, List menuItems)
  7. maybeShowPopup(MouseEvent e, JPopupMenu menu, JComponent parent)
  8. optimizeSeparators(JPopupMenu menu)
  9. positionPopup(Component component, JPopupMenu jpm, int xCoord, int yCoord)