|
|
@ -129,7 +129,7 @@ public class TextCellEditor extends AbstractCellEditor { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.oldValue = Utils.objectToString(value); |
|
|
|
this.oldValue = Utils.objectToString(value); |
|
|
|
this.textField.setText(oldValue); |
|
|
|
resetTextWithoutDocumentListener(oldValue); |
|
|
|
//peter:只读方式获得Style.
|
|
|
|
//peter:只读方式获得Style.
|
|
|
|
Style style = null; |
|
|
|
Style style = null; |
|
|
|
if(cellElement != null) { |
|
|
|
if(cellElement != null) { |
|
|
@ -176,4 +176,11 @@ public class TextCellEditor extends AbstractCellEditor { |
|
|
|
public void keyReleased(KeyEvent evt) { |
|
|
|
public void keyReleased(KeyEvent evt) { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void resetTextWithoutDocumentListener(String text) { |
|
|
|
|
|
|
|
this.textField.getDocument().removeDocumentListener(documentlistener); |
|
|
|
|
|
|
|
this.textField.setText(text); |
|
|
|
|
|
|
|
this.textField.getDocument().addDocumentListener(documentlistener); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |