no need to rescan after changing description
This commit is contained in:
parent
61ab1ed1f3
commit
ae74f2a879
1 changed files with 30 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: ContikiMoteTypeDialog.java,v 1.22 2007/03/23 23:34:33 fros4943 Exp $
|
* $Id: ContikiMoteTypeDialog.java,v 1.23 2007/03/23 23:45:13 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.contikimote;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -517,7 +517,35 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
textField = new JTextField();
|
textField = new JTextField();
|
||||||
textField.setBackground(Color.GREEN);
|
textField.setBackground(Color.GREEN);
|
||||||
textField.setText("[enter description here]");
|
textField.setText("[enter description here]");
|
||||||
textField.getDocument().addDocumentListener(myEventHandler);
|
textField.getDocument().addDocumentListener(new DocumentListener() {
|
||||||
|
public void insertUpdate(DocumentEvent e) {
|
||||||
|
if (myDialog.isVisible())
|
||||||
|
javax.swing.SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
updateVisualFields();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeUpdate(DocumentEvent e) {
|
||||||
|
if (myDialog.isVisible())
|
||||||
|
javax.swing.SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
updateVisualFields();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void changedUpdate(DocumentEvent e) {
|
||||||
|
if (myDialog.isVisible())
|
||||||
|
javax.swing.SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
updateVisualFields();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
textDescription = textField;
|
textDescription = textField;
|
||||||
label.setLabelFor(textField);
|
label.setLabelFor(textField);
|
||||||
smallPane.add(label);
|
smallPane.add(label);
|
||||||
|
|
Loading…
Add table
Reference in a new issue