java.lang.Object
org.jpo.datamodel.StaticNodesQuery
- All Implemented Interfaces:
Query
-
Constructor Summary
ConstructorsConstructorDescriptionStaticNodesQuery(String title, List<SortableDefaultMutableTreeNode> nodes) Creates a static nodes query -
Method Summary
Modifier and TypeMethodDescriptiongetIndex(int index) This method returns theSortableDefaultMutableTreeNodenode for the indicated position in the query.intThe 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.voidrefresh()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:QueryThe query must be able to say how many results it will return.- Specified by:
getNumberOfResultsin interfaceQuery- Returns:
- the number of results
-
getIndex
Description copied from interface:QueryThis method returns theSortableDefaultMutableTreeNodenode 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:
getIndexin 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:QueryReturns a title for the search that can be used to display the search results under. -
refresh
public void refresh()Description copied from interface:QueryForces the results to be refreshed
-