Package javax.swing

Examples of javax.swing.JComponent.requestFocusInWindow()


                            break;
                       
                        if (    component.isShowing() &&
                            (component instanceof JTextField || component instanceof DcLongTextField) &&
                                field.isEnabled() && component.getParent() != null) {
                            component.requestFocusInWindow();
                            break;
                        }
                    }
                } catch (Exception e) {
                    logger.error(e, e);
View Full Code Here


    public boolean requestFocusInWindow() {
        // Put the focus on the right field
        String username = loginDetails.getUsername();
        JComponent field = (username != null && username.length() > 0) ? passwordField : usernameField;
        return field.requestFocusInWindow();
    }

}
View Full Code Here

    public void setVisible(boolean visible) {
        JComponent control = getControl();
        if (control != null) {
            super.setVisible(visible);
            control.requestFocusInWindow();
        }
    }

    public void setEnabled(boolean enabled) {
        setPageComplete(enabled);
View Full Code Here

  @Override
  public void ancestorAdded(AncestorEvent e)
  {
    JComponent component = e.getComponent();
    component.requestFocusInWindow();

    if (removeListener)
      component.removeAncestorListener( this );
  }
View Full Code Here

      if(reverse&&i==0)i=tabOrder.size()-1;
      else
        if(reverse)--i;
        else ++i;
    JComponent c=tabOrder.get(i);
    c.requestFocusInWindow();
    }
    private CTextArea createTextArea(final NamedCaller nc, final String humanField,int rows){
        final CTextArea field=
          new CTextArea(getStringViaReflection(humanField),rows,0);
        field.getDocument().addDocumentListener(new DocumentListener() {
View Full Code Here

            SwingUtilities.invokeLater(new Runnable() {

                @Override
                public void run() {
                    JComponent component = e.getComponent();
                    component.requestFocusInWindow();
                    component.removeAncestorListener(al);
                }
            });
        }
View Full Code Here

      EventQueue.invokeLater(new Runnable() {
        public void run () {
          JComponent focusComponent = component;
          if (focusComponent instanceof JSpinner)
            focusComponent = ((JSpinner.DefaultEditor)((JSpinner)component).getEditor()).getTextField();
          focusComponent.requestFocusInWindow();
        }
      });
      dialog.setVisible(true);
      return dialog.okPressed;
    }
View Full Code Here

    @Override
    public void requestFocus() {
        JComponent c = getComponentToFocus();
        if (c != null) {
            c.requestFocusInWindow();
        }
    }

    private JComponent getComponentToFocus() {
        return null;
View Full Code Here

    @Override
    public void requestFocus() {
        JComponent c = getComponentToFocus();
        if (c != null) {
            c.requestFocusInWindow();
        }
        if (!isDisplayed) {
            wsdlSelectorPanel.downloadExistingWsdls();
        }
        isDisplayed = true;
View Full Code Here

            });
            EventQueue.invokeLater(new Runnable() {

                @Override
                public void run() {
                    component.requestFocusInWindow();
                }
            });
        }
        repaint();
    }
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.