Package mgui.interfaces.shapes.queries
Class InterfaceShapeQuery
java.lang.Object
mgui.interfaces.queries.InterfaceQuery
mgui.interfaces.shapes.queries.InterfaceShapeQuery
- All Implemented Interfaces:
InterfaceObject,NamedObject,TreeObject,CleanableObject,IconObject
- Direct Known Subclasses:
ShapeSummaryQuery
public class InterfaceShapeQuery extends InterfaceQuery
Base class for all shape queries.
- Since:
- 1.0?
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInterfaceShapeQuery.QueryMode -
Field Summary
Fields Modifier and Type Field Description InterfaceShapelast_shapeprotected java.util.TreeSet<QueryShapeVertex>verticesFields inherited from class mgui.interfaces.queries.InterfaceQuery
listeners, name, results, sorted_objects -
Constructor Summary
Constructors Constructor Description InterfaceShapeQuery(java.lang.String name) -
Method Summary
Modifier and Type Method Description voidaddQueryVertex(QueryShapeVertex vertex)booleancanQuery(InterfaceQueryObject obj)Determines whether this query instance can query the givenInterfaceQueryObject.voidclearVertices()java.lang.ObjectgetLastQueriedObject()InterfaceQuerygetNewInstance(java.lang.String name)Returns a new instance of this class of query.java.util.ArrayList<QueryShapeVertex>getVertices()voidquery(InterfaceQueryObject object)Performs a query on the specified query object.voidremoveQueryVertex(QueryShapeVertex vertex)voidsetFromShape(InterfaceShape shape)protected voidsetFromShape2D(Shape2DInt shape2d)protected voidsetFromShape3D(Shape3DInt shape3d)voidsetTreeNode(InterfaceTreeNode node)Sets the children for this node'sInterfaceTreeNode.java.lang.StringtoString()Methods inherited from class mgui.interfaces.queries.InterfaceQuery
addListener, addResult, clean, clearResults, destroy, fireListeners, getLastResult, getName, getObjectIcon, getObjects, getResult, getResults, getResultTreeNode, getTreeLabel, isDestroyed, issueTreeNode, removeListener, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
vertices
-
last_shape
-
-
Constructor Details
-
InterfaceShapeQuery
public InterfaceShapeQuery(java.lang.String name)
-
-
Method Details
-
getLastQueriedObject
public java.lang.Object getLastQueriedObject() -
setFromShape
-
setFromShape2D
-
setFromShape3D
-
canQuery
Description copied from class:InterfaceQueryDetermines whether this query instance can query the givenInterfaceQueryObject.- Specified by:
canQueryin classInterfaceQuery- Returns:
-
query
Description copied from class:InterfaceQueryPerforms a query on the specified query object. Adds a new result to the result list.- Specified by:
queryin classInterfaceQuery- Throws:
ObjectNotQueriableException
-
setTreeNode
Description copied from interface:TreeObjectSets the children for this node'sInterfaceTreeNode.- Specified by:
setTreeNodein interfaceTreeObject- Overrides:
setTreeNodein classInterfaceQuery
-
getNewInstance
Description copied from class:InterfaceQueryReturns a new instance of this class of query.- Specified by:
getNewInstancein classInterfaceQuery- Returns:
-
addQueryVertex
-
removeQueryVertex
-
getVertices
-
clearVertices
public void clearVertices() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-