public class OdorWorldComponent extends WorkspaceComponent
OdorWorldPanel
.Modifier and Type | Field and Description |
---|---|
(package private) AttributeType |
absoluteMovementType |
(package private) AttributeType |
hearingSensorType |
(package private) AttributeType |
smellSensorScalars |
(package private) AttributeType |
smellSensorVectors |
(package private) AttributeType |
speechEffectorType |
(package private) AttributeType |
straightMovementType |
(package private) AttributeType |
tileSensorType |
(package private) AttributeType |
turningType |
(package private) AttributeType |
xLocationType
Attribute types.
|
(package private) AttributeType |
yLocationType |
Constructor and Description |
---|
OdorWorldComponent(java.lang.String name)
Default constructor.
|
OdorWorldComponent(java.lang.String name,
OdorWorld world)
Constructor used in deserializing.
|
Modifier and Type | Method and Description |
---|---|
void |
closing()
Perform cleanup after closing.
|
java.lang.String |
getKeyFromObject(java.lang.Object object)
Returns a unique key associated with an object.
|
java.lang.Object |
getObjectFromKey(java.lang.String objectKey)
Finds objects based on a key.
|
java.util.List<PotentialConsumer> |
getPotentialConsumers()
Return the potential consumers associated with this component.
|
java.util.List<PotentialProducer> |
getPotentialProducers()
Return the potential producers associated with this component.
|
OdorWorld |
getWorld()
Returns a reference to the odor world.
|
java.lang.String |
getXML()
Override for use with open service.
|
static OdorWorldComponent |
open(java.io.InputStream input,
java.lang.String name,
java.lang.String format)
Recreates an instance of this class from a saved component.
|
void |
save(java.io.OutputStream output,
java.lang.String format)
Used when saving a workspace.
|
void |
update()
Called by Workspace to update the state of the component.
|
addAttributeListener, addConsumerType, addProducerType, addWorkspaceComponentListener, close, couplingAdded, couplingRemoved, fireAttributeObjectRemoved, fireAttributeTypeVisibilityChanged, fireComponentToggleEvent, fireGuiToggleEvent, firePotentialAttributesChanged, fireUpdateEvent, getAttributeManager, getConsumerTypes, getCurrentFile, getDefaultFormat, getFormats, getLocks, getLogger, getName, getProducerTypes, getSerializePriority, getSimpleName, getUpdateOn, getUpdateParts, getVisibleConsumerTypes, getVisibleProducerTypes, getWorkspace, getWorkspaceComponentListeners, hasChangedSinceLastSave, isGuiOn, removeAttributeListener, removeWorkspaceComponentListener, setChangedSinceLastSave, setCurrentFile, setGuiOn, setLogger, setName, setSerializePriority, setUpdateOn, setWorkspace, stopped, toString
AttributeType xLocationType
AttributeType yLocationType
AttributeType turningType
AttributeType straightMovementType
AttributeType absoluteMovementType
AttributeType smellSensorScalars
AttributeType smellSensorVectors
AttributeType tileSensorType
AttributeType speechEffectorType
AttributeType hearingSensorType
public OdorWorldComponent(java.lang.String name)
name
- public OdorWorldComponent(java.lang.String name, OdorWorld world)
name
- name of worldworld
- model worldpublic java.util.List<PotentialConsumer> getPotentialConsumers()
WorkspaceComponent
getPotentialConsumers
in class WorkspaceComponent
public java.util.List<PotentialProducer> getPotentialProducers()
WorkspaceComponent
getPotentialProducers
in class WorkspaceComponent
public static OdorWorldComponent open(java.io.InputStream input, java.lang.String name, java.lang.String format)
input
- name
- format
- public java.lang.String getXML()
WorkspaceComponent
getXML
in class WorkspaceComponent
public void save(java.io.OutputStream output, java.lang.String format)
save
in class WorkspaceComponent
output
- the stream of data to write the data to.format
- a key used to define the requested format.public java.lang.String getKeyFromObject(java.lang.Object object)
WorkspaceComponent
getKeyFromObject
in class WorkspaceComponent
object
- object which should be associated with a keypublic java.lang.Object getObjectFromKey(java.lang.String objectKey)
WorkspaceComponent
getObjectFromKey
in class WorkspaceComponent
objectKey
- String keypublic void closing()
WorkspaceComponent
closing
in class WorkspaceComponent
public void update()
WorkspaceComponent
update
in class WorkspaceComponent
public OdorWorld getWorld()