sdljavax.gui

Class ListBox

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

Field Summary
intfirstVisibleRow
Listitems
floatlineHeight
intselectedRow
Constructor Summary
ListBox(GL gl, String name, SDLRect dimensions, String backgroundTexture)
Construct a new ListBox.
Method Summary
voidadd(String i)
Add an item to the list box
voiddraw(GL gl, int x, int y)
ListgetItems()
voidhandleEvent(SDLEvent event)
voidhandleMouseMotionEvent(SDLMouseMotionEvent motionEvent)
intwhichRow(int y)

Field Detail

firstVisibleRow

int firstVisibleRow

items

List items

lineHeight

float lineHeight

selectedRow

int selectedRow

Constructor Detail

ListBox

public ListBox(GL gl, String name, SDLRect dimensions, String backgroundTexture)
Construct a new ListBox. Uses the defaultFont to display items.

Parameters: font a FTFont value

Method Detail

add

public void add(String i)
Add an item to the list box

Parameters: i a String value

draw

public void draw(GL gl, int x, int y)

getItems

public List getItems()

handleEvent

public void handleEvent(SDLEvent event)

handleMouseMotionEvent

public void handleMouseMotionEvent(SDLMouseMotionEvent motionEvent)

whichRow

public int whichRow(int y)