Package java.awt.event

Examples of java.awt.event.WindowFocusListener


        if (commandPanelNeeded) this.add(commandPanel, BorderLayout.NORTH);
        this.add(mainPanel, BorderLayout.CENTER);
        if (statusPanelNeeded) this.add(statusPanel, BorderLayout.SOUTH);
       
        // フォーカスに応じてパネルの影を変える
        this.addWindowFocusListener(new WindowFocusListener(){
            public void windowGainedFocus(WindowEvent e) {
                setFocusedRecursive(getComponents(), true);
                repaint();
            }
View Full Code Here


        }
    }

    protected void processWindowFocusEvent(WindowEvent e) {
        for (Iterator<?> i = windowFocusListeners.getUserIterator(); i.hasNext();) {
            WindowFocusListener listener = (WindowFocusListener) i.next();
            switch (e.getID()) {
                case WindowEvent.WINDOW_GAINED_FOCUS:
                    listener.windowGainedFocus(e);
                    break;
                case WindowEvent.WINDOW_LOST_FOCUS:
                    listener.windowLostFocus(e);
                    break;
            }
        }
    }
View Full Code Here

        mframe.add(pan);
        mframe.setResizable(false);
        mframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mframe.pack();
        mframe.setVisible(true);
        mframe.addWindowFocusListener(new WindowFocusListener() {

            public void windowGainedFocus(WindowEvent e) {
            }

            public void windowLostFocus(WindowEvent e) {
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        closeDialog();
      }
    });

    addWindowFocusListener(new WindowFocusListener() {
      @Override
      public void windowLostFocus(WindowEvent e) {
        closeDialog();
      }
      @Override
View Full Code Here

            }
            @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

   
    private void createContents()
    {
        trayPopup = new TrayPopup(this);       
        trayPopup.setSize(350, 400);
        trayPopup.addWindowFocusListener(new WindowFocusListener()
        {
            @Override
            public void windowGainedFocus(WindowEvent event)
            {
                // No s'ha de fer res
View Full Code Here

        pane.selectInitialValue();

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

        JDialog dialog = pane.createDialog(null, title);
        dialog.addWindowFocusListener(new WindowFocusListener() {
          public void windowLostFocus (WindowEvent arg0) {
          }

          public void windowGainedFocus (WindowEvent arg0) {
            textField.requestFocusInWindow();
View Full Code Here

      consoleProblemsPane.add(errorTableScrollPane, XQConsoleToggle.ERRORSLIST);
      consoleProblemsPane.add(console, XQConsoleToggle.CONSOLE);
      consolePanel.add(consoleProblemsPane, BorderLayout.CENTER);
     
      // ensure completion gets hidden on editor losing focus
      addWindowFocusListener(new WindowFocusListener() {       
        public void windowLostFocus(WindowEvent e) {
         ta.hideSuggestion();
        }       
        public void windowGainedFocus(WindowEvent e) {
         
View Full Code Here

        };
        worker.execute();
      }
    });

    frmOutlineView.addWindowFocusListener(new WindowFocusListener() {
      public void windowLostFocus(WindowEvent e) {
        close();
      }

      public void windowGainedFocus(WindowEvent e) {
View Full Code Here

        pane.selectInitialValue();

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

        JDialog dialog = pane.createDialog(null, title);
        dialog.addWindowFocusListener(new WindowFocusListener() {
          public void windowLostFocus (WindowEvent arg0) {
          }

          public void windowGainedFocus (WindowEvent arg0) {
            textField.requestFocusInWindow();
View Full Code Here

TOP

Related Classes of java.awt.event.WindowFocusListener

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.