|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.DBItem | +--org.gjt.universe.PlanetBase
Field Summary | |
private static PlanetID |
currentID
|
private VectorFleetID |
fleetsInOrbit
|
private VectorStationID |
GroundStationList
|
private PlanetID |
ID
|
private SimpleAccrete.PlanetaryMakeup |
makeup
|
private java.lang.String |
name
|
private static java.text.NumberFormat |
ourNumberFormat
|
private CivID |
owner
|
private PlanetID |
planetaryPrimaryID
|
private PlanetType |
planetType
|
private int |
starIndex
|
private SystemID |
SystemMember
|
Constructor Summary | |
protected |
PlanetBase()
This constructor is used to create a special "undefined" planet instance. |
protected |
PlanetBase(SystemID SID,
int starIndex,
java.lang.String in_name)
This is the designated constructor for instances of this class/ It creates a new instance of a planet in the given star system, orbiting the given star in that system, and having the given name. |
Method Summary | |
void |
addGroundStation(StationID BID)
This method adds the given ground station to those present on the planet. |
abstract void |
drawInfoPanelOne(GUIFactoryOne gui,
javax.swing.JPanel panel)
|
void |
fleetArrived(FleetBase aFleet)
This method is called automatically by fleets when they arrive in orbit around the planet. |
void |
fleetDeparted(FleetBase aFleet)
This method is called automatically by fleets when they depart orbit around the planet. |
VectorFleetID |
getFleetsInOrbit()
This method returns the IDs of all fleets currently in orbit around the planet. |
java.lang.String |
getGravityString()
This method returns a string representing the gravity of the planet. |
VectorStationID |
getGroundStationList()
|
PlanetID |
getID()
|
static PlanetID |
getID(java.lang.String in_name)
|
Index |
getIndex()
See getID() in the subclasses for a typed version. |
Location |
getLocation()
|
java.lang.String |
getName()
|
CivID |
getOwner()
Returns the ID of the civ who is considered the owner of the planet (i.e. |
PlanetID |
getPlanetaryPrimaryID()
This method returns the ID of the planetary body which the receiving instance is orbiting. |
SimpleAccrete.PlanetaryMakeup |
getPlanetMakeup()
This method returns the planetary make-up of the receiving instance. |
PlanetType |
getPlanetType()
This method returns an object representing the general classification of the planet based on its make-up. |
java.lang.String |
getRadiusString()
This method returns a string representing the radius of the planet. |
abstract void |
getSpecificTableInfo(CivID AID,
DisplayReturn DR)
This function allows additional values to be presented in the planet table. |
int |
getStarIndex()
Returns the index of the star within the planet's system that the planet is orbiting. |
SystemID |
getSystemID()
|
java.lang.String |
getTemperatureString()
This method returns a string representing the temperature of the planet. |
boolean |
isInhabited()
This method returns true if the receiving planet instance is populated, and false otherwise. |
boolean |
isInhabitedByAnotherCiv(CivID aCivID)
This method returns true if the receiving planet instance is populated by member's of a civilization other than the one given, and false otherwise. |
boolean |
isInhabitedByCiv(CivID aCivID)
This method returns true if the receiving planet instance is populated by member's of the given civilization, and false otherwise. |
boolean |
isMoon()
This method returns true if the receiving instance represents a moon orbiting another planetary body. |
void |
setName(java.lang.String new_name)
|
void |
setOwner(CivID newOwner)
This method sets the owner of the planet to be the civ with the given ID. |
void |
setPlanetaryPrimaryID(PlanetID newValue)
This method sets the ID of the planetary body which the receiving instance is orbiting. |
void |
setPlanetMakeup(SimpleAccrete.PlanetaryMakeup pm)
This method sets the planetary make-up of the receiving instance to the given value. |
void |
setStarIndex(int newValue)
Sets the index of the star within the plane'ts system that the planet is orbiting. |
abstract void |
setToHomePlanetValues()
|
abstract VectorDisplayReturn |
specificDisplay()
This method returns the ID of the receiving instance |
Methods inherited from class org.gjt.universe.DBItem |
specificDisplayDebug |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static PlanetID currentID
private static java.text.NumberFormat ourNumberFormat
private PlanetID ID
private SystemID SystemMember
private VectorStationID GroundStationList
private SimpleAccrete.PlanetaryMakeup makeup
private PlanetType planetType
private java.lang.String name
private CivID owner
private int starIndex
private PlanetID planetaryPrimaryID
private VectorFleetID fleetsInOrbit
Constructor Detail |
protected PlanetBase(SystemID SID, int starIndex, java.lang.String in_name)
SID
- The unique ID of the star syste to which the planet is being added.starIndex
- The index of the star within that system which the planet is orbiting.in_name
- The name to be assigned to the planet.protected PlanetBase()
Method Detail |
public PlanetID getID()
public Index getIndex()
DBItem
getIndex
in class DBItem
public static PlanetID getID(java.lang.String in_name)
public java.lang.String getName()
getName
in class DBItem
public void setName(java.lang.String new_name)
public SystemID getSystemID()
public Location getLocation()
getLocation
in class DBItem
public CivID getOwner()
getOwner
in class DBItem
public void setOwner(CivID newOwner)
newOwner
- The unique ID of the new owner.SystemBase.planetChangedOwner( PlanetID aPlanetID, CivID newPlanetOwner )
public void addGroundStation(StationID BID)
BID
- The unique ID of the station.public VectorStationID getGroundStationList()
public boolean isInhabited()
public boolean isInhabitedByCiv(CivID aCivID)
aCivID
- The unique ID of the civilization being sought.isInhabitedByAnotherCiv( CivID x )
public boolean isInhabitedByAnotherCiv(CivID aCivID)
aCivID
- The unique ID of the civilization whose stations are to be ignored.isInhabitedByCiv( CivID x )
public SimpleAccrete.PlanetaryMakeup getPlanetMakeup()
public void setPlanetMakeup(SimpleAccrete.PlanetaryMakeup pm)
pm
- The new planetary make-up to be assigned to
to the planet.getPlanetType()
public PlanetType getPlanetType()
setPlanetMakeup(SimpleAccrete.PlanetaryMakeup pm)
public int getStarIndex()
public void setStarIndex(int newValue)
public boolean isMoon()
getPlanetaryPrimaryID()
,
setPlanetaryPrimaryID( PlanetID newValue )
public void setPlanetaryPrimaryID(PlanetID newValue)
newValue
- The ID of the planetary body which this body is orbiting.isMoon()
,
getPlanetaryPrimaryID()
public PlanetID getPlanetaryPrimaryID()
isMoon()
,
setPlanetaryPrimaryID( PlanetID newValue )
public VectorFleetID getFleetsInOrbit()
public void fleetArrived(FleetBase aFleet)
aFleet
- The fleet which just arrived.public void fleetDeparted(FleetBase aFleet)
aFleet
- The fleet which just arrived.public abstract VectorDisplayReturn specificDisplay()
public abstract void getSpecificTableInfo(CivID AID, DisplayReturn DR)
public abstract void setToHomePlanetValues()
public abstract void drawInfoPanelOne(GUIFactoryOne gui, javax.swing.JPanel panel)
public java.lang.String getRadiusString()
public java.lang.String getGravityString()
public java.lang.String getTemperatureString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |