|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.command.BaseCommand
com.tensegrity.skeleton.commands.CommonBaseCommand
com.tensegrity.skeleton.commands.DocumentCommand
com.tensegrity.skeleton.commands.GraphDocumentCommand
com.tensegrity.skeleton.commands.FindElementsCommand
This Command class looks for occurrences of strings in text
attributes of graph elements and selects all matching items.
| Constructor Summary | |
FindElementsCommand(ApplicationFrame applicationFrame,
java.lang.String command)
Constructor. |
|
| Method Summary | |
protected java.util.Collection |
gatherElements()
Looks through all elements in the VisualGraphView (recursively) and calls matchesFindPattern() for each of them. |
protected java.util.Collection |
gatherElements(VisualGraphObjectContainer vgv)
Looks through all elements in the VisualGraphObjectContainer (recursively) and calls matchesFindPattern() for each of them. |
protected void |
getSearchCriteria()
Creates the search criteria for this search. |
protected java.lang.String |
getSearchText()
Returns the search text. |
boolean |
isEnabled()
Overridden to restrict the availability of this command to the case that there are no elements in the graph. |
protected boolean |
matchesSearchCriteria(VisualGraphObject vgo)
Checks whether the given VisualGraphObject matches the search criteria. |
void |
perform(java.lang.Object args)
Opens a dialog for the user to enter some text and then selects all elements in the current graph whose attribute values contain this text. |
protected void |
setSearchText(java.lang.String searchText)
Stores the text which is going to be search for. |
protected void |
showResults(java.util.Collection elements)
Shows the results of the search, usually selects the items. |
| Methods inherited from class com.tensegrity.skeleton.commands.GraphDocumentCommand |
getGraphDocument, getVisualGraphView |
| Methods inherited from class com.tensegrity.skeleton.commands.DocumentCommand |
getDocument, getGraphApplication, newGraphDocumentFromFactory |
| Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand |
getApplicationFrame, getTitle |
| Methods inherited from class com.tensegrity.generic.command.BaseCommand |
getDescription, getId, getPerformDescription, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FindElementsCommand(ApplicationFrame applicationFrame,
java.lang.String command)
applicationFrame - The application framecommand - The id used to register this command in the command registry| Method Detail |
public final void perform(java.lang.Object args)
perform in interface Commandperform in class CommonBaseCommandargs - IgnoredVisualGraphViewUtil.findElementsWithAttributeValue(VisualGraphObjectContainer, String)protected void showResults(java.util.Collection elements)
elements - The matching items that were gatheredprotected void getSearchCriteria()
public boolean isEnabled()
isEnabled in interface CommandisEnabled in class GraphDocumentCommandprotected boolean matchesSearchCriteria(VisualGraphObject vgo)
vgo - The VisualGraphObject to check
protected final java.util.Collection gatherElements()
protected final java.util.Collection gatherElements(VisualGraphObjectContainer vgv)
vgv - The container to start looking
protected java.lang.String getSearchText()
Returns the search text.
protected void setSearchText(java.lang.String searchText)
Stores the text which is going to be search for.
searchText - the text which is going to be search for.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||