|
org.openidex.util/3 3.11 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.ServiceType
org.openidex.search.SearchType
public abstract class SearchType
Search type is service which provides search functionality on set of nodes. It has to provide GUI presentation so user can have the possibility to set/modify criteria. It performs search according to that.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openide.ServiceType |
---|
ServiceType.Handle, ServiceType.Registry |
Field Summary | |
---|---|
protected static String |
PROP_OBJECT_CHANGED
Name of object changed property. |
static String |
PROP_VALID
Name of valid property. |
Fields inherited from class org.openide.ServiceType |
---|
PROP_NAME |
Constructor Summary | |
---|---|
SearchType()
|
Method Summary | |
---|---|
protected boolean |
acceptSearchObject(Object searchObject)
Accepts search object to the search. |
protected Node[] |
acceptSearchRootNodes(Node[] roots)
Accepts search root nodes. |
Object |
clone()
Clones seach type. |
protected abstract Class[] |
createSearchTypeClasses()
Actually creates array of class types of objects this search type can search. |
abstract boolean |
enabled(Node[] nodes)
Checks that this search type is able to search the specified set of nodes. |
static Enumeration |
enumerateSearchTypes()
Deprecated. Please use Lookup instead. |
Node[] |
getDetails(Node node)
Creates nodes representing matches found withing an object represented by the specified node. |
Node[] |
getDetails(Object resultObject)
Creates nodes representing matches found within the specified object. |
Class[] |
getSearchTypeClasses()
Gets class types of objects this search type can search (test) on. |
boolean |
isValid()
|
protected void |
prepareSearchObject(Object searchObject)
Prepares search object. |
void |
setValid(boolean state)
Now the custonized criterion changed validity state. |
protected abstract boolean |
testObject(Object searchObject)
Checks whether an object matches the criteria defined in this search type. |
Methods inherited from class org.openide.ServiceType |
---|
addPropertyChangeListener, createClone, displayName, firePropertyChange, getHelpCtx, getName, removePropertyChangeListener, setName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_VALID
protected static final String PROP_OBJECT_CHANGED
Constructor Detail |
---|
public SearchType()
Method Detail |
---|
public final Class[] getSearchTypeClasses()
SearchGroup
.
Note: the order of classes declares also priority.
protected abstract Class[] createSearchTypeClasses()
protected Node[] acceptSearchRootNodes(Node[] roots)
protected boolean acceptSearchObject(Object searchObject)
true
protected void prepareSearchObject(Object searchObject)
protected abstract boolean testObject(Object searchObject)
searchObject
- object to be tested
true
if the object matches the criteria,
false
it it does notpublic Node[] getDetails(Object resultObject)
This is a dummy implementation, subclasses should provide a real implementation.
resultObject
- object to create the nodes for
null
(subclasses should return the created nodes)public Node[] getDetails(Node node)
This is a dummy implementation, subclasses should provide a real
implementation. The typical implementation is that the node is validated,
an object is extracted from it and passed to method
getDetails(Object)
.
node
- node representing object with matches
null
(subclasses should return the created nodes)getDetails(Object)
public abstract boolean enabled(Node[] nodes)
This method is usually implemented such that it returns true
if it is possible to search at least one of the nodes.
nodes
- nodes to be searched
true
if this search type is able to search
the nodes, false
otherwisepublic final void setValid(boolean state)
public final boolean isValid()
public Object clone()
clone
in class ServiceType
public static Enumeration enumerateSearchTypes()
Lookup
instead.
|
org.openidex.util/3 3.11 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |