java.lang.Object
org.jpo.datamodel.StaticNodesQuery
- All Implemented Interfaces:
Query
-
Constructor Summary
ConstructorDescriptionStaticNodesQuery
(String title, List<SortableDefaultMutableTreeNode> nodes) Creates a static nodes query -
Method Summary
Modifier and TypeMethodDescriptiongetIndex
(int index) This method returns theSortableDefaultMutableTreeNode
node for the indicated position in the query.int
The query must be able to say how many results it will return.getTitle()
Returns a title for the search that can be used to display the search results under.void
refresh()
Forces the results to be refreshed
-
Constructor Details
-
StaticNodesQuery
Creates a static nodes query- Parameters:
title
- the titlenodes
- the nodes
-
-
Method Details
-
getNumberOfResults
public int getNumberOfResults()Description copied from interface:Query
The query must be able to say how many results it will return.- Specified by:
getNumberOfResults
in interfaceQuery
- Returns:
- the number of results
-
getIndex
Description copied from interface:Query
This method returns theSortableDefaultMutableTreeNode
node for the indicated position in the query. If the index is out of bounds it returns null. The valid range is from 0 toQuery.getNumberOfResults()
.- Specified by:
getIndex
in interfaceQuery
- Parameters:
index
- The component index that is to be returned 0 toQuery.getNumberOfResults()
.- Returns:
- the node for the index
-
getTitle
Description copied from interface:Query
Returns a title for the search that can be used to display the search results under. -
refresh
public void refresh()Description copied from interface:Query
Forces the results to be refreshed
-