phenote.gui.field
Class RelationCompList

java.lang.Object
  extended by phenote.gui.field.CharFieldGui
      extended by phenote.gui.field.AbstractAutoCompList
          extended by phenote.gui.field.RelationCompList
All Implemented Interfaces:
ca.odell.glazedlists.event.ListEventListener<CharacterI>, java.util.EventListener

public class RelationCompList
extends AbstractAutoCompList

with now common superclass OBOObject this should be merged with TermCompList I think


Field Summary
 
Fields inherited from class phenote.gui.field.CharFieldGui
fieldHeight, inputSize, selectionModel
 
Constructor Summary
RelationCompList(CharField c)
           
 
Method Summary
 void addObserver(java.util.Observer o)
           
 org.obo.datamodel.OBOProperty getCurrentRelation()
          Throws exception if there isnt a current relation - for relation lists (post comp), if the user has typed something that isnt yet a rel - hasnt selected a rel
protected  java.lang.String getCurrentTermRelName()
          Return the name of the current term or relation - was gonna call this item name but that gets confused with "items" in combo box
 phenote.gui.field.RelationCompList.RelSelectObservable getObservable()
          Send out notification when a new relation has been selected, used by ComparisonGui avoids hardwiring modifying a particular datamodel like other CharFieldGuis(refactor) this could migrate to superclass if needed there
protected  void getSearchItems(java.lang.String input, SearchListener l, boolean thread)
          for now not threading and just sending results to listener - relations are short lists - dont need threaded optimization so boolean thread is ignored
protected  void setCharFieldValue(CharFieldValue value)
          char in table changed - adjust - not needed for rel(at least not yet) as post comp doesnt listen to table changes (does it? should it?), just term
protected  void setCurrentValidItem()
          The user has selected a rel from the list, validate and set current rel if doesnt validate throw ex
protected  void setModelToNull()
          no-op override
 void setNullOk(boolean nullOk)
          by default relation cant be set explicitly to null (but can be null at init) if nullOk then a user can null out relation (or select a comparison with a null relation)
 void setRel(org.obo.datamodel.OBOProperty rel)
          for relationships (post comp rel)
protected  void updateModel(boolean useTopHit)
           
 
Methods inherited from class phenote.gui.field.AbstractAutoCompList
canGetUIJList, clear, doMouseOver, getCharFieldValue, getCompList, getCompListSearcher, getFirstCompListObj, getJComboBox, getMinCompChars, getSearchParams, getSelectedObject, getTableCellEditor, getText, getUIJList, getUserInputGui, hasFocus, hasMoreThanOneOntology, hasOntologyChooser, isCompList, setForegroundColor, setMinCompChars, setTestMode, setText, setText, simulateKeyStroke, simulateLKeyStroke, updateModel
 
Methods inherited from class phenote.gui.field.CharFieldGui
addActionListener, alreadyInList, areCharactersEqualForCharField, checkPostCompButton, commitAndSelectNext, editModelEnabled, enableEditModel, fireActionPerformed, focusGained, focusLost, getCharField, getCharFieldEnum, getCompButton, getCurrentOboClass, getDisabledTextColor, getEditButton, getEditManager, getEnabledTextColor, getLabel, getListDelButton, getListGui, getListMessage, getOntologyChooser, getRetrieveButton, getSelectedChars, getSelectionManager, getTermComp, hasChangedMultipleValues, hasCompButton, hasEditButton, hasListGui, hasRetrieveButton, isInMultipleValueState, isTermCompList, listChanged, makeCharFieldGui, makePostCompTermList, makeRelationList, removeActionListener, setDoingInternalEdit, setEditManager, setEnabledState, setGuiForMultipleValues, setGuiForNoSelection, setHasChangedMultipleValues, setInMultipleValueState, setLabel, setListSelectionModel, setMultipleValuesConditions, setOboClass, setOntologyChooserFromTerm, setSelectionManager, setUpdateGuiOnly, setValueFromChars, shouldResetGuiForMultipleValues, updateGuiOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationCompList

RelationCompList(CharField c)
Method Detail

setCurrentValidItem

protected void setCurrentValidItem()
                            throws OboException
The user has selected a rel from the list, validate and set current rel if doesnt validate throw ex

Throws:
OboException

getCurrentTermRelName

protected java.lang.String getCurrentTermRelName()
Description copied from class: AbstractAutoCompList
Return the name of the current term or relation - was gonna call this item name but that gets confused with "items" in combo box

Specified by:
getCurrentTermRelName in class AbstractAutoCompList

setNullOk

public void setNullOk(boolean nullOk)
by default relation cant be set explicitly to null (but can be null at init) if nullOk then a user can null out relation (or select a comparison with a null relation)


setRel

public void setRel(org.obo.datamodel.OBOProperty rel)
for relationships (post comp rel)

Overrides:
setRel in class CharFieldGui

getCurrentRelation

public org.obo.datamodel.OBOProperty getCurrentRelation()
                                                 throws CharFieldGuiEx
Throws exception if there isnt a current relation - for relation lists (post comp), if the user has typed something that isnt yet a rel - hasnt selected a rel

Overrides:
getCurrentRelation in class CharFieldGui
Throws:
CharFieldGuiEx

updateModel

protected void updateModel(boolean useTopHit)
Specified by:
updateModel in class AbstractAutoCompList

setModelToNull

protected void setModelToNull()
no-op override

Specified by:
setModelToNull in class AbstractAutoCompList

setCharFieldValue

protected void setCharFieldValue(CharFieldValue value)
char in table changed - adjust - not needed for rel(at least not yet) as post comp doesnt listen to table changes (does it? should it?), just term

Specified by:
setCharFieldValue in class AbstractAutoCompList

getSearchItems

protected void getSearchItems(java.lang.String input,
                              SearchListener l,
                              boolean thread)
for now not threading and just sending results to listener - relations are short lists - dont need threaded optimization so boolean thread is ignored

Specified by:
getSearchItems in class AbstractAutoCompList

getObservable

public phenote.gui.field.RelationCompList.RelSelectObservable getObservable()
Send out notification when a new relation has been selected, used by ComparisonGui avoids hardwiring modifying a particular datamodel like other CharFieldGuis(refactor) this could migrate to superclass if needed there


addObserver

public void addObserver(java.util.Observer o)