Package java.awt.event

Examples of java.awt.event.FocusAdapter


        doInit();
    }

    protected void doInit()
    {
        addFocusListener(new FocusAdapter()
        {
            public void focusGained(FocusEvent ev)
            {
                if (isEditable())
                {
View Full Code Here


        doc.addDocumentListener(this);

        addMouseWheelListener(this);

        addFocusListener(
            new FocusAdapter() {
                public void focusGained(FocusEvent event) {
                    selectAll();
                }
            }
        );
View Full Code Here

    ggRate.addListener( this );
    p3.gridAdd( ggRate, 1, 1 );
   
    ggComment  = new JTextArea( 4, 24 );
    new LooseFocusAction( ggComment );
    ggComment.addFocusListener( new FocusAdapter() {
      public void focusLost( FocusEvent e )
      {
        if( doc != null ) {
          final AudioFileDescr  displayAFD  = doc.getDisplayDescr();
          final String      newText    = ggComment.getText();
View Full Code Here

        autoMaxCheck.setSelected((settings.getLastExtendedState() & JFrame.MAXIMIZED_BOTH) == JFrame.MAXIMIZED_BOTH);
        snooper.setSelected(settings.getSnooper());
        debugLauncherVerbose.setSelected(settings.getDebugLauncher());
        betaChannel.setSelected(settings.isBetaChannel());

        FocusAdapter settingsChangeListener = new FocusAdapter() {
            @Override
            public void focusLost (FocusEvent e) {
                saveSettingsInto(settings);
            }
        };
View Full Code Here

                    statusBar.setVisible(false);
                }
            }
        });

        hostRB.addFocusListener(new FocusAdapter() {

            @Override
            public void focusGained(FocusEvent e) {
                if (!hostRB.isSelected() && errorMessageVisible) {
                    statusBar.setVisible(false);
                }
            }
        });

        fileRB.addFocusListener(new FocusAdapter() {

            @Override
            public void focusGained(FocusEvent e) {
                if (!fileRB.isSelected() && errorMessageVisible) {
                    statusBar.setVisible(false);
View Full Code Here

                //---- classTestRadio ----
                classTestRadio.setText("Class:");
                contentPanel.add(classTestRadio, cc.xy(1, 7));

                //---- testClassField ----
                testClassField.addFocusListener(new FocusAdapter() {
                    @Override
                    public void focusGained(FocusEvent e) {
                        if (TEXT_FULLY_QUALIFIED_CLASS_NAME.equals(testClassField.getText())) {
                            testClassField.setForeground(Color.BLACK);
                            testClassField.setText("");
View Full Code Here

    m_chkSelectable.setVisible(m_bIsSelectable);
  }

  private void registerListeners() {
    m_txtInput.addKeyListener(new InputListener());
    m_txtInput.addFocusListener(new FocusAdapter() {

      @Override
      public void focusLost(FocusEvent a_objFEvent) {
        if (a_objFEvent == null) {
          return;
View Full Code Here

          e.consume();
        }
      }
    });

    focusText.addFocusListener(new FocusAdapter() {
      public void focusLost(FocusEvent e) {
        JTextField textField = (JTextField) e.getSource();
        String content = textField.getText();
        if (content.length() != 0) {
          try {
View Full Code Here

        yScaleModel.addChangeListener(scaleListener);
        zScaleModel.addChangeListener(scaleListener);

        // Listen for focus gained on the text field's of the spinners. Select
        // all of the text
        FocusListener focusListener = new FocusAdapter() {

            @Override
            public void focusGained(final FocusEvent e) {
                SwingUtilities.invokeLater(new Runnable() {
View Full Code Here

    private JTextField jTextField = null;

    public XJTextField(String defaultString) {
        jTextField = new JTextField(defaultString);
        jTextField.addFocusListener(new FocusAdapter() {
            public void focusGained(FocusEvent e) {
                jTextField.selectAll();
            }
        });
    }
View Full Code Here

TOP

Related Classes of java.awt.event.FocusAdapter

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.