fr.emn.reactiveinput.devices
Class DSwGhost

java.lang.Object
  extended byfr.emn.reactiveinput.AbstractDevice
      extended byfr.emn.reactiveinput.devices.DSwGhost
All Implemented Interfaces:
Device, Processor

public class DSwGhost
extends AbstractDevice

Author:
Pierre To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Field Summary
 In id
           
 Out image
           
 Out pos_x
           
 Out pos_y
           
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
DSwGhost()
           
 
Method Summary
protected  void createImage(java.awt.Component c, fr.emn.reactiveinput.devices.DSwGhost.Cancel cancel)
           
 boolean getAsynchronous()
           
 double getImageOpacity()
           
 java.awt.Color getOutlineColor()
           
 double getOutlineOpacity()
           
 int getOutlineWidth()
           
 java.awt.Color getShapeColor()
           
 double getShapeOpacity()
           
 boolean hasExternalInput()
          Specifies whether this device has external (implicit) input or not.
 void init()
          Initializes device's output values.
 void setAsynchronous(boolean asynchronous)
           
 void setImageOpacity(double imageOpacity)
           
 void setOutlineColor(java.awt.Color outlineColor)
           
 void setOutlineOpacity(double outlineOpacity)
           
 void setOutlineWidth(int outlineWidth)
           
 void setShapeColor(java.awt.Color shapeColor)
           
 void setShapeOpacity(double shapeOpacity)
           
 void update()
          Updates device's output values.
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, close, copy, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, open, setEnabled, setInfo, setInfo, setLastError, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public final In id

image

public final Out image

pos_x

public final Out pos_x

pos_y

public final Out pos_y
Constructor Detail

DSwGhost

public DSwGhost()
Method Detail

init

public void init()
Description copied from class: AbstractDevice
Initializes device's output values.

Subclass init() and update() methods if you want the device to process the data itself. Otherwise, subclass getProcessor() method to use extern processors. By default, this method calls update(). Subclass this method if you'd like to make a specific initialization routine.

Specified by:
init in interface Processor
Overrides:
init in class AbstractDevice
See Also:
Processor.init()

update

public void update()
Description copied from class: AbstractDevice
Updates device's output values.

Subclass init() and update() methods if you want the device to process the data itself. Otherwise, subclass getProcessor() method to use extern processors.

Specified by:
update in interface Processor
Overrides:
update in class AbstractDevice
See Also:
Processor.update()

createImage

protected void createImage(java.awt.Component c,
                           fr.emn.reactiveinput.devices.DSwGhost.Cancel cancel)

getImageOpacity

public double getImageOpacity()
Returns:
Returns the imageOpacity.

setImageOpacity

public void setImageOpacity(double imageOpacity)
Parameters:
imageOpacity - The imageOpacity to set.

getShapeOpacity

public double getShapeOpacity()
Returns:
Returns the shapeOpacity.

setShapeOpacity

public void setShapeOpacity(double shapeOpacity)
Parameters:
shapeOpacity - The shapeOpacity to set.

getShapeColor

public java.awt.Color getShapeColor()
Returns:
Returns the shapeColor.

setShapeColor

public void setShapeColor(java.awt.Color shapeColor)
Parameters:
shapeColor - The shapeColor to set.

getOutlineOpacity

public double getOutlineOpacity()
Returns:
Returns the outlineOpacity.

setOutlineOpacity

public void setOutlineOpacity(double outlineOpacity)
Parameters:
outlineOpacity - The outlineOpacity to set.

getOutlineColor

public java.awt.Color getOutlineColor()
Returns:
Returns the outlineColor.

setOutlineColor

public void setOutlineColor(java.awt.Color outlineColor)
Parameters:
outlineColor - The outlineColor to set.

getOutlineWidth

public int getOutlineWidth()
Returns:
Returns the outlineWidth.

setOutlineWidth

public void setOutlineWidth(int outlineWidth)
Parameters:
outlineWidth - The outlineWidth to set.

hasExternalInput

public boolean hasExternalInput()
Description copied from class: AbstractDevice
Specifies whether this device has external (implicit) input or not. Returns false by default.

Return false if the device is deterministic from the data & time points of view, i.e. if its output production only depend on the explicit input history (input slots) and device's initial configuration. This is the case of most of the processing devices.

Return true if output values not only depend on the values of input slots, or if output production takes undefined time. Examples of devices with external input are input peripherals and asynchronous devices.

This method is used by the reactive machine to determine if this device is triggered by its input slots, or if it must be triggered continuously (i.e. each tick). This method can also be used by the editor for the device's graphical representation.

Specified by:
hasExternalInput in interface Device
Overrides:
hasExternalInput in class AbstractDevice

getAsynchronous

public boolean getAsynchronous()
Returns:
Returns the asynchronous.

setAsynchronous

public void setAsynchronous(boolean asynchronous)
Parameters:
asynchronous - The asynchronous to set.