sdljavax.gui
Class Button
java.lang.Object
sdljavax.gui.Widget
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
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)
|
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 |
unSelectedTexture
protected Texture unSelectedTexture
selectedTexture
protected Texture selectedTexture
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
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
valuex
- an int
valuey
- an int
value