com.ericsson.tic.vi
Class Label

java.lang.Object
  extended by com.ericsson.tic.vi.Pickable
      extended by com.ericsson.tic.vi.Label
All Implemented Interfaces:
Cloneable

public class Label
extends Pickable
implements Cloneable

Label is a GUI component which creates a floating 3D-window.

Version:
1.0 (2008-12-04)
Author:
Sami Matilainen

Field Summary
 int id
          A unique identifier for this label.
 GraphNode node
          A node associated with this label.
 float speed
          The speed of this label.
 String title
          Title of this label.
 float x
          Current coordinate.
 float xGlobe
          Globe Coordinate
 float xPlane
          Plane Coordinate
private  float xSpeed
          The speed of this label.
 float xTarget
          The travel-target of this label.
 float y
          Current coordinate.
 float yGlobe
          Globe Coordinate
 float yPlane
          Plane Coordinate
private  float ySpeed
          The speed of this label.
 float yTarget
          The travel-target of this label.
 float z
          Current coordinate.
 float zGlobe
          Globe Coordinate
 float zPlane
          Plane Coordinate
private  float zSpeed
          The speed of this label.
 float zTarget
          The travel-target of this label.
 
Fields inherited from class com.ericsson.tic.vi.Pickable
highlighted, pid
 
Constructor Summary
Label(int id, String title)
          Creates a label at the origin.
Label(int id, String title, float x, float y, float z)
          Creates a label at coordinate x, y, z (on the map)
 
Method Summary
 Object clone()
          Clones this graph node.
 void moveTowardsTarget()
          Take a step towards the target.
 void setSpeed(float speed)
          Set the speed of this node.
 void setSpeedVector()
          Set the speedvector.
 void setSpeedVector(float speed)
          Set the speedvector.
 void setTarget(float xTarget, float yTarget, float zTarget)
          Sets the traveling target of this node.
 void setTargetOnGlobe()
          Sets the target on the globe surface.
 void setTargetOnPlane()
          Sets the target on the plane.
 void stopMoving()
          Stops moving.
 
Methods inherited from class com.ericsson.tic.vi.Pickable
newPID
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public int id
A unique identifier for this label.


title

public String title
Title of this label.


x

public float x
Current coordinate.


y

public float y
Current coordinate.


z

public float z
Current coordinate.


node

public GraphNode node
A node associated with this label.


xPlane

public float xPlane
Plane Coordinate


yPlane

public float yPlane
Plane Coordinate


zPlane

public float zPlane
Plane Coordinate


xGlobe

public float xGlobe
Globe Coordinate


yGlobe

public float yGlobe
Globe Coordinate


zGlobe

public float zGlobe
Globe Coordinate


xTarget

public float xTarget
The travel-target of this label.


yTarget

public float yTarget
The travel-target of this label.


zTarget

public float zTarget
The travel-target of this label.


speed

public float speed
The speed of this label.


xSpeed

private float xSpeed
The speed of this label.


ySpeed

private float ySpeed
The speed of this label.


zSpeed

private float zSpeed
The speed of this label.

Constructor Detail

Label

public Label(int id,
             String title)
Creates a label at the origin.

Parameters:
id - the id of this node.
title - The Title of this node.

Label

public Label(int id,
             String title,
             float x,
             float y,
             float z)
Creates a label at coordinate x, y, z (on the map)

Parameters:
id - the id of this node.
title - The Title of this node.
x - The x-coordinate. [-2 < x < 2]
y - The y-coordinate. [-1 < y < 1]
z - The z-coordinate should be 0
Method Detail

setSpeed

public void setSpeed(float speed)
Set the speed of this node.

Parameters:
speed - The speed.

setSpeedVector

public void setSpeedVector(float speed)
Set the speedvector.

Parameters:
speed - The speed.

setSpeedVector

public void setSpeedVector()
Set the speedvector.


setTarget

public void setTarget(float xTarget,
                      float yTarget,
                      float zTarget)
Sets the traveling target of this node.

Parameters:
xTarget - The x coordinate of the target.
yTarget - The y coordinate of the target.
zTarget - The z coordinate of the target.

setTargetOnGlobe

public void setTargetOnGlobe()
Sets the target on the globe surface.


setTargetOnPlane

public void setTargetOnPlane()
Sets the target on the plane.


moveTowardsTarget

public void moveTowardsTarget()
Take a step towards the target. How long the step is depends on the speed.


stopMoving

public void stopMoving()
Stops moving.


clone

public Object clone()
             throws CloneNotSupportedException
Clones this graph node.

Overrides:
clone in class Object
Throws:
CloneNotSupportedException