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