feud.testgame.gui
Class Button

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

public class Button
extends GUIComponent


Field Summary
 
Fields inherited from class feud.testgame.gui.GUIComponent
visible
 
Constructor Summary
Button(int xpos, int ypos, int xdim, int ydim)
           
 
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 setHideLabel(boolean hide)
           
 void setLabel(java.lang.String label)
           
 void setListener(GUIListener bl)
           
 
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

Button

public Button(int xpos,
              int ypos,
              int xdim,
              int ydim)
Method Detail

setHideLabel

public void setHideLabel(boolean hide)

setLabel

public void setLabel(java.lang.String label)

setListener

public void setListener(GUIListener bl)

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