Class Controller
java.lang.Object
org.deltava.beans.servinfo.NetworkUser
org.deltava.beans.servinfo.ConnectedUser
org.deltava.beans.servinfo.Controller
- All Implemented Interfaces:
Serializable, Comparable<NetworkUser>, GeoLocation, MapEntry, MarkerMapEntry, ViewEntry
A bean to store online Controller information.
- Since:
- 1.0
- Version:
- 12.3
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class NetworkUser
NetworkUser.Type -
Field Summary
FieldsFields inherited from class ConnectedUser
_positionFields inherited from interface GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILESModifier and TypeFieldDescriptionstatic final intFormat the Longitude and Latitude.static final doubleSize of a degree in feet.static final doubleSize of a degree in miles.static final intSize of a mile in feet.static final String[]Latitude directions.static final intFormat the Latitude only.static final String[]Longitude directions.static final intFormat the Longitude only.static final intRadius of the Earth in miles.Fields inherited from interface MapEntry
BLUE, BROWN, COLORS, GREEN, GREY, ORANGE, PURPLE, RED, WHITE, YELLOWModifier and TypeFieldDescriptionstatic final StringBlue Google Maps icon, displayed as $static/img/maps/point_blue.pngstatic final StringBrown Google Maps icon, displayed as $static/img/maps/point_brown.pngstatic final String[]All Google Maps icon colors.static final StringGreen Google Maps icon, displayed as $static/img/maps/point_green.pngstatic final StringGrey Google Maps icon, displayed as $static/img/maps/point_grey.pngstatic final StringOrange Google Maps icon, displayed as $static/img/maps/point_orange.pngstatic final StringPurple Google Maps icon, displayed as $static/img/maps/point_purple.pngstatic final StringRed Google Maps icon, displayed as $static/img/maps/point_red.pngstatic final StringWhite Google Maps icon, displayed as $static/img/maps/point_white.pngstatic final StringYellow Google Maps icon, displayed as $static/img/maps/point_yellow.png -
Constructor Summary
ConstructorsConstructorDescriptionController(int id, OnlineNetwork net) Initializes the bean with a particular user ID. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a radio position for this Controller.intcompareTo(Controller c2) Compares this user to another Controller by comparing the Network IDs and callsigns.final booleanReturns the Controller's facility type code.Returns all of the radio frequencies for this Controller.Returns the Controller's communication frequency.Returns the icon color for this entry if displayed in a Google Map.Returns the text to display in this marker's infobox if displayed in a Google Map.Returns all of the radio positions for this Controller.intgetRange()Returns the Controller's visibility range.final NetworkUser.TypegetType()Returns the user type.booleanReturns whether the Conrtoller has set a primary frequency.inthashCode()booleanReturns whether the controller is an Observer.voidsetCallsign(String cs) Updates the user's callsign.voidsetFacility(Facility ft) Sets the Controller's facility type.final voidUpdates the network user's name, stripping off the home airport.voidsetRange(int rng) Updates the Controller's visibility range.Methods inherited from class ConnectedUser
getCallsign, getLatitude, getLoginTime, getLongitude, getPosition, getServer, hasLocation, setLoginTime, setPosition, setServerModifier and TypeMethodDescriptionReturns the user's callsign.final doubleReturns the latitude of this location.Returns the date/time of the user's connection.final doubleReturns the longitude of this location.Returns the User's current position.Returns the FSD Server this user is connected to.booleanReturns if the User has a location set.voidsetLoginTime(Instant dt) Updates the date/time of the user's last connection.voidsetPosition(double lat, double lon) Updates the User's position.voidUpdates the FSD Server this user is connected to.Methods inherited from class NetworkUser
compareTo, getFirstName, getID, getLastName, getName, getNetwork, getPilotID, getRating, getRowClassName, setFirstName, setLastName, setPilotID, setRating, toStringModifier and TypeMethodDescriptionintcompareTo(NetworkUser usr2) Returns the user's first name.intgetID()Returns the user's network ID.Returns the user's last name.getName()Returns the user's full name.Returns the Online Network for this user.intReturns the Database ID of this network user.Returns the Controller's rating.Returns the CSS class for this object if rendered in a view table.voidsetFirstName(String fName) Updates the user's first name.voidsetLastName(String lName) Updates the user's last name.voidsetPilotID(int id) Updates the database ID of this User.voidSets the Users's rating.toString()Methods inherited from interface GeoLocation
distanceFeet, distanceToModifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.
-
Field Details
-
OBS_FREQ
-
-
Constructor Details
-
Controller
Initializes the bean with a particular user ID.- Parameters:
id- the user IDnet- the OnlineNetwork
-
-
Method Details
-
getType
Description copied from class:NetworkUserReturns the user type.- Specified by:
getTypein classNetworkUser- Returns:
- the Type
-
getFrequency
Returns the Controller's communication frequency.- Returns:
- the frequency
- See Also:
-
getFacility
Returns the Controller's facility type code.- Returns:
- the facility code
- See Also:
-
getRange
public int getRange()Returns the Controller's visibility range.- Returns:
- the range in miles
- See Also:
-
getRadios
Returns all of the radio positions for this Controller.- Returns:
- a Collection of RadioPosition beans
-
getFrequencies
Returns all of the radio frequencies for this Controller.- Returns:
- a Collection of frequencies
-
addPosition
Adds a radio position for this Controller.- Parameters:
rp- a RadioPosition
-
setName
Description copied from class:NetworkUserUpdates the network user's name, stripping off the home airport.- Overrides:
setNamein classNetworkUser- Parameters:
name- the user name- See Also:
-
setCallsign
Description copied from class:ConnectedUserUpdates the user's callsign.- Overrides:
setCallsignin classConnectedUser- Parameters:
cs- the callsign- See Also:
-
setFacility
Sets the Controller's facility type.- Parameters:
ft- the Facility- See Also:
-
setRange
public void setRange(int rng) Updates the Controller's visibility range.- Parameters:
rng- the range in miles- See Also:
-
isObserver
public boolean isObserver()Returns whether the controller is an Observer.- Returns:
- TRUE if the Controller has an Observer rating or _OBS callsign
-
hasFrequency
public boolean hasFrequency()Returns whether the Conrtoller has set a primary frequency.- Returns:
- TRUE if a frequency has been set, otherwise FALSE
- See Also:
-
getIconColor
Description copied from interface:MarkerMapEntryReturns the icon color for this entry if displayed in a Google Map.- Returns:
- the icon color
-
compareTo
Compares this user to another Controller by comparing the Network IDs and callsigns.- Parameters:
c2- the Controller- Returns:
- TRUE if the IDs and Callsigns are equal, otherwise FALSE
-
equals
- Overrides:
equalsin classNetworkUser
-
hashCode
public int hashCode()- Overrides:
hashCodein classNetworkUser
-
getInfoBox
-