Package javax.swing

Examples of javax.swing.JPopupMenu.applyComponentOrientation()


            menu.addSeparator();
            menu.add(appli.getCutAction());
            menu.add(appli.getCopyAction());
            menu.add(appli.getPasteAction());
        }
        menu.applyComponentOrientation(lang.getComponentOrientation());
        Point popupPoint = getPopupMenuPoint(e);
        menu.show(this, popupPoint.x, popupPoint.y);
    }

    /** Function called when the language is changed */
 
View Full Code Here


                menu.addSeparator();
            } else {
                menu.add(next);
            }
        }
        menu.applyComponentOrientation(getLanguage().getComponentOrientation());
        menu.show(invoker, x, y);
    }

    public void showDialog(Component content, Action[] buttonActions) {
      showDialog(content, buttonActions, "");
View Full Code Here

            return;
        }
        JPopupMenu menu = new JPopupMenu();
        menu.setUI(null);
        basicPopupUI.popupMenu = menu;
        menu.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
        basicPopupUI.installKeyboardActions();
        assertEquals(0, menu.getInputMap().keys().length);
        assertNotNull(menu.getInputMap().getParent());
        assertEquals(11, menu.getInputMap().getParent().keys().length);
        assertNull(menu.getInputMap().getParent().getParent());
View Full Code Here

        assertNotNull(menu.getInputMap().getParent());
        assertEquals(11, menu.getInputMap().getParent().keys().length);
        assertNull(menu.getInputMap().getParent().getParent());
        basicPopupUI.uninstallKeyboardActions();
        assertEquals(0, menu.getInputMap().allKeys().length);
        menu.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        basicPopupUI.installKeyboardActions();
        assertEquals(0, menu.getInputMap().keys().length);
        assertNotNull(menu.getInputMap().getParent());
        assertEquals(4, menu.getInputMap().getParent().keys().length);
        assertNotNull(menu.getInputMap().getParent().getParent());
View Full Code Here

        public void actionPerformed(ActionEvent e) {
          disableRule(span.rule.getId());
        }
      });
      popup.add(ignoreItem);
      popup.applyComponentOrientation(
        ComponentOrientation.getOrientation(Locale.getDefault()));
    }

    List<Rule> disabledRules = getDisabledRules();
    if (!disabledRules.isEmpty()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.