com.partnersoft.v3x.apps.Staker.domain
Class UnitAtALocation

java.lang.Object
  extended by com.partnersoft.v3x.apps.Staker.domain.UnitAtALocation
All Implemented Interfaces:
Selectable, java.io.Serializable, java.lang.Comparable

public class UnitAtALocation
extends java.lang.Object
implements java.io.Serializable, Selectable, java.lang.Comparable

This is a unit which has been added to a Location.

See Also:
Serialized Form

Constructor Summary
UnitAtALocation()
           
UnitAtALocation(LocationUnit unit, StakeStatus status, java.lang.String comment)
           
UnitAtALocation(LocationUnit unit, StakeStatus status, java.lang.String comment, Location loc)
          This creates a new UnitAtALocation and autorevolves it for the given location.
 
Method Summary
 void autoRevolveFor(Location loki)
          Automatically sets the angle for a given location.
 void clearGuid()
           
 java.lang.Object clone()
           
 int compareTo(java.lang.Object nother)
           
 double getAngle()
          Angle drawn from location.
 java.lang.String getComment()
          A text field for any addition information.
 int getDistance()
           
 java.lang.String getGuid()
           
 StakedUnitInfo getInfo()
           
 int getQuantity()
           
 double getRotationAngle()
           
 StakeStatus getStatus()
          Existing, retired, or new.
 java.lang.String getSymbol()
          Name of symbol to use on map.
 LocationUnit getUnit()
          The chosen unit.
 boolean isHidden()
           
 boolean isOffset()
           
 boolean isSelected()
           
 boolean isVisible()
           
 void oldAutoRevolveFor(Location loki)
          The old, probably broken, autoRevolveFor from v3x.
 void paintOn(java.awt.Graphics g, java.awt.Point p, boolean inverse)
           
 void setAngle(double newAngle)
          Angle drawn from location.
 void setComment(java.lang.String newComment)
          A text field for any addition information.
 void setDistance(int newDistance)
           
 void setGuid(java.lang.String newGuid)
           
 void setHidden(boolean tizit)
           
 void setInfo(StakedUnitInfo newInfo)
           
 void setQuantity(int newQuantity)
           
 void setRotationAngle(double newRotationAngle)
           
 void setSelected(boolean newSelected)
           
 void setStatus(StakeStatus newStatus)
          Existing, retired, or new.
 void setUnit(LocationUnit unit)
          The chosen unit.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnitAtALocation

public UnitAtALocation()

UnitAtALocation

public UnitAtALocation(LocationUnit unit,
                       StakeStatus status,
                       java.lang.String comment)

UnitAtALocation

public UnitAtALocation(LocationUnit unit,
                       StakeStatus status,
                       java.lang.String comment,
                       Location loc)
This creates a new UnitAtALocation and autorevolves it for the given location.

Method Detail

setGuid

public void setGuid(java.lang.String newGuid)

getGuid

public java.lang.String getGuid()

setRotationAngle

public void setRotationAngle(double newRotationAngle)

getRotationAngle

public double getRotationAngle()

autoRevolveFor

public void autoRevolveFor(Location loki)
Automatically sets the angle for a given location.


oldAutoRevolveFor

public void oldAutoRevolveFor(Location loki)
The old, probably broken, autoRevolveFor from v3x. Left in as reference.

Parameters:
loki -

paintOn

public void paintOn(java.awt.Graphics g,
                    java.awt.Point p,
                    boolean inverse)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object nother)
Specified by:
compareTo in interface java.lang.Comparable

getUnit

public LocationUnit getUnit()
The chosen unit.


setUnit

public void setUnit(LocationUnit unit)
The chosen unit.


getStatus

public StakeStatus getStatus()
Existing, retired, or new.


setStatus

public void setStatus(StakeStatus newStatus)
Existing, retired, or new.


getComment

public java.lang.String getComment()
A text field for any addition information. If the unit chosen is an "other" type, describe or name it here.


setComment

public void setComment(java.lang.String newComment)
A text field for any addition information. If the unit chosen is an "other" type, describe or name it here.


getAngle

public double getAngle()
Angle drawn from location.


setAngle

public void setAngle(double newAngle)
Angle drawn from location.


getDistance

public int getDistance()

setDistance

public void setDistance(int newDistance)

isVisible

public boolean isVisible()

getSymbol

public java.lang.String getSymbol()
Name of symbol to use on map. Takes into account staking status.

Returns:

isOffset

public boolean isOffset()

isSelected

public boolean isSelected()
Specified by:
isSelected in interface Selectable

setSelected

public void setSelected(boolean newSelected)
Specified by:
setSelected in interface Selectable

isHidden

public boolean isHidden()

setHidden

public void setHidden(boolean tizit)

getQuantity

public int getQuantity()

setQuantity

public void setQuantity(int newQuantity)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getInfo

public StakedUnitInfo getInfo()

setInfo

public void setInfo(StakedUnitInfo newInfo)

clearGuid

public void clearGuid()