sdljavax.gui
Class Button

java.lang.Object
  extended by sdljavax.gui.Widget
      extended by sdljavax.gui.Button
All Implemented Interfaces:
java.util.EventListener, SDLEventListener

public class Button
extends Widget

Describe class Button here.

Version:
$Id: Button.java,v 1.2 2005/01/31 03:16:55 ivan_ganza Exp $
Author:
Ivan Z. Ganza

Field Summary
protected  Texture selectedTexture
           
protected  Texture unSelectedTexture
           
 
Fields inherited from class sdljavax.gui.Widget
backgroundTexture, border, container, defaultFont, drawBorder, height, name, visible, width, xPos, yPos
 
Constructor Summary
Button(GL gl, java.lang.String name, SDLRect dimensions, java.lang.String unSelectedTexturePath, java.lang.String selectedTexturePath)
           
 
Method Summary
 void draw(GL gl, int x, int y)
          Draw myself at the given co-ordinates
 void handleEvent(SDLEvent event)
          Describe handleEvent method here.
 void mouseEntered()
           
 void mouseExit()
           
 
Methods inherited from class sdljavax.gui.Widget
contains, contains, draw, getBackgroundTexture, getHeight, getName, getWidth, getX, getY, hide, isVisible, setBackgroundTexture, setHeight, setName, setWidth, setX, setY, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unSelectedTexture

protected Texture unSelectedTexture

selectedTexture

protected Texture selectedTexture
Constructor Detail

Button

public Button(GL gl,
              java.lang.String name,
              SDLRect dimensions,
              java.lang.String unSelectedTexturePath,
              java.lang.String selectedTexturePath)
       throws java.io.IOException
Throws:
java.io.IOException
Method Detail

mouseEntered

public void mouseEntered()
Overrides:
mouseEntered in class Widget

mouseExit

public void mouseExit()
Overrides:
mouseExit in class Widget

handleEvent

public void handleEvent(SDLEvent event)
Description copied from class: Widget
Describe handleEvent method here.

Specified by:
handleEvent in interface SDLEventListener
Overrides:
handleEvent in class Widget
Parameters:
event - a SDLEvent value

draw

public void draw(GL gl,
                 int x,
                 int y)
Description copied from class: Widget
Draw myself at the given co-ordinates

Overrides:
draw in class Widget
Parameters:
gl - a GL value
x - an int value
y - an int value