feud.testgame.gui
Class Window
java.lang.Object
feud.testgame.gui.GUIComponent
feud.testgame.gui.Window
- public class Window
- extends GUIComponent
A window component. A window can contain other components as a kind of master container and it can be dragged around with the mouse.
As all components in this "toolkit", the window doesn't render itself in a generic way. Its visuals are defined by a texture.
Constructor Summary |
Window(com.threed.jpct.Texture backDrop,
int x,
int y)
Creates a new window. |
Method Summary |
void |
draw(com.threed.jpct.FrameBuffer buffer)
Draws this component and all of its childs. |
boolean |
evaluateInput(MouseMapper mouse,
com.threed.jpct.util.KeyMapper keyMapper)
Processes key and mouse events in the context of this component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Window
public Window(com.threed.jpct.Texture backDrop,
int x,
int y)
throws java.lang.Exception
- Creates a new window.
- Parameters:
backDrop
- the texture that defines how the window looks like.x
- the x-position of the upper left corner.y
- the y-position of the upper left corner.
- Throws:
java.lang.Exception
evaluateInput
public boolean evaluateInput(MouseMapper mouse,
com.threed.jpct.util.KeyMapper keyMapper)
- Description copied from class:
GUIComponent
- Processes key and mouse events in the context of this component. It then continues processing
on the child components until the event got comsumed by one or the last child has been processed.
- Overrides:
evaluateInput
in class GUIComponent
- Parameters:
mouse
- the MouseMapper used to process mouse eventskeyMapper
- the KeyMapper used to process key events
- Returns:
- boolean true, if an event occured in the context of this component or one of its child components.
draw
public void draw(com.threed.jpct.FrameBuffer buffer)
- Description copied from class:
GUIComponent
- Draws this component and all of its childs. Drawing in this "toolkit" is limited to label and
text rendering. Rendering the actual component isn't done by this toolkit, but can be added easily.
- Overrides:
draw
in class GUIComponent
- Parameters:
buffer
- the FrameBuffer on which to draw to