equal
deleted
inserted
replaced
97 } |
97 } |
98 |
98 |
99 @Override |
99 @Override |
100 public void actionPerformed(final ActionEvent e) { |
100 public void actionPerformed(final ActionEvent e) { |
101 postEvent(new ActionEvent(getTarget(), ActionEvent.ACTION_PERFORMED, |
101 postEvent(new ActionEvent(getTarget(), ActionEvent.ACTION_PERFORMED, |
102 getText(), e.getWhen(), e.getModifiers())); |
102 getText(), e.getWhen(), e.getModifiers())); |
103 } |
103 } |
104 |
104 |
105 /** |
105 /** |
106 * Restoring native behavior. We should sets the selection range to zero, |
106 * Restoring native behavior. We should sets the selection range to zero, |
107 * when component lost its focus. |
107 * when component lost its focus. |
124 JTextAreaDelegate() { |
124 JTextAreaDelegate() { |
125 super(); |
125 super(); |
126 } |
126 } |
127 |
127 |
128 @Override |
128 @Override |
|
129 public void replaceSelection(String content) { |
|
130 getDocument().removeDocumentListener(LWTextFieldPeer.this); |
|
131 super.replaceSelection(content); |
|
132 // post only one text event in this case |
|
133 postTextEvent(); |
|
134 getDocument().addDocumentListener(LWTextFieldPeer.this); |
|
135 } |
|
136 |
|
137 @Override |
129 public boolean hasFocus() { |
138 public boolean hasFocus() { |
130 return getTarget().hasFocus(); |
139 return getTarget().hasFocus(); |
131 } |
140 } |
132 |
141 |
133 @Override |
142 @Override |