|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.lancs.relate.trigger.Trackable
uk.ac.lancs.relate.gateways.devices.TrackableDevice
public class TrackableDevice
This class models an abstract Device. A Device
represents the generic controller of a physical device supported by the
RelatedGateways application. It has a GatewayController
which is the visual representation of a physical device.
Concrete devices have to extend this class in order to add their
own core logic and behaviour. The concrete devices are in charge of
implementing, providing and registering their own services.
| Constructor Summary | |
|---|---|
TrackableDevice(java.lang.String name,
int width,
int height,
Location l,
java.lang.String host,
GatewayApplication app,
javax.swing.ImageIcon iconicRepresentation)
Creates a new Device used by the gateway application, standard constructor. |
|
| Method Summary | |
|---|---|
void |
addService(Service service)
Add a Service to the ones provided by this Device |
protected void |
createServices()
Method used by a Device to create the Services it provides |
GatewayApplication |
getApplication()
Returns the gateway application this device belongs to. |
GatewayController |
getController()
Returns the gateway controller for this device. |
int |
getHeight()
Returns the height of the device (y). |
java.lang.String |
getHostname()
This method gets the hostname of the Device. |
javax.swing.ImageIcon |
getIconicRepresentation()
|
Location |
getLocation()
Returns the device's location (coordinates of the center of the device). |
java.lang.String |
getName()
Gets the device's name. |
java.lang.String |
getServiceDescription()
This method packs the human-readable description of all the services offered by this provider in a string. |
java.util.ArrayList<Service> |
getServices()
Gets all the Services provided by this Device. |
java.lang.String |
getTooltipMessage()
Returns the message that is shown when the mouse hovers above the gateway. |
int |
getWidth()
Returns the width of the device (x). |
void |
setController(GatewayController controller)
Sets the gateway controller for this device. |
void |
setHostname(java.lang.String hostname)
This method gets the hostname of the Device. |
void |
setLocation(Location location)
Sets the device's location (coordinates of the center of the device). |
protected void |
setName(java.lang.String name)
Sets the device's name. |
void |
setServices(java.util.ArrayList<Service> services)
Sets all the Services provided by this Device. |
void |
setTooltipMessage(java.lang.String m)
Sets the message that is shown when the mouse hovers above the gateway. |
| Methods inherited from class uk.ac.lancs.relate.trigger.Trackable |
|---|
getDirectionTo, getDistanceTo, getId, getMotion, getOrientation, hasBackTo, isCloserThan, isFacing, isLeftOf, isMoving, isMovingAway, isMovingTowards, isRightOf, setMotion, setOrientation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TrackableDevice(java.lang.String name,
int width,
int height,
Location l,
java.lang.String host,
GatewayApplication app,
javax.swing.ImageIcon iconicRepresentation)
name - unique idwidth - width of the device (x)height - height of the device (y)l - location (coordinates of the center of the device)| Method Detail |
|---|
public Location getLocation()
getLocation in class Trackablepublic void setLocation(Location location)
setLocation in class Trackablelocation - device's locationpublic int getHeight()
public int getWidth()
public GatewayController getController()
public void setController(GatewayController controller)
controller - gateway controller for this devicepublic java.lang.String getHostname()
public void setHostname(java.lang.String hostname)
hostname - Hostname of the Device (e.g. ip address or hostname)public java.util.ArrayList<Service> getServices()
public void setServices(java.util.ArrayList<Service> services)
public java.lang.String getName()
protected void setName(java.lang.String name)
public void addService(Service service)
protected void createServices()
public GatewayApplication getApplication()
public java.lang.String getTooltipMessage()
public void setTooltipMessage(java.lang.String m)
tooltipMessage - tooltip messagepublic javax.swing.ImageIcon getIconicRepresentation()
public java.lang.String getServiceDescription()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||