public class TestEdge extends EdgeController
This class provides a simple generalization of an Edge that keeps track of when one of its vertices was updated. Additional functionality may be added at a later time.
Constructor and Description |
---|
TestEdge(java.util.ArrayList<VertexController> vertices)
Calls the super constructor with the same signature.
|
TestEdge(Edge model,
BasicView view)
The default constructor.
|
TestEdge(VertexController start,
VertexController end)
Calls the super constructor with the same signature.
|
Modifier and Type | Method and Description |
---|---|
void |
reset()
Resets the Test class' flag that notifies it was updated.
|
void |
update(IManagedUpdateable component,
SubscriptionType[] type)
Overrides the update method of Edge to mark a flag when the Edge is
notified.
|
boolean |
wasUpdated()
Gets whether or not the Edge's update method was called.
|
clone, getEndLocation, getLength, getStartLocation, isTransparent, isWireframe, setTransparentMode, setWireframeMode
addEntity, addEntityToCategory, copy, dispose, equals, getDisposed, getEntities, getEntitiesFromCategory, getEntitiesFromCategory, getModel, getProperty, getRepresentation, getRotation, getScale, getSize, getSkew, getSubscriptions, getTransformation, getTranslation, getUpdateManager, getView, hashCode, isRoot, isSelected, refresh, register, removeEntity, setDisposed, setEntities, setProperties, setProperty, setRoot, setRotation, setScale, setSelected, setSize, setSkew, setTransformation, setTranslation, setView, unregister
getClass, notify, notifyAll, toString, wait, wait, wait
addEntity, addEntityToCategory, copy, dispose, getDisposed, getEntities, getEntitiesFromCategory, getEntitiesFromCategory, getModel, getProperty, getRepresentation, getRotation, getScale, getSize, getSkew, getTransformation, getTranslation, getUpdateManager, getView, isRoot, isSelected, refresh, removeEntity, setDisposed, setEntities, setProperties, setProperty, setRoot, setRotation, setScale, setSelected, setSize, setSkew, setTransformation, setTranslation, setView
register, unregister
getSubscriptions
public TestEdge(VertexController start, VertexController end)
Calls the super constructor with the same signature.
start
- The first Vertex in this Edge.
end
- The second Vertex in this Edge.
public TestEdge(java.util.ArrayList<VertexController> vertices)
Calls the super constructor with the same signature.
vertices
- The two Vertices this Edge connects.
public void update(IManagedUpdateable component, SubscriptionType[] type)
Overrides the update method of Edge to mark a flag when the Edge is notified.
update
in interface IManagedUpdateableListener
update
in class EdgeController
vertex
- The Vertex that has been updated.
public boolean wasUpdated()
Gets whether or not the Edge's update method was called. This also resets the value to false after the call.
True if the Edge's update method was called, false otherwise.
public void reset()
Resets the Test class' flag that notifies it was updated. This is normally not necessary but can be used in lieu of multiple calls to wasUpdated().