[snow-cvs] r76 - trunk/src/java/snow/swing
Alessio Stalla
astalla at common-lisp.net
Tue Apr 20 18:46:48 UTC 2010
Author: astalla
Date: Tue Apr 20 14:46:46 2010
New Revision: 76
Log:
Merged Alan Ruttenberg's modifications to ConsoleDocument to make it compile on 1.5
Modified:
trunk/src/java/snow/swing/ConsoleDocument.java
Modified: trunk/src/java/snow/swing/ConsoleDocument.java
==============================================================================
--- trunk/src/java/snow/swing/ConsoleDocument.java (original)
+++ trunk/src/java/snow/swing/ConsoleDocument.java Tue Apr 20 14:46:46 2010
@@ -96,7 +96,7 @@
try {
final int insertOffs;
synchronized(reader) {
- if(inputBuffer.toString().trim().isEmpty()) {
+ if(inputBuffer.toString().trim().length() == 0) {
int length = inputBuffer.length();
inputBuffer.delete(0, length);
}
@@ -210,11 +210,8 @@
public void setupTextComponent(final JTextComponent txt) {
addDocumentListener(new DocumentListener() {
- @Override
- public void changedUpdate(DocumentEvent e) {
- }
+ public void changedUpdate(DocumentEvent e) {}
- @Override
public void insertUpdate(DocumentEvent e) {
int len = getLength();
if(len - e.getLength() == e.getOffset()) { //The insert was at the end of the document
@@ -222,9 +219,7 @@
}
}
- @Override
- public void removeUpdate(DocumentEvent e) {
- }
+ public void removeUpdate(DocumentEvent e) {}
});
txt.setCaretPosition(getLength());
}
More information about the snow-cvs
mailing list