Package java.awt

Examples of java.awt.DefaultFocusTraversalPolicy


    public DesktopFrame(Dimension screenSize) {
        super("");
        enableEvents(AWTEvent.KEY_EVENT_MASK);
        setSize(screenSize);
        setFocusCycleRoot(true);
        setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        desktop = new JDesktopPane() {
            private static final long serialVersionUID = 1L;
            protected void paintComponent(Graphics g) {
                super.paintComponent(g);
                if (backgroundImage != null) {
View Full Code Here


    public static final String FOCUS_MANAGER_CLASS_PROPERTY = "FocusManagerClassName";

    private static boolean focusManagerEnabled = true;

    public static void disableSwingFocusManager() {
        KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        focusManagerEnabled = false;
    }
View Full Code Here

        container.add(panel1);
        container.add(panel2);
        frame.getContentPane().add(container);
        frame.pack();
        container.setFocusCycleRoot(true);
        container.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        panel1.setNextFocusableComponent(panel2);
        assertNull(container.getFocusTraversalPolicy().getComponentBefore(container, panel1));
        assertEquals(panel2, container.getFocusTraversalPolicy().getComponentAfter(container,
                panel1));
        assertEquals(panel1, container.getFocusTraversalPolicy().getComponentBefore(container,
View Full Code Here

    public static final String FOCUS_MANAGER_CLASS_PROPERTY = "FocusManagerClassName";

    private static boolean focusManagerEnabled = true;

    public static void disableSwingFocusManager() {
        KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        focusManagerEnabled = false;
    }
View Full Code Here

    private static boolean focusManagerEnabled = true;

    @Deprecated
    public static void disableSwingFocusManager() {
        KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        focusManagerEnabled = false;
    }
View Full Code Here

        container.add(panel1);
        container.add(panel2);
        frame.getContentPane().add(container);
        frame.pack();
        container.setFocusCycleRoot(true);
        container.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        panel1.setNextFocusableComponent(panel2);
        assertNull(container.getFocusTraversalPolicy().getComponentBefore(container, panel1));
        assertEquals(panel2, container.getFocusTraversalPolicy().getComponentAfter(container,
                panel1));
        assertEquals(panel1, container.getFocusTraversalPolicy().getComponentBefore(container,
View Full Code Here

TOP

Related Classes of java.awt.DefaultFocusTraversalPolicy

Copyright © 2018 www.massapicom. 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.