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

Legend:

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

    r5344 r5526  
    3434import tree.IDataFieldObservable; 
    3535import ui.XMLView; 
     36import ui.components.AttributeTextEditor; 
    3637import ui.components.AttributesDialog; 
    3738import util.ImageFactory; 
    … …  
    5758                } 
    5859                 
    59                 textInput = new JTextField(); 
     60                textInput = new AttributeTextEditor(dataField,  
     61                                DataFieldConstants.TEXT_NODE_VALUE); 
    6062                textInput.addMouseListener(new FormPanelMouseListener()); 
    61                 textInput.setName(DataFieldConstants.TEXT_NODE_VALUE); 
    62                 textInput.addFocusListener(focusChangedListener); 
    63                 textInput.addKeyListener(textChangedListener); 
     63                 
     64                textInput.setVisible(false);    // not visible unless text node 
     65                 
     66                horizontalBox.add(textInput); 
     67                 
    6468                checkForTextNodeValue(); 
    6569                 
    … …  
    6872        public void checkForTextNodeValue() { 
    6973                String textNodeValue = dataField.getAttribute(DataFieldConstants.TEXT_NODE_VALUE); 
    70                 //System.out.println("FormFieldCustom constructor: textNodeValue = " + textNodeValue); 
    71                 if (textNodeValue != null) { 
    72                         textInput.setText(textNodeValue); 
    73                         horizontalBox.add(textInput); 
    74                 } 
     74                 
     75                textInput.setVisible(textNodeValue != null); 
     76                 
    7577        } 
    7678         

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/