phenote.gui.field
Class CharFieldMatcherEditor

java.lang.Object
  extended by ca.odell.glazedlists.matchers.AbstractMatcherEditor<CharacterI>
      extended by phenote.gui.field.CharFieldMatcherEditor
All Implemented Interfaces:
ca.odell.glazedlists.matchers.MatcherEditor<CharacterI>

public class CharFieldMatcherEditor
extends ca.odell.glazedlists.matchers.AbstractMatcherEditor<CharacterI>

Provides a search panel for filtering character lists by charfield values.

Author:
Jim Balhoff

Nested Class Summary
protected static class CharFieldMatcherEditor.Mode
          Mode for filtering characters with ontology terms.
 
Nested classes/interfaces inherited from interface ca.odell.glazedlists.matchers.MatcherEditor
ca.odell.glazedlists.matchers.MatcherEditor.Event<E>, ca.odell.glazedlists.matchers.MatcherEditor.Listener<E>
 
Field Summary
protected static CharField ANY_FIELD
           
 
Fields inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor
currentMatcher
 
Constructor Summary
CharFieldMatcherEditor(java.util.List<CharField> charFields)
          Creates a new CharFieldMatcherEditor which will filter characters composed of the CharFields in charFields.
 
Method Summary
 javax.swing.JComponent getComponent()
          Returns the panel containing the filter interface.
 java.lang.String getFilter()
          Returns the current filter value.
 CharFieldMatcherEditor.Mode getFilterMode()
          Returns the filter mode used for matching ontology terms.
 void setCharFields(java.util.List<CharField> charFields)
          Sets the charfields which the user can choose from for filtering characters.
 void setEditedCharField(CharField charField)
          Sets the charfield used to filter the characters
 void setExactFilterMode()
          Sets the filter mode to EXACT.
 void setFilter(java.lang.String text, java.lang.Object source)
          Sets the current text value to filter on.
 void setFilterMode(CharFieldMatcherEditor.Mode mode)
          Sets the filter mode used for matching ontology terms.
 void setInheritFilterMode()
          Sets the filter mode to INHERIT.
 void updateEditedCharField()
          Sets the edited charfield according to the currently selected charfield in interface.
 void updateFilter()
          Sets the filter value according to the current input in interface.
 
Methods inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor
addMatcherEditorListener, fireChanged, fireChangedMatcher, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, removeMatcherEditorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY_FIELD

protected static CharField ANY_FIELD
Constructor Detail

CharFieldMatcherEditor

public CharFieldMatcherEditor(java.util.List<CharField> charFields)
Creates a new CharFieldMatcherEditor which will filter characters composed of the CharFields in charFields.

Method Detail

setCharFields

public void setCharFields(java.util.List<CharField> charFields)
Sets the charfields which the user can choose from for filtering characters.


setEditedCharField

public void setEditedCharField(CharField charField)
Sets the charfield used to filter the characters


updateEditedCharField

public void updateEditedCharField()
Sets the edited charfield according to the currently selected charfield in interface. Called by charfield popup button.


updateFilter

public void updateFilter()
Sets the filter value according to the current input in interface. Called by the free text or term filter input field.


getFilter

public java.lang.String getFilter()
Returns the current filter value. For an ontology term this will be an ID.


setFilter

public void setFilter(java.lang.String text,
                      java.lang.Object source)
Sets the current text value to filter on.

Parameters:
text - The filter text. For an ontology term this should be the ID.
source - The source of the filter input.

setExactFilterMode

public void setExactFilterMode()
Sets the filter mode to EXACT. This is called by the mode radio button.


setInheritFilterMode

public void setInheritFilterMode()
Sets the filter mode to INHERIT. This is called by the mode radio button.


setFilterMode

public void setFilterMode(CharFieldMatcherEditor.Mode mode)
Sets the filter mode used for matching ontology terms.


getFilterMode

public CharFieldMatcherEditor.Mode getFilterMode()
Returns the filter mode used for matching ontology terms.


getComponent

public javax.swing.JComponent getComponent()
Returns the panel containing the filter interface.