Package java.awt.event

Examples of java.awt.event.FocusAdapter


    final JPanel panel = new JPanel();
    panel.setOpaque(false);

    final JTextFieldResizing jtf = new JTextFieldResizing(((VisualGraphOperatorWithPrefix) this.parent).prefix.add(fromString), this.parent.getFONT(), this);
    jtf.setEnabled(active);
    jtf.addFocusListener(new FocusAdapter() {
      public void focusLost(FocusEvent fe) {
        String content = jtf.getText();

        if(!content.equals("")) {
          try {
View Full Code Here


    final JPanel panel = new JPanel();
    panel.setOpaque(false);

    final JTextFieldResizing jtf = new JTextFieldResizing(((VisualGraphOperatorWithPrefix) this.parent).prefix.add(fromNamedString), this.parent.getFONT(), this);
    jtf.setEnabled(active);
    jtf.addFocusListener(new FocusAdapter() {
      public void focusLost(FocusEvent fe) {
        String content = jtf.getText();

        if(!content.equals("")) {
          try {
View Full Code Here

    this.orderByComboBoxesList.add(orderByCoBo); // add ComboBox to orderBy
    // ComboBoxes list

    final JTextFieldResizing jtf = new JTextFieldResizing(orderByString, this.parent.getFONT(), this);
    jtf.setEnabled(active);
    jtf.addFocusListener(new FocusAdapter() {
      public void focusLost(final FocusEvent fe) {
        String content = jtf.getText();

        if(!content.equals("")) {
          try {
View Full Code Here

    final JTextFieldResizing textField = new JTextFieldResizing("", this.parent.getFONT(), this);

    textField.setPreferredSize(new Dimension(50 , 20));
    textField.setMinimumSize(new Dimension(50 ,20));

    textField.addFocusListener((new FocusAdapter() {
      @Override
      public void focusGained(final FocusEvent fe){
        ConstantPanel.this.updateSize();
      }
View Full Code Here

        namespaceTF.setFocusable(false);
        prefixTF.setFocusable(false);
      }
   
     
    prefixTF.addFocusListener(new FocusAdapter() {
      private String oldValue = prefixString;

      public void focusLost(final FocusEvent fe) {

       
     
        }});
     
     
    namespaceTF.addFocusListener(new FocusAdapter() {
        private String oldValue = namespaceString;
       
       
        public void focusGained(final FocusEvent fe){
     
View Full Code Here

        prefixString, this.parent.getFONT(), this);

    final JTextFieldResizing namespaceTF = new JTextFieldResizing(
        namespaceString, this.parent.getFONT(), this);

    prefixTF.addFocusListener(new FocusAdapter() {
      private String oldValue = prefixString;

      public void focusLost(final FocusEvent fe) {
        final String newPrefix = prefixTF.getText();

        if (!namespaceTF.getText().equals("")
            && !newPrefix.equals(this.oldValue)) {
          final int choice = showPrefixNameChangedOptionDialog();

          if (choice == JOptionPane.YES_OPTION) { // change prefix
            // name and notify
            // operators...
            prefix.changeEntryName(this.oldValue, newPrefix, true);
            this.oldValue = newPrefix;
          } else if (choice == JOptionPane.NO_OPTION) { // change
            // prefix
            // name but
            // don't
            // notify
            // operators
            // ...
            prefix.changeEntryName(this.oldValue, newPrefix, false);
            this.oldValue = newPrefix;
          } else if (choice == JOptionPane.CANCEL_OPTION) { // don't
            // change
            // prefix
            // name
            // ...
            prefixTF.setText(this.oldValue);
            prefixTF.grabFocus();
          }
        }
      }
    });

    namespaceTF.addFocusListener(new FocusAdapter() {
      private String oldValue = namespaceString;

      public void focusLost(final FocusEvent fe) {
        String newNamespace = namespaceTF.getText();
View Full Code Here

            } );
    term.setNameComboBox(namedConstCombo);

    // TextField Name
    final JTextFieldResizing tfName = new HintTextFieldResizing("Name", "Name", this.parent.getFONT(), this);
    tfName.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setTfName(tfName);
        }});

    // TextField Value
    final JTextFieldResizing tfValue = new HintTextFieldResizing("Value", "Value", this.parent.getFONT(), this);

    tfValue.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setValue(tfValue.getText());
        }});
View Full Code Here

    } );
    term.setNameComboBox(namedConstCombo);

    // TextField Name
    final JTextFieldResizing tfName = new HintTextFieldResizing("Name", "Name", this.parent.getFONT(), this);
    tfName.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setTfName(tfName);
      }});

    // TextField Value
    final JTextFieldResizing tfValue = new HintTextFieldResizing(term.getValue(), "Value", this.parent.getFONT(), this);

    tfValue.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setValue(tfValue.getText());
      }});
View Full Code Here

            }
            } );
    term.setNameComboBox(namedConstCombo);
    // TextField Name
    final JTextFieldResizing tfName = new HintTextFieldResizing("Name", "Name", this.parent.getFONT(), this);
    tfName.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setTfName(tfName);
        }});

    // TextField Value
    final JTextFieldResizing tfValue = new HintTextFieldResizing("Value", "Value", this.parent.getFONT(), this);

    tfValue.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setValue(tfValue.getText());
        }});
View Full Code Here

    term.setNameComboBox(namedConstCombo);

    // TextField Name
    final JTextFieldResizing tfName = new HintTextFieldResizing("Name", "Name", this.parent.getFONT(), this);
    tfName.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setTfName(tfName);
        }});

    // TextField Value
    final JTextFieldResizing tfValue = new HintTextFieldResizing(term.getValue(), "Value", this.parent.getFONT(), this);

    tfValue.addFocusListener(new FocusAdapter() {
      @Override
      public void focusLost(final FocusEvent fe) {
        term.setValue(tfValue.getText());
        }});
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.