sdljavax.gui
Class Container

java.lang.Object
  extended by sdljavax.gui.Widget
      extended by sdljavax.gui.Container
All Implemented Interfaces:
java.util.EventListener, SDLEventListener
Direct Known Subclasses:
Window

public abstract class Container
extends Widget

A Container is a Widget that can contain other Widgets.

Version:
$Id: Container.java,v 1.3 2005/02/10 04:20:18 ivan_ganza Exp $
Author:
Ivan Z. Ganza

Field Summary
protected  java.util.List children
           
protected  Widget mouseFocus
           
protected  SDLRect screenDimensions
           
 
Fields inherited from class sdljavax.gui.Widget
backgroundTexture, border, container, defaultFont, drawBorder, height, name, visible, width, xPos, yPos
 
Constructor Summary
Container(GL gl, java.lang.String name, SDLRect rect, SDLRect screenDimensions)
           
 
Method Summary
 void add(int index, Widget w)
           
 void add(Widget w)
           
 void draw(GL gl)
          Describe draw method here.
 void handleEvent(SDLEvent event)
          Describe handleEvent method here.
 void remove(Widget w)
           
 void setMouseFocus(Widget w)
           
 
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
 

Field Detail

children

protected java.util.List children

mouseFocus

protected Widget mouseFocus

screenDimensions

protected SDLRect screenDimensions
Constructor Detail

Container

public Container(GL gl,
                 java.lang.String name,
                 SDLRect rect,
                 SDLRect screenDimensions)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

add

public void add(Widget w)

add

public void add(int index,
                Widget w)

remove

public void remove(Widget w)

draw

public void draw(GL gl)
Description copied from class: Widget
Describe draw method here.

Overrides:
draw in class Widget
Parameters:
gl - a GL 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

setMouseFocus

public void setMouseFocus(Widget w)