Package java.awt.event

Examples of java.awt.event.FocusAdapter


            } );
    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);
        }});
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);
        }});
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);
        }});
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);
        }});
View Full Code Here

    // 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());
        FrameOperatorPanel.this.updateSize();
        }});
View Full Code Here

    term.getConstantCombo().setSelectedItem(selectedPref);

    // 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

            }
            } );
    // 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());
        FrameOperatorPanel.this.updateSize();
        }});
View Full Code Here

            } );

    // 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

    elementStatus.put("limit", (operator.getLimitValue() > -1));

    limitOffsetPanel.add(limitCB); // add limit CheckBox to row panel

    this.limitTF.addFocusListener(new FocusAdapter() {
      public void focusLost(FocusEvent fe) {
        String content = limitTF.getText();

        if(!content.equals("")) {
          try {
            operator.setLimitValue(content);
          }
          catch(ModificationException me) {
            int n = AbstractGuiComponent.showCorrectIgnoreOptionDialog(parent, me.getMessage());

            if(n == JOptionPane.YES_OPTION) {
              (new FocusThread(limitTF)).start();
            }
          }
        }
      }
    });

    if(operator.getLimitValue() > -1) { // if there is a limit value...
      this.limitTF.setText("" + operator.getLimitValue()); // set it
    }
    else { // if there is no limit value...
      this.limitTF.setText("-1"); // set "0" as default value
      this.limitTF.setEnabled(false); // disable the limit TextField
    }

    // set new preferred size of the limit TextField...
    this.limitTF.setPreferredSize(new Dimension(this.limitTF.getPreferredSize().width + 20, this.limitTF.getPreferredSize().height));

    // define listener for limit CheckBox...
    limitCB.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent ie) {
        // get new state...
        boolean selected = (ie.getStateChange() == ItemEvent.SELECTED);

        elementStatus.put("limit", selected);

        limitTF.setEnabled(selected); // enable or disable limit
        // TextField according to new
        // state

        // set limit value in selectOP...
        try {
          if(!selected) {
            operator.setLimitValue("-1");
          }
          else if(selected) {
            operator.setLimitValue(limitTF.getText());
          }
        }
        catch(ModificationException me) {
          int n = AbstractGuiComponent.showCorrectIgnoreOptionDialog(parent, me.getMessage());

          if(n == JOptionPane.YES_OPTION) {
            (new FocusThread(limitTF)).start();
          }
        }
      }
    });

    limitOffsetPanel.add(this.limitTF); // add limit TextField to row panel

    limitOffsetPanel.add(Box.createRigidArea(new Dimension(10, 3))); // spacer

    // create offset CheckBox...
    JCheckBoxOwnIcon offsetCB = new JCheckBoxOwnIcon("Offset", (operator.getOffsetValue() > -1), this.parent.getFONT());
    offsetCB.setOpaque(false);

    elementStatus.put("offset", (operator.getOffsetValue() > -1));

    limitOffsetPanel.add(offsetCB); // add offset CheckBox to row panel

    this.offsetTF.addFocusListener(new FocusAdapter() {
      public void focusLost(FocusEvent fe) {
        String content = offsetTF.getText();

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

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

    final JTextFieldResizing jtf = new JTextFieldResizing(projString, 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

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.