feud.testgame.gui
Class Label

java.lang.Object
  extended byfeud.testgame.gui.GUIComponent
      extended byfeud.testgame.gui.Label

public class Label
extends GUIComponent

A simple label component for displaying text in the GUI.


Field Summary
 
Fields inherited from class feud.testgame.gui.GUIComponent
visible
 
Constructor Summary
Label(int xpos, int ypos)
          Creates a new label at the given position (top left corner).
 
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.
 void setText(java.lang.String text)
          Sets the text of the label.
 
Methods inherited from class feud.testgame.gui.GUIComponent
add, getParent, getParentX, getParentY, getX, getY, isVisible, setVisible, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Label

public Label(int xpos,
             int ypos)
Creates a new label at the given position (top left corner).

Parameters:
xpos - the x-position
ypos - the y-position
Method Detail

setText

public void setText(java.lang.String text)
Sets the text of the label.

Parameters:
text - the text

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 events
keyMapper - 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