VASSAL.build.module.map
Class ForwardToChatter

java.lang.Object
  |
  +--VASSAL.build.module.map.ForwardToChatter
All Implemented Interfaces:
Buildable, java.util.EventListener, java.awt.event.KeyListener

public class ForwardToChatter
extends java.lang.Object
implements Buildable, java.awt.event.KeyListener

This KeyListener forwards key event from a Map to the Chatter The event is forwarded only if not consumed

See Also:
Chatter.keyCommand(javax.swing.KeyStroke), InputEvent.isConsumed()

Constructor Summary
ForwardToChatter()
           
 
Method Summary
 void add(Buildable b)
          Adds a child component.
 void addTo(Buildable parent)
          Adds this component to its parent.
 void build(org.w3c.dom.Element e)
          Build the object
 org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForwardToChatter

public ForwardToChatter()
Method Detail

build

public void build(org.w3c.dom.Element e)
Description copied from interface: Buildable
Build the object

Specified by:
build in interface Buildable
Parameters:
e - the XML element containing the object data

addTo

public void addTo(Buildable parent)
Description copied from interface: Buildable
Adds this component to its parent. In order to make Buildable objects extensible, the child is reponsible for adding itself to the parent. That way, Buildable subcomponents can be defined in an extension package without needing to modify the containing class.

Specified by:
addTo in interface Buildable

add

public void add(Buildable b)
Description copied from interface: Buildable
Adds a child component. Both this method and Buildable.addTo(VASSAL.build.Buildable) are invoked when adding a child to a parent

Specified by:
add in interface Buildable

getBuildElement

public org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
Specified by:
getBuildElement in interface Buildable
Returns:
an XML element from which this component can be built

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener