|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--visualizer.SocketVisualizerTemplate
|
+--command.visualizer.GraphicalTCVisualizer
A visualizer that prints out when the server receives an WorldState
update and takes input to move Targetable units around.
| Field Summary | |
protected static double |
CLICK_SIGNIFICANCE
The distance on the unit square at which the user's click is defined as clicking on a displayed object. |
private world.WorldState |
currentState
The most recent WorldState sent by the ComponentizedSimulator. |
private objects.Location |
destination
The destination Location currently selected
for the units in units to move
to. |
private static long |
serialVersionUID
This is for cross-machine compatibility |
private connect.SupplierChannel |
toTargetControl
The supplier connection to the TargetControl that is
connected. |
private boolean |
unitListed
Whether selected objects are added to the units list. |
private Set |
units
The Set of all Targetable units currently selected for the MoveMission waiting to be sent. |
private visualizer.WorldStateViz |
worldViz
This visualization for the World. |
| Fields inherited from class visualizer.SocketVisualizerTemplate |
|
| Constructor Summary | |
GraphicalTCVisualizer(connect.CreatesConnection remoteComponent)
|
|
| Method Summary | |
protected void |
addUnit(objects.Location clickLoc)
Identifies the closest Targetable object within the
significant range and add it to list of units. |
private void |
moveUnits(String direction)
Sends an order to move the currently selected Targetable units. |
protected void |
processAcceptedConnection(Class hostType,
connect.ChannelBundle acceptedConnection)
When a component connects to the component that it requested the connection to, this method is called. |
private void |
resetMission()
Resets the current list of units and destination. |
private void |
sendMission()
Sends the TargetControl a Set
containing one or more units and a Location to
which they should move. |
| Methods inherited from class visualizer.SocketVisualizerTemplate |
connect, getComponentEmissary |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
private visualizer.WorldStateViz worldViz
private world.WorldState currentState
WorldState sent by the ComponentizedSimulator.
protected static final double CLICK_SIGNIFICANCE
private boolean unitListed
private Set units
Targetable units currently selected for the MoveMission waiting to be sent.
private objects.Location destination
Location currently selected
for the units in units to move
to.
private connect.SupplierChannel toTargetControl
TargetControl that is
connected.
| Constructor Detail |
public GraphicalTCVisualizer(connect.CreatesConnection remoteComponent)
| Method Detail |
protected void addUnit(objects.Location clickLoc)
Targetable object within the
significant range and add it to list of units.
protected void processAcceptedConnection(Class hostType,
connect.ChannelBundle acceptedConnection)
SocketVisualizerTemplate
processAcceptedConnection in class SocketVisualizerTemplateprivate void sendMission()
TargetControl a Set
containing one or more units and a Location to
which they should move. If either the set is empty or the
location is null, the current mission is reset and nothing is
sent.
private void resetMission()
private void moveUnits(String direction)
Targetable units.
The direction String can be "left", "down", "up", "right", "stop"
(stop random movement) or "go" (resume random movement).
|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||