• 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/FormFieldDate.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/FormFieldDate.java (modified) (3 diffs)

Legend:

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

    r5355 r5526  
    2929import tree.DataFieldConstants; 
    3030import tree.IDataFieldObservable; 
     31import ui.components.AttributeTextEditor; 
    3132 
    3233public class FormFieldDate extends FormField { 
    … …  
    4041                String date = dataField.getAttribute(DataFieldConstants.VALUE); 
    4142                 
    42                 textInput = new JTextField(date); 
    43                 visibleAttributes.add(textInput); 
     43                textInput = new AttributeTextEditor(dataField,  
     44                                DataFieldConstants.VALUE); 
     45                 
    4446                textInput.addFocusListener(componentFocusListener); 
    45                 textInput.setName(DataFieldConstants.VALUE); 
    46                 textInput.addFocusListener(focusChangedListener); 
    47                 textInput.addKeyListener(textChangedListener); 
     47 
    4848                horizontalBox.add(textInput); 
    4949                 
    … …  
    9191        } 
    9292         
    93         // overridden by subclasses if they have other attributes to retrieve from dataField 
    94         public void dataFieldUpdated() { 
    95                 super.dataFieldUpdated(); 
    96                 textInput.setText(dataField.getAttribute(DataFieldConstants.VALUE)); 
    97         } 
    98          
    9993         
    10094        public void setHighlighted(boolean highlight) { 

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/