|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphenote.gui.field.CharFieldGui
phenote.gui.field.AbstractAutoCompList
public abstract class AbstractAutoCompList
has a jcombobox that does auto completion - i had to do some tricks(hacks) to get it working with mouse over which doesnt come naturally to jcombobox
| Field Summary |
|---|
| Fields inherited from class phenote.gui.field.CharFieldGui |
|---|
fieldHeight, inputSize, selectionModel |
| Constructor Summary | |
|---|---|
protected |
AbstractAutoCompList(CharField cf)
|
protected |
AbstractAutoCompList(CharField cf,
int minCompChars)
|
| Method Summary | |
|---|---|
protected boolean |
canGetUIJList()
|
(package private) void |
clear()
|
void |
doMouseOver(int itemNumber)
|
protected AbstractAutoCompList |
getCompList()
for testing and internal use - overridden |
CompListSearcher |
getCompListSearcher()
|
protected abstract 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 |
protected java.lang.Object |
getFirstCompListObj()
Get first object in comp list, CompTerm for TermCompList, RelationTerm for RelCompList (silly - merge!) - throws ex if list is empty |
javax.swing.JComboBox |
getJComboBox()
|
int |
getMinCompChars()
|
protected abstract void |
getSearchItems(java.lang.String input,
SearchListener l,
boolean thread)
|
protected SearchParamsI |
getSearchParams()
|
protected java.lang.Object |
getSelectedObject()
this is funny for TermCompList this is a CompletionTerm, for RelationCompList this is a RelationTerm - with new OboObject interface these should be merged! this returns a String if the user has not selected a term in the list yet the String is the current User input - rename this! peculiar that the method called is getSelectedItem as the String was never actually selected so with KeyListener on JTextField when get key selectedObj is a null state so returns null if so - can get text straight from TextField in this case if need it |
java.lang.String |
getText()
Return text in text field |
protected javax.swing.JList |
getUIJList()
|
protected javax.swing.JComponent |
getUserInputGui()
Get the component used for user input - text field or jCombo |
protected boolean |
hasFocus()
|
protected boolean |
hasMoreThanOneOntology()
|
protected boolean |
hasOntologyChooser()
|
protected boolean |
isCompList()
|
protected abstract void |
setCharFieldValue(CharFieldValue value)
|
protected void |
setForegroundColor(java.awt.Color color)
|
void |
setMinCompChars(int minChars)
no op - override in term completion gui |
protected abstract void |
setModelToNull()
|
void |
setTestMode(boolean inTestMode)
This is cheesy but theres a hanging bug with showPopup that only happens in test mode - dont know why but doesnt actually matter, so setting flag to turn off showpopup in test - if hangs in nontest will investigate |
void |
setText(java.lang.String text)
Set text in editable text field of j combo (eg from table select) |
void |
setText(java.lang.String text,
boolean settingTextExternally)
text from selecting table doesnt do completion, TestPhenote does |
void |
simulateKeyStroke(int keyCode,
char c)
|
void |
simulateLKeyStroke()
|
protected void |
updateModel()
updateModel only if have selected from list |
protected abstract void |
updateModel(boolean useTopHit)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractAutoCompList(CharField cf)
protected AbstractAutoCompList(CharField cf,
int minCompChars)
| Method Detail |
|---|
public void setMinCompChars(int minChars)
CharFieldGui
setMinCompChars in class CharFieldGuipublic int getMinCompChars()
getMinCompChars in class CharFieldGuiprotected javax.swing.JComponent getUserInputGui()
CharFieldGui
getUserInputGui in class CharFieldGuipublic javax.swing.JComboBox getJComboBox()
protected boolean isCompList()
isCompList in class CharFieldGuiprotected SearchParamsI getSearchParams()
public CompListSearcher getCompListSearcher()
protected AbstractAutoCompList getCompList()
CharFieldGui
getCompList in class CharFieldGuiprotected boolean hasOntologyChooser()
hasOntologyChooser in class CharFieldGuiprotected boolean hasMoreThanOneOntology()
protected abstract void setCharFieldValue(CharFieldValue value)
setCharFieldValue in class CharFieldGuiprotected boolean hasFocus()
hasFocus in class CharFieldGuiprotected void setForegroundColor(java.awt.Color color)
setForegroundColor in class CharFieldGuipublic void setText(java.lang.String text)
setText in class CharFieldGui
public void setText(java.lang.String text,
boolean settingTextExternally)
public java.lang.String getText()
getText in class CharFieldGuivoid clear()
protected java.lang.Object getSelectedObject()
throws OboException
OboException
protected java.lang.Object getFirstCompListObj()
throws OboException
OboExceptionprotected abstract java.lang.String getCurrentTermRelName()
protected abstract void setModelToNull()
public void setTestMode(boolean inTestMode)
protected abstract void getSearchItems(java.lang.String input,
SearchListener l,
boolean thread)
protected boolean canGetUIJList()
protected javax.swing.JList getUIJList()
public void doMouseOver(int itemNumber)
protected void updateModel()
updateModel in class CharFieldGuiprotected abstract void updateModel(boolean useTopHit)
public void simulateLKeyStroke()
public void simulateKeyStroke(int keyCode,
char c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||