cib.cad.kernel
Interface InputDevice

All Known Implementing Classes:
AddMouseStrokeInputDevice, CmdLineDialogInputDevice, InputDeviceAdapter

public interface InputDevice

Represents a virtual Input device. An input device has an arbitrary number of listeners that are provided with (textual) user input. An input device can be enabled or disabled. A disabled input device will not provide its listeners with input.

Version:
$Revision: 1684 $, $Author: svn-firmenich $, $Date: 2011-08-12 16:55:42 +0200 (Fri, 12 Aug 2011) $
Author:
Berthold Firmenich

Nested Class Summary
static interface InputDevice.Listener
           
 
Method Summary
 boolean addInputListener(InputDevice.Listener l)
          Adds an input listener to the virtual input device.
 boolean isEnabled()
          Determines whether this input device ist enabled or diabled.
 boolean removeInputListener(InputDevice.Listener l)
          Removes an input listener from the virtual input device.
 void setEnabled(boolean enabled)
          Sets the virtual input device enabled or diabled.
 

Method Detail

addInputListener

boolean addInputListener(InputDevice.Listener l)
Adds an input listener to the virtual input device.

Parameters:
l - the input listener to be added
Returns:
false if the listener was already registered, true otherwise

removeInputListener

boolean removeInputListener(InputDevice.Listener l)
Removes an input listener from the virtual input device.

Parameters:
l - the input listener to be removed
Returns:
false if the listener was not registered, true otherwise

setEnabled

void setEnabled(boolean enabled)
Sets the virtual input device enabled or diabled. A disabled input device will not provide its listeners with input.

Parameters:
enabled - true to enable, false to diable

isEnabled

boolean isEnabled()
Determines whether this input device ist enabled or diabled.

Returns:
true if enabled, false if diabled