fr.emn.reactiveinput.devices
Class DAWTKeyboard

java.lang.Object
  extended byfr.emn.reactiveinput.AbstractDevice
      extended byfr.emn.reactiveinput.devices.DAWTKeyboard
All Implemented Interfaces:
java.awt.event.AWTEventListener, Device, java.util.EventListener, Processor

public class DAWTKeyboard
extends AbstractDevice
implements java.awt.event.AWTEventListener


Field Summary
 Out alt
           
 Out backspace
           
 Out capslock
           
 Out control
           
 Out delete
           
 Out down
           
 Out end
           
 Out enter
           
 Out escape
           
 Out f1
           
 Out f10
           
 Out f2
           
 Out f3
           
 Out f4
           
 Out f5
           
 Out f6
           
 Out f7
           
 Out f8
           
 Out f9
           
 Out home
           
 Out insert
           
 Out keypressed
           
 Out keyreleased
           
 Out left
           
 Out num0
           
 Out num1
           
 Out num2
           
 Out num3
           
 Out num4
           
 Out num5
           
 Out num6
           
 Out num7
           
 Out num8
           
 Out num9
           
 Out pagedown
           
 Out pageup
           
 Out right
           
 Out shift
           
 Out space
           
 Out tab
           
 Out up
           
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
DAWTKeyboard()
           
 
Method Summary
 void close()
          Add closing code here if needed.
 void doDisable()
          Add device disabling code here (does nothing by default).
 void eventDispatched(java.awt.AWTEvent e)
          Warning: this method must be thread-safe !
 boolean getDisableSystem()
           
 Out getOut(int key)
           
 boolean hasExternalInput()
          Specifies whether this device has external (implicit) input or not.
 void init()
          Initialize all to false
 Processor open(OpenContext context)
          Check DirectMouse also.
 void setDisableSystem(boolean newDisableSystem)
           
 void update()
          Updates device's output values.
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, copy, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, setEnabled, setInfo, setInfo, setLastError, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keypressed

public final Out keypressed

keyreleased

public final Out keyreleased

shift

public final Out shift

alt

public final Out alt

control

public final Out control

capslock

public final Out capslock

down

public final Out down

up

public final Out up

left

public final Out left

right

public final Out right

insert

public final Out insert

delete

public final Out delete

home

public final Out home

end

public final Out end

pageup

public final Out pageup

pagedown

public final Out pagedown

space

public final Out space

enter

public final Out enter

tab

public final Out tab

escape

public final Out escape

backspace

public final Out backspace

num0

public final Out num0

num1

public final Out num1

num2

public final Out num2

num3

public final Out num3

num4

public final Out num4

num5

public final Out num5

num6

public final Out num6

num7

public final Out num7

num8

public final Out num8

num9

public final Out num9

f1

public final Out f1

f2

public final Out f2

f3

public final Out f3

f4

public final Out f4

f5

public final Out f5

f6

public final Out f6

f7

public final Out f7

f8

public final Out f8

f9

public final Out f9

f10

public final Out f10
Constructor Detail

DAWTKeyboard

public DAWTKeyboard()
Method Detail

close

public void close()
Description copied from class: AbstractDevice
Add closing code here if needed.

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

eventDispatched

public void eventDispatched(java.awt.AWTEvent e)
Warning: this method must be thread-safe !

Specified by:
eventDispatched in interface java.awt.event.AWTEventListener

getOut

public Out getOut(int key)

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

open

public Processor open(OpenContext context)
Check DirectMouse also.

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

doDisable

public void doDisable()
Description copied from class: AbstractDevice
Add device disabling code here (does nothing by default).

Overrides:
doDisable in class AbstractDevice

init

public void init()
Initialize all to false

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()

setDisableSystem

public void setDisableSystem(boolean newDisableSystem)

getDisableSystem

public boolean getDisableSystem()