de.esw.eengine.renderable.wtk
Class Desktop

java.lang.Object
  extended by de.esw.eengine.renderable.wtk.Desktop
All Implemented Interfaces:
IUpdateable

public final class Desktop
extends java.lang.Object
implements IUpdateable

This defines a desktop which handles the WTK state. All event processing is done here. All event which WTK does not consume are dispatched to the desktops event listeners.
Therefore if a desktop is created event listeners should be attached to it instead of the IRenderDevice.

Since:
1.0
Version:
$Id: Desktop.java 209 2005-07-23 00:39:50Z markusw $
Author:
markusw

Constructor Summary
Desktop(Core core)
           
 
Method Summary
 void add(Component c)
           
 void addKeyboardListener(AbstractKeyboardListener l)
           
 void addMouseListener(AbstractMouseListener l)
           
 Component getComponentAt(java.awt.Point p)
           
 java.util.Vector<Component> getComponents()
           
 FocusManager getFocusManager()
           
 void remoeKeyboardListener(AbstractKeyboardListener l)
           
 void remove(Component c)
           
 void removeMouseListener(AbstractMouseListener l)
           
 void render(IRenderDevice renderDevice)
           
 void update(float delta)
          Processes the event queue and handles events
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Desktop

public Desktop(Core core)
        throws EEngineException
Parameters:
core - Core to create desktop for
Throws:
EEngineException - Thrown if unable to create IInputDevices
Method Detail

update

public void update(float delta)
Processes the event queue and handles events

Specified by:
update in interface IUpdateable
Parameters:
delta - Time in millis since last update
See Also:
IUpdateable.update(float)

render

public void render(IRenderDevice renderDevice)
Parameters:
renderDevice - IRenderDevice to render onto

add

public void add(Component c)
Parameters:
c - Component to add

remove

public void remove(Component c)
Parameters:
c - Component to remove

getComponents

public final java.util.Vector<Component> getComponents()
Returns:
Returns the components.

getComponentAt

public Component getComponentAt(java.awt.Point p)
Parameters:
p - Point to lookup
Returns:
Desktop Component under the mouse cursor

getFocusManager

public final FocusManager getFocusManager()
Returns:
Returns the focusManager.

addMouseListener

public void addMouseListener(AbstractMouseListener l)
Parameters:
l - The listener to add

removeMouseListener

public void removeMouseListener(AbstractMouseListener l)
Parameters:
l - The listener to remove

addKeyboardListener

public void addKeyboardListener(AbstractKeyboardListener l)
Parameters:
l - The listener to add

remoeKeyboardListener

public void remoeKeyboardListener(AbstractKeyboardListener l)
Parameters:
l - The listener to remove