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

Legend:

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

    r5355 r5526  
    2929import tree.DataFieldConstants; 
    3030import tree.IDataFieldObservable; 
     31import ui.components.AttributeTextAreaEditor; 
    3132 
    3233public class FormFieldMemo extends FormField { 
    … …  
    3940                super(dataFieldObs); 
    4041                 
    41                 /* 
    42                 inputEditor = new AttributeMemoFormatEditor(dataField,  
    43                                 "", DataFieldConstants.VALUE, dataField.getAttribute(DataFieldConstants.VALUE)); 
    44                 inputEditor.getTextArea().addFocusListener(componentFocusListener); 
    45                 horizontalBox.add(inputEditor); 
    46                 */ 
     42                textInput = new AttributeTextAreaEditor(dataField,  
     43                                DataFieldConstants.VALUE); 
    4744                 
     45                textInput.addMouseListener(new FormPanelMouseListener()); 
    4846                 
    49                 String value = dataField.getAttribute(DataFieldConstants.VALUE); 
    50                  
    51                 textInput = new JTextArea(value); 
    52                 visibleAttributes.add(textInput); 
    53                 textInput.setRows(2); 
    54                 textInput.setLineWrap(true); 
    55                 textInput.setWrapStyleWord(true); 
    56                 //JScrollPane textScroller = new JScrollPane(textInput); 
    57                 Border bevelBorder = BorderFactory.createLoweredBevelBorder(); 
    58                 Border emptyBorder = BorderFactory.createEmptyBorder(3, 3, 3, 3); 
    59                 Border compoundBorder = BorderFactory.createCompoundBorder(bevelBorder, emptyBorder); 
    60                 textInput.setBorder(compoundBorder); 
    61                 //textInput.setMaximumSize(new Dimension(500, 500)); 
    62                 textInput.addMouseListener(new FormPanelMouseListener()); 
    63                 textInput.setName(DataFieldConstants.VALUE); 
    64                 textInput.addFocusListener(focusChangedListener); 
    65                 textInput.addKeyListener(textChangedListener); 
    6647                horizontalBox.add(textInput); 
    6748                 
    … …  
    8465        } 
    8566         
    86          
    87         // overridden by subclasses if they have other attributes to retrieve from dataField 
    88         public void dataFieldUpdated() { 
    89                 super.dataFieldUpdated(); 
    90                 textInput.setText(dataField.getAttribute(DataFieldConstants.VALUE)); 
    91         } 
    9267         
    9368        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/