fr.emn.reactiveinput.devices
Class DWintabTablet

java.lang.Object
  extended byfr.emn.reactiveinput.AbstractDevice
      extended byfr.emn.reactiveinput.AbstractMutableDevice
          extended byfr.emn.reactiveinput.devices.DTablet
              extended byfr.emn.reactiveinput.devices.DWintabTablet
All Implemented Interfaces:
Device, MutableDevice, Processor

public class DWintabTablet
extends DTablet


Field Summary
 
Fields inherited from class fr.emn.reactiveinput.devices.DTablet
pressure, x, y
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
DWintabTablet(java.lang.String name, TabletDevice tablet)
          Constructor
 
Method Summary
 void close()
          Closes the device.
 Device copy()
          Returns a new device with the same functionalities, or null if the device is not copiable (static device).
 boolean getDisableSystem()
           
 DisplaysEnum getDisplay()
           
 int getFrequency()
           
 Slot[] getMutationTriggers()
          Returns the mutation triggers for this mutable device, i.e. all input or output slots that trigger a mutation when it is connected to another type.
 boolean getNormalizePressure()
           
 boolean getRoundCoordinates()
           
 boolean getScreenCoordinates()
           
 void mutate()
          Update output types (integer/double) & late scale processing
 Processor open(OpenContext opencontext)
          Ensures that the device will be ready for processing or producing data, and returns the Processor object that will process data, or null if an error occured.
 void setDisableSystem(boolean newDisableSystem)
           
 void setDisplay(DisplaysEnum d)
           
 void setFrequency(int newFrequency)
           
 void setNormalizePressure(boolean value)
           
 void setRoundCoordinates(boolean value)
           
 void setScreenCoordinates(boolean value)
           
protected  void updateSlotTypeAndScale(Out slot, int dimension, fr.emn.reactiveinput.devices.DWintabTablet.Scale scale)
           
 
Methods inherited from class fr.emn.reactiveinput.devices.DTablet
hasExternalInput
 
Methods inherited from class fr.emn.reactiveinput.AbstractMutableDevice
addMutableIn, addMutableIn, addMutableIn, addMutableOut, addMutableOut, remove
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, init, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, setEnabled, setInfo, setInfo, setLastError, setName, update
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.emn.reactiveinput.Device
getError, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, isCopiable, isOpenable, setEnabled
 

Constructor Detail

DWintabTablet

public DWintabTablet(java.lang.String name,
                     TabletDevice tablet)
Constructor

Method Detail

open

public Processor open(OpenContext opencontext)
Description copied from interface: Device
Ensures that the device will be ready for processing or producing data, and returns the Processor object that will process data, or null if an error occured.

Some devices may need to perform some more or less heavy initialization (such as allocating resources or opening a stream) before being able to process or produce data. This is the case for most input devices, and some I/O and output devices. All these initializations must be done in the open() method.

Because these initializations are subject to fail, open() may return null even if isOpenable() returns true. In all cases, returning a non-null Processor means that the device is now able to process or produce data.

RE-OPENING A DEVICE:

Devices always stay open during reconfiguration, in order to avoid unnecessary deallocation and reallocation of resources. However, some devices will need to be re-open before re-starting the configuration. So open() is always called on all devices before re-starting.

If open() is called on a device that is already open, it may have no effect (and the current Processor is returned), or the device may be re-open if something has changed in its configuration.

Using a Processor as a return value allows the use of different processors, each adapted to a specific device configuration.

Specified by:
open in interface Device
Overrides:
open in class AbstractDevice
See Also:
Processor, Device.open()

close

public void close()
Description copied from interface: Device
Closes the device. Called when the device is not used any more.

Deallocate resources here.

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

copy

public Device copy()
Description copied from interface: Device
Returns a new device with the same functionalities, or null if the device is not copiable (static device).

If your device has a no-arg contructor, use the default copy method provided in DeviceUtilities class.

Note: the copied device must return the same original prototype as the source device. See getPrototype() and setPrototype() methods in DeviceUtilities.

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

setDisplay

public void setDisplay(DisplaysEnum d)

getDisplay

public DisplaysEnum getDisplay()

getFrequency

public int getFrequency()

setFrequency

public void setFrequency(int newFrequency)

getScreenCoordinates

public boolean getScreenCoordinates()

setScreenCoordinates

public void setScreenCoordinates(boolean value)

getDisableSystem

public boolean getDisableSystem()

setDisableSystem

public void setDisableSystem(boolean newDisableSystem)

getRoundCoordinates

public boolean getRoundCoordinates()

setRoundCoordinates

public void setRoundCoordinates(boolean value)

getNormalizePressure

public boolean getNormalizePressure()

setNormalizePressure

public void setNormalizePressure(boolean value)

mutate

public void mutate()
Update output types (integer/double) & late scale processing

Specified by:
mutate in interface MutableDevice
Specified by:
mutate in class AbstractMutableDevice

updateSlotTypeAndScale

protected void updateSlotTypeAndScale(Out slot,
                                      int dimension,
                                      fr.emn.reactiveinput.devices.DWintabTablet.Scale scale)

getMutationTriggers

public Slot[] getMutationTriggers()
Description copied from class: AbstractMutableDevice
Returns the mutation triggers for this mutable device, i.e. all input or output slots that trigger a mutation when it is connected to another type.

Specified by:
getMutationTriggers in interface MutableDevice
Specified by:
getMutationTriggers in class AbstractMutableDevice