Examples of addWindowFocusListener()


Examples of java.awt.Window.addWindowFocusListener()

                : ((initialFocusComponent instanceof JComponent)
                        ? (JComponent)initialFocusComponent : null);
        if (focusOwner != null) {
            Window w = SwingUtilities.getWindowAncestor(focusOwner);
            if (w != null) {
                w.addWindowFocusListener(new WindowFocusGainedListener(focusOwner));
            }
        }
    }

    public boolean containsCustomComponents(final JOptionPane op) {
View Full Code Here

Examples of java.awt.Window.addWindowFocusListener()

        }
      });

      // If anything happens to the "parent" window, hide this popup
      Window parent = (Window)getParent();
      parent.addWindowFocusListener(this);
      parent.addWindowListener(this);
      parent.addComponentListener(this);

    }
View Full Code Here

Examples of java.awt.Window.addWindowFocusListener()

                pField.addHierarchyListener(new HierarchyListener() {
                    public void hierarchyChanged(HierarchyEvent e) {
                        final Component c = e.getComponent();
                        if (c.isShowing() && (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) {
                            Window toplevel = SwingUtilities.getWindowAncestor(c);
                            toplevel.addWindowFocusListener(new WindowAdapter() {
                                @Override
                                public void windowGainedFocus(WindowEvent e) {
                                    c.requestFocus();
                                }
                            });
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

    gb.setConstraints(strut, gc); panel.add(strut);
    JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE,
        JOptionPane.OK_CANCEL_OPTION);
    pane.setInitialValue(field);
    JDialog dlog = pane.createDialog(frame, Strings.get("circuitNameDialogTitle"));
    dlog.addWindowFocusListener(new WindowFocusListener() {
      public void windowGainedFocus(WindowEvent arg0) {
        field.requestFocus();
      }

      public void windowLostFocus(WindowEvent arg0) { }
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

                    final JDialog d = new JDialog(frame, popup.getName());
                    d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
                    d.setModal(false);
                    d.add(popup);
                    d.pack();
                    d.addWindowFocusListener(new WindowFocusListener() {
                        public void windowLostFocus(WindowEvent e) {
                        }
                       
                        public void windowGainedFocus(WindowEvent e) {
                            frame.addWindowFocusListener(new WindowFocusListener() {
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

        gb.setConstraints(strut, gc); panel.add(strut);
        JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE,
                JOptionPane.OK_CANCEL_OPTION);
        pane.setInitialValue(field);
        JDialog dlog = pane.createDialog(frame, getFromLocale("circuitNameDialogTitle"));
        dlog.addWindowFocusListener(new WindowFocusListener() {
            @Override
            public void windowGainedFocus(WindowEvent arg0) {
                field.requestFocus();
            }
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

        placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));

        JDialog dialog = pane.createDialog(null, title);
        pane.selectInitialValue();

        dialog.addWindowFocusListener(new WindowFocusListener() {

          @Override
          public void windowLostFocus (WindowEvent arg0) {
          }
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

        placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));

        JDialog dialog = pane.createDialog(null, title);
        pane.selectInitialValue();

        dialog.addWindowFocusListener(new WindowFocusListener() {

          @Override
          public void windowLostFocus (WindowEvent arg0) {
          }
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

        accessTokenForm = new OAuth2GetAccessTokenForm(profile);
        final JDialog accessTokenFormDialog = accessTokenForm.getComponent();

        disclosureButton.addMouseListener(new DisclosureButtonMouseListener(accessTokenFormDialog, disclosureButton));

        accessTokenFormDialog.addWindowFocusListener(new AccessTokenFormDialogWindowListener(accessTokenFormDialog));

        JButton advancedOptionsButton = oAuth2Form.addButtonWithoutLabelToTheRight(ADVANCED_OPTIONS_BUTTON_NAME, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new OAuth2AdvancedOptionsDialog(profile, refreshAccessTokenButton);
View Full Code Here

Examples of javax.swing.JDialog.addWindowFocusListener()

            }
            @Override
            public void keyTyped(final KeyEvent e) {
            }
        });
        popup.addWindowFocusListener(new WindowFocusListener() {
            @Override
            public void windowGainedFocus(final WindowEvent e) {
            }
            @Override
            public void windowLostFocus(final WindowEvent e) {
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.