Package javax.swing

Examples of javax.swing.LayoutFocusTraversalPolicy$LayoutComparator


  /**
   * Sets a focus traversal policy that ignores invisible split pane components.
   */
  private void updateFocusTraversalPolicy() {
    setFocusTraversalPolicy(new LayoutFocusTraversalPolicy() {
        @Override
        protected boolean accept(Component component) {
          if (super.accept(component)) {
            for (JSplitPane splitPane;
                 (splitPane = (JSplitPane)SwingUtilities.getAncestorOfClass(JSplitPane.class, component)) != null;
View Full Code Here


        0, 2, 2, 1, 1, 1, GridBagConstraints.CENTER,
        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    SwingTools.installFocusBorder(this.catalogFurnitureList);
   
    setFocusTraversalPolicyProvider(true);
    setFocusTraversalPolicy(new LayoutFocusTraversalPolicy() {
        @Override
        public Component getDefaultComponent(Container aContainer) {
            EventQueue.invokeLater(new Runnable() {
              public void run() {
                // Return furniture list only at the first request 
View Full Code Here

                // org.eclipse.ui.internal.handlers.WidgetMethodHandler).
                // TODO: can this be queried from the L&F?
                KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
                if (kfm.getDefaultFocusTraversalPolicy().getClass().getName()
                    == "javax.swing.LegacyGlueFocusTraversalPolicy")
                    kfm.setDefaultFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
                if (frame.getFocusTraversalPolicy() != null
                    && frame.getFocusTraversalPolicy().getClass().getName()
                       == "javax.swing.LegacyGlueFocusTraversalPolicy")
                    frame.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());

                rootPaneContainer = addRootPaneContainer(frame);
                initPopupMenuSupport(rootPaneContainer.getRootPane());

                // The color of the frame is visible during redraws. Use the
View Full Code Here

        JApplet applet = new ToplevelPanel();
        
        if (Platform.isWin32()) {
            // Avoid stack overflows by ensuring correct focus traversal policy
            // (see comments in scheduleComponentCreation() for details)
            applet.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
        }

        frame.add(applet);
        return applet;
    }
View Full Code Here

      this.add(part2, gbc);
     
      this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
      this.setBackground(Color.WHITE);
     
          this.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
          this.setFocusTraversalPolicyProvider(true);
    }
View Full Code Here

    public GridFieldCellEditor(GridField source) {
        super();
        this.grid = source;
       
        // CraigM:15/10/2008 - A GridField used inside an ArrayField needs to know how to traverse the focus
        this.grid.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
        this.grid.setFocusTraversalPolicyProvider(true);
    }
View Full Code Here

      this.add(part2, gbc);
     
      this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
      this.setBackground(Color.WHITE);
     
          this.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
          this.setFocusTraversalPolicyProvider(true);
    }
View Full Code Here

    public GridFieldCellEditor(GridField source) {
        super();
        this.grid = source;
       
        // CraigM:15/10/2008 - A GridField used inside an ArrayField needs to know how to traverse the focus
        this.grid.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
        this.grid.setFocusTraversalPolicyProvider(true);
    }
View Full Code Here

    public GridFieldCellEditor(GridField source) {
        super();
        this.grid = source;
       
        // CraigM:15/10/2008 - A GridField used inside an ArrayField needs to know how to traverse the focus
        this.grid.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
        this.grid.setFocusTraversalPolicyProvider(true);
    }
View Full Code Here

      this.add(part2, gbc);
     
      this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
      this.setBackground(Color.WHITE);
     
          this.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
          this.setFocusTraversalPolicyProvider(true);
    }
View Full Code Here

TOP

Related Classes of javax.swing.LayoutFocusTraversalPolicy$LayoutComparator

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.