- Timestamp:
- 07/04/08 11:49:37 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/OmeroEditor/src/ui/formFields/FormFieldText.java
r5355 r5526 29 29 import tree.DataFieldConstants; 30 30 import tree.IDataFieldObservable; 31 import ui.components.AttributeTextEditor; 31 32 32 33 public class FormFieldText extends FormField { … … 39 40 String value = dataField.getAttribute(DataFieldConstants.VALUE); 40 41 41 textInput = new JTextField(value);42 visibleAttributes.add(textInput);42 textInput = new AttributeTextEditor(dataField, 43 DataFieldConstants.VALUE); 43 44 textInput.addFocusListener(componentFocusListener); // to highlight field when textBox gets focus 44 textInput.setName(DataFieldConstants.VALUE); 45 textInput.addFocusListener(focusChangedListener); 46 textInput.addKeyListener(textChangedListener); 45 47 46 horizontalBox.add(textInput); 48 47 … … 88 87 return ((value != null) && (value.length() > 0)); 89 88 } 90 91 // overridden by subclasses if they have other attributes to retrieve from dataField92 public void dataFieldUpdated() {93 super.dataFieldUpdated();94 textInput.setText(dataField.getAttribute(DataFieldConstants.VALUE));95 }96 89 97 90
