java.lang.Object
com.tuneology.irremote.LircComponent
- All Implemented Interfaces:
- IRComponent
- public class LircComponent
- extends java.lang.Object
- implements IRComponent
A high-level interface to Linux Infrared Remote Control. The
application instantiates a LircComponent object and registers
listeners with it.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lircThread
private java.lang.Thread lircThread
client
private LircClient client
cmdMap
private java.util.HashMap cmdMap
actionMap
private java.util.HashMap actionMap
listeners
private java.util.Vector listeners
allEventListeners
private java.util.Vector allEventListeners
LircComponent
public LircComponent(java.lang.String arg)
throws java.io.IOException
- Create a component that listens for IR events and dispatches actions.
addActionListener
public void addActionListener(javax.swing.AbstractAction listener)
- Add a callback for an IR command. The command corresponding to the
action is stored in the IR_BINDING value of the listener.
- Specified by:
addActionListener in interface IRComponent
removeActionListener
public void removeActionListener(javax.swing.AbstractAction listener)
- Specified by:
removeActionListener in interface IRComponent
getListener
public javax.swing.AbstractAction getListener(java.lang.String action)
- Description copied from interface:
IRComponent
- Returns the listener registered to receive the specified action.
- Specified by:
getListener in interface IRComponent
getListeners
public java.util.Vector getListeners()
- Description copied from interface:
IRComponent
- Returns a vector of all event listeners.
- Specified by:
getListeners in interface IRComponent
getAllEventListeners
public java.util.Vector getAllEventListeners()
getCommands
public java.lang.String[] getCommands()
- Description copied from interface:
IRComponent
- Returns an array of all the possible IR commands.
- Specified by:
getCommands in interface IRComponent
contains
public boolean contains(javax.swing.AbstractAction listener)
- Description copied from interface:
IRComponent
- Returns true if the listener is registered.
- Specified by:
contains in interface IRComponent
getIrwCmd
public java.lang.String getIrwCmd()
getConfigPath
public java.lang.String getConfigPath()
setConfigPath
public void setConfigPath(java.lang.String p)
scanEvents
private void scanEvents()
throws java.io.IOException
init
private void init()
notifyActionListeners
private void notifyActionListeners(java.lang.String evt)