• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 5526 for branches/OmeroEditor/src/ui/formFields/FormFieldText.java

Show
Ignore:
Timestamp:
07/04/08 11:49:37 (5 months ago)
Author:
will
Message:

Text-changed and focus listeners for text fields, which update the dataField with new values, have been extracted into a new class, AttributeEditorListeners?, used by (eg) AttributeTextEditor? and AttributeTextAreaEditor?

Files:
1 modified

  • branches/OmeroEditor/src/ui/formFields/FormFieldText.java (modified) (3 diffs)

Legend:

Unmodified
Added
Removed
  • branches/OmeroEditor/src/ui/formFields/FormFieldText.java

    r5355 r5526  
    2929import tree.DataFieldConstants; 
    3030import tree.IDataFieldObservable; 
     31import ui.components.AttributeTextEditor; 
    3132 
    3233public class FormFieldText extends FormField { 
    … …  
    3940                String value = dataField.getAttribute(DataFieldConstants.VALUE); 
    4041                 
    41                 textInput = new JTextField(value); 
    42                 visibleAttributes.add(textInput); 
     42                textInput = new AttributeTextEditor(dataField,  
     43                                DataFieldConstants.VALUE); 
    4344                textInput.addFocusListener(componentFocusListener);             // to highlight field when textBox gets focus 
    44                 textInput.setName(DataFieldConstants.VALUE); 
    45                 textInput.addFocusListener(focusChangedListener); 
    46                 textInput.addKeyListener(textChangedListener); 
     45 
    4746                horizontalBox.add(textInput); 
    4847                 
    … …  
    8887                return ((value != null) && (value.length() > 0)); 
    8988        } 
    90          
    91         // overridden by subclasses if they have other attributes to retrieve from dataField 
    92         public void dataFieldUpdated() { 
    93                 super.dataFieldUpdated(); 
    94                 textInput.setText(dataField.getAttribute(DataFieldConstants.VALUE)); 
    95         } 
    9689 
    9790         

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/