|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jcreme.swing.DefaultCompletionModel
This is a default implementation of the CompletionModel interface. When no completionListElementFormat is provided it uses the toString method to convert objects into Strings for completion. The default pattern has an empty prefix ("") and an open suffix ("%").
| Field Summary |
| Fields inherited from interface org.jcreme.swing.CompletionModel |
COMPLETION_LIST_ELEMENT_FORMAT_PROPERTY |
| Constructor Summary | |
DefaultCompletionModel(java.util.Collection c)
Creates a new DefaultCompletionModel. |
|
DefaultCompletionModel(java.lang.Object[] array)
Creates a new DefaultCompletionModel. |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
This method ensures that the implementations of this interface provide bean services. |
java.text.Format |
getCompletionListElementFormat()
This method gives access to the Format implementation that enables to perform the completion on objects. |
java.lang.String |
getCompletionPrefix()
Gives access to the current prefix of the completion pattern. |
java.util.Collection |
getCompletions(java.lang.String seed)
Enables to access a list of possible completions for a given String. |
java.lang.String |
getCompletionSuffix()
Gives access to the current suffix of the completion pattern. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
This method ensures that the implementations of this interface provide bean services. |
void |
setCompletionList(java.util.Collection c)
This method enables to set the collection of values from which to look for a completion. |
void |
setCompletionListElementFormat(java.text.Format f)
This method enables to change the Format implementation that will be used to transform non String objects into Strings to perform the completion. |
void |
setCompletionPrefix(java.lang.String prefix)
Enables to change the pattern that will be matched in front of the text to complete. |
void |
setCompletionSuffix(java.lang.String suffix)
Enables to change the pattern that will be matched in after the text to complete. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultCompletionModel(java.util.Collection c)
c - the completionList to use.public DefaultCompletionModel(java.lang.Object[] array)
array - the completionList to use.| Method Detail |
public java.lang.String getCompletionPrefix()
CompletionModel
getCompletionPrefix in interface CompletionModelCompletionModel.getCompletionPrefix()public java.util.Collection getCompletions(java.lang.String seed)
CompletionModel
getCompletions in interface CompletionModelseed - the String to complete in the completionList.
CompletionModel.getCompletions(java.lang.String)public java.lang.String getCompletionSuffix()
CompletionModel
getCompletionSuffix in interface CompletionModelCompletionModel.getCompletionSuffix()public void setCompletionListElementFormat(java.text.Format f)
CompletionModel
setCompletionListElementFormat in interface CompletionModelf - a Format implementation.CompletionModel.setCompletionListElementFormat(java.text.Format)public void setCompletionList(java.util.Collection c)
CompletionModel
setCompletionList in interface CompletionModelc - the collection from which a completion has to be found.CompletionModel.setCompletionList(java.util.Collection)public void setCompletionPrefix(java.lang.String prefix)
CompletionModel
setCompletionPrefix in interface CompletionModelprefix - a pattern using % and ? as wildcards in the usual SQL manner.CompletionModel.setCompletionPrefix(java.lang.String)public void setCompletionSuffix(java.lang.String suffix)
CompletionModel
setCompletionSuffix in interface CompletionModelsuffix - a pattern using % and ? as wildcards in the usual SQL manner.CompletionModel.setCompletionSuffix(java.lang.String)public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
CompletionModel
addPropertyChangeListener in interface CompletionModell - a listener.CompletionModel.addPropertyChangeListener(java.beans.PropertyChangeListener)public java.text.Format getCompletionListElementFormat()
CompletionModel
getCompletionListElementFormat in interface CompletionModelCompletionModel.getCompletionListElementFormat()public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
CompletionModel
removePropertyChangeListener in interface CompletionModell - a listener.CompletionModel.removePropertyChangeListener(java.beans.PropertyChangeListener)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||