Examples of commitEdit()


Examples of DisplayProject.DataField.commitEdit()

        try
        {
            // Force the textfield to commit it itself. Even though a focus lost event
            // will usually cause this, when used inside a jtable, this event is NOT
            // processed until after the cell editors getCellEditorValue is called.
            df.commitEdit();
        }
        catch (ParseException e)
        {
            // Unable to format so stop editing
            return false;
View Full Code Here

Examples of DisplayProject.DataField.commitEdit()

        try
        {
            // Force the textfield to commit it itself. Even though a focus lost event
            // will usually cause this, when used inside a jtable, this event is NOT
            // processed until after the cell editors getCellEditorValue is called.
            df.commitEdit();
        }
        catch (ParseException e)
        {
            // Unable to format so stop editing
            return false;
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

      if (controller != null) {
        // Add a listener to notify changes to controller
        textField.getDocument().addDocumentListener(new DocumentListener() {
            public void changedUpdate(DocumentEvent ev) {
              try {
                textField.commitEdit();
                controller.updateEditableProperty(editableProperty, textField.getValue());
              } catch (ParseException ex) {
                controller.updateEditableProperty(editableProperty, null);
              }
            }
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

        try {
          JFormattedTextField field = ((JFormattedTextField)component);
          field.requestFocus();
          field.setText(value);
          //launch an exception for invalid input
          field.commitEdit();
          //lose focus to format the value
          forceToLooseFocus(component);
          } catch (ParseException e) {
            // Invalid value in field
            //return false;
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

              // TF:08/06/2008:LIB-17:If this is a formatted field, we must use the getValue method,
              // otherwise we will potentially have formatting errors on masked fields.
              if (focusOwner instanceof JFormattedTextField) {
                JFormattedTextField formattedField = (JFormattedTextField)focusOwner;
                try {
                  formattedField.commitEdit();
                  //GK/DK: convert column index to a model index to set value
                  table.setValueAt(formattedField.getValue(), table.getEditingRow(), table.getEditingColumn());
                }
                catch (ParseException e) {
                  _log.error("Unhandled parse exception committing field edit: ", e);
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

              // TF:08/06/2008:LIB-17:If this is a formatted field, we must use the getValue method,
              // otherwise we will potentially have formatting errors on masked fields.
              if (focusOwner instanceof JFormattedTextField) {
                JFormattedTextField formattedField = (JFormattedTextField)focusOwner;
                try {
                  formattedField.commitEdit();
                  //GK/DK: convert column index to a model index to set value
                  table.setValueAt(formattedField.getValue(), table.getEditingRow(), table.getEditingColumn());
                }
                catch (ParseException e) {
                  _log.error("Unhandled parse exception committing field edit: ", e);
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

              // TF:08/06/2008:LIB-17:If this is a formatted field, we must use the getValue method,
              // otherwise we will potentially have formatting errors on masked fields.
              if (focusOwner instanceof JFormattedTextField) {
                JFormattedTextField formattedField = (JFormattedTextField)focusOwner;
                try {
                  formattedField.commitEdit();
                  //GK/DK: convert column index to a model index to set value
                  table.setValueAt(formattedField.getValue(), table.getEditingRow(), table.getEditingColumn());
                }
                catch (ParseException e) {
                  _log.error("Unhandled parse exception committing field edit: ", e);
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

    //of this method so that everything gets cleaned up.
    public boolean stopCellEditing() {
        JFormattedTextField ftf = (JFormattedTextField)getComponent();
        if (ftf.isEditValid()) {
            try {
                ftf.commitEdit();
            } catch (java.text.ParseException exc) { }
     
        } else { //text is invalid
            if (!userSaysRevert()) { //user wants to edit
          return false; //don't let the editor go away
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

  // of this method so that everything gets cleaned up.
  public boolean stopCellEditing() {
    JFormattedTextField ftf = (JFormattedTextField) getComponent();
    if (ftf.isEditValid()) {
      try {
        ftf.commitEdit();
      } catch (java.text.ParseException exc) {
      }

    } else { // text is invalid
      if (!userSaysRevert()) { // user wants to edit
View Full Code Here

Examples of javax.swing.JFormattedTextField.commitEdit()

  // of this method so that everything gets cleaned up.
  public boolean stopCellEditing() {
    JFormattedTextField ftf = (JFormattedTextField) getComponent();
    if (ftf.isEditValid()) {
      try {
        ftf.commitEdit();
      } catch (java.text.ParseException exc) {
      }

    } else { // text is invalid
      if (!userSaysRevert()) { // user wants to edit
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.