sdljavax.gui
Class ListBox
java.lang.Object
sdljavax.gui.Widget
sdljavax.gui.ListBox
- All Implemented Interfaces:
- java.util.EventListener, SDLEventListener
public class ListBox
- extends Widget
Describe class ListBox
here.
- Version:
- $Id: ListBox.java,v 1.1 2005/02/10 04:20:18 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 |
ListBox(GL gl,
java.lang.String name,
SDLRect dimensions,
java.lang.String backgroundTexture)
Construct a new ListBox. |
Methods inherited from class sdljavax.gui.Widget |
contains, contains, draw, getBackgroundTexture, getHeight, getName, getWidth, getX, getY, hide, isVisible, mouseEntered, mouseExit, 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 |
items
java.util.List items
selectedRow
int selectedRow
firstVisibleRow
int firstVisibleRow
lineHeight
float lineHeight
ListBox
public ListBox(GL gl,
java.lang.String name,
SDLRect dimensions,
java.lang.String backgroundTexture)
throws java.io.IOException
- Construct a new ListBox. Uses the defaultFont to display items.
- Parameters:
font
- a FTFont
value
- Throws:
java.io.IOException
add
public void add(java.lang.String i)
- Add an item to the list box
- Parameters:
i
- a String
value
getItems
public java.util.List getItems()
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
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
handleMouseMotionEvent
public void handleMouseMotionEvent(SDLMouseMotionEvent motionEvent)
whichRow
public int whichRow(int y)