fr.emn.reactiveinput.devices
Class DSwGhost
java.lang.Object
fr.emn.reactiveinput.AbstractDevice
fr.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
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 |
id
public final In id
image
public final Out image
pos_x
public final Out pos_x
pos_y
public final Out pos_y
DSwGhost
public DSwGhost()
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.