Package java.awt

Examples of java.awt.Component.requestFocusInWindow()


        }
      }
      this.controller.modifyFurniture();
    }
    if (focusOwner != null) {
      focusOwner.requestFocusInWindow();
    }
  }

  /**
   * Preview component for model icon.
View Full Code Here


          // Java 3D 1.5 bug : let's request focus in window for the most recent focus owner when
          // this frame is reactivated
          if (this.mostRecentFocusOwner != null) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                  mostRecentFocusOwner.requestFocusInWindow();
                }
              });
          }
        }
      };
View Full Code Here

                    FocusTraversalPolicy focusTraversalPolicy = getFocusTraversalPolicy();             
                    Component focusedComponent = focusTraversalPolicy.getComponentAfter(HomePane.this, focusOwner);
                    if (focusedComponent == null) {
                      focusedComponent = focusTraversalPolicy.getComponentBefore(HomePane.this, focusOwner);
                    }               
                    focusedComponent.requestFocusInWindow();             
                  }
                  controller.setVisualProperty(dividerLocationProperty, ev.getNewValue());
                }
              });
          }
View Full Code Here

            if (toComponent != null && toComponent instanceof JTextComponent) {
              String toValue = ((JTextComponent) toComponent).getText();
              if (toValue == null || toValue.length() == 0) {
                done = true;
                toComponent.requestFocusInWindow();
              }
            }

            if (! done && subjectComponent != null && subjectComponent instanceof JTextComponent) {
              String subjectValue = ((JTextComponent) subjectComponent).getText();
View Full Code Here

            @Override public void mousePressed (MouseEvent e) {
                for (JavaNativeOverlay overlay : _overlays) {
                    final Component comp = overlay.component;
                    if (comp.contains(e.getX() - comp.getX(), e.getY() - comp.getY())) {
                        EventQueue.invokeLater(new Runnable() {
                            @Override public void run () { comp.requestFocusInWindow(); }
                        });
                        log.debug("Dispatched focus from misdirected mouse press", "event", e);
                        return;
                    }
                }
View Full Code Here

                if (_focus.get() != null && _kfc != null &&
                        !_kfc.unfocusForLocation(new Point(e.getX(), e.getY()))) {
                    final Component comp =
                        ((JavaNativeTextField)_focus.get().exposeNativeField()).component;
                    EventQueue.invokeLater(new Runnable() {
                        @Override public void run () { comp.requestFocusInWindow(); }
                    });
                }
            }
        });
View Full Code Here

                    Component tab = editorTabbedPane.getSelectedComponent();
                    if (tab != null && tab instanceof JScrollPane) {
                        JScrollPane scrollPane = (JScrollPane) tab;
                        tab = scrollPane.getViewport().getView();
                        if (tab != null) {
                            tab.requestFocusInWindow();
                        }
                    }
                }
                else
                {
View Full Code Here

                    Component tab = tabbedPane.getSelectedComponent();
                    if (tab != null && tab instanceof JScrollPane) {
                        JScrollPane scrollPane = (JScrollPane) tab;
                        tab = scrollPane.getViewport().getView();
                        if (tab != null) {
                            tab.requestFocusInWindow();
                        }
                    }
                }
                if (!isDocTabSelected()) {
                    return;
View Full Code Here

              public void run()
              {
                propertiesTable.editCellAt( row, 1 );
                Component editorComponent = propertiesTable.getEditorComponent();
                if( editorComponent != null )
                  editorComponent.requestFocusInWindow();
              }
            } );
          }
        } );
View Full Code Here

            if( isGroupSelectionFollowFocus() && group != null && group.getSelection() != null
                && !nextButton.isSelected() )
            {
              nextButton.setSelected( true );
            }
            next.requestFocusInWindow();
          }
        }
      }
    }
  }
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.