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 class
InterfaceShapeQuery.QueryMode
-
Field Summary
Fields Modifier and Type Field Description InterfaceShape
last_shape
protected java.util.TreeSet<QueryShapeVertex>
vertices
Fields 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 void
addQueryVertex(QueryShapeVertex vertex)
boolean
canQuery(InterfaceQueryObject obj)
Determines whether this query instance can query the givenInterfaceQueryObject
.void
clearVertices()
java.lang.Object
getLastQueriedObject()
InterfaceQuery
getNewInstance(java.lang.String name)
Returns a new instance of this class of query.java.util.ArrayList<QueryShapeVertex>
getVertices()
void
query(InterfaceQueryObject object)
Performs a query on the specified query object.void
removeQueryVertex(QueryShapeVertex vertex)
void
setFromShape(InterfaceShape shape)
protected void
setFromShape2D(Shape2DInt shape2d)
protected void
setFromShape3D(Shape3DInt shape3d)
void
setTreeNode(InterfaceTreeNode node)
Sets the children for this node'sInterfaceTreeNode
.java.lang.String
toString()
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, setName
Methods 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:InterfaceQuery
Determines whether this query instance can query the givenInterfaceQueryObject
.- Specified by:
canQuery
in classInterfaceQuery
- Returns:
-
query
Description copied from class:InterfaceQuery
Performs a query on the specified query object. Adds a new result to the result list.- Specified by:
query
in classInterfaceQuery
- Throws:
ObjectNotQueriableException
-
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
- Overrides:
setTreeNode
in classInterfaceQuery
-
getNewInstance
Description copied from class:InterfaceQuery
Returns a new instance of this class of query.- Specified by:
getNewInstance
in classInterfaceQuery
- Returns:
-
addQueryVertex
-
removeQueryVertex
-
getVertices
-
clearVertices
public void clearVertices() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-