|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.emn.reactiveinput.AbstractDevice fr.emn.reactiveinput.AbstractMutableDevice fr.emn.reactiveinput.devices.DTablet fr.emn.reactiveinput.devices.DWintabTablet
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 |
public DWintabTablet(java.lang.String name, TabletDevice tablet)
Method Detail |
public Processor open(OpenContext opencontext)
Device
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.
open
in interface Device
open
in class AbstractDevice
Processor
,
Device.open()
public void close()
Device
Deallocate resources here.
close
in interface Device
close
in class AbstractDevice
public Device copy()
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.
copy
in interface Device
copy
in class AbstractDevice
public void setDisplay(DisplaysEnum d)
public DisplaysEnum getDisplay()
public int getFrequency()
public void setFrequency(int newFrequency)
public boolean getScreenCoordinates()
public void setScreenCoordinates(boolean value)
public boolean getDisableSystem()
public void setDisableSystem(boolean newDisableSystem)
public boolean getRoundCoordinates()
public void setRoundCoordinates(boolean value)
public boolean getNormalizePressure()
public void setNormalizePressure(boolean value)
public void mutate()
mutate
in interface MutableDevice
mutate
in class AbstractMutableDevice
protected void updateSlotTypeAndScale(Out slot, int dimension, fr.emn.reactiveinput.devices.DWintabTablet.Scale scale)
public Slot[] getMutationTriggers()
AbstractMutableDevice
getMutationTriggers
in interface MutableDevice
getMutationTriggers
in class AbstractMutableDevice
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |