wabadma.ui
Class Dialog

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--waba.ui.Container
              |
              +--wabadma.ui.Dialog

public class Dialog
extends waba.ui.Container

A waba control that displays a dialog box with a single OK button.

Version:
0.3, 2000 Nov 23 - added a postEvent of PRESSED when OK is hit.
Author:
David M. Archer

Field Summary
 OutputBox out
           
 
Fields inherited from class waba.ui.Container
children, tail
 
Fields inherited from class waba.ui.Control
height, next, parent, prev, width, x, y
 
Constructor Summary
Dialog(java.lang.String title, int x, int y, int w, int h)
          Create an empty Dialog box of the given metrics with the given title in a default font.
Dialog(java.lang.String title, int x, int y, int w, int h, waba.fx.Font font)
          Create an empty titled Dialog box of the given metrics using the given font.
Dialog(java.lang.String title, int x, int y, int w, int h, java.lang.String text)
          Create a Dialog box of the given metrics with the given title in a default font with the given text.
Dialog(java.lang.String title, int x, int y, int w, int h, java.lang.String[] sa)
          Create a Dialog box of the given metrics with the given title in a default font with the pre-formatted text given as a String[].
Dialog(java.lang.String title, int x, int y, int w, int h, java.lang.String text, boolean centered)
          Create a Dialog box of the given metrics with the given title in a default font with the given text centered or not.
 
Method Summary
 boolean isActive()
          Return true if the Dialog is currently displayed.
 void onEvent(waba.ui.Event e)
           
 void onPaint(waba.fx.Graphics g)
           
 
Methods inherited from class waba.ui.Container
add, findChild, paintChildren, remove
 
Methods inherited from class waba.ui.Control
addTimer, contains, createGraphics, getFontMetrics, getNext, getParent, getRect, postEvent, removeTimer, repaint, setRect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public OutputBox out
Constructor Detail

Dialog

public Dialog(java.lang.String title,
              int x,
              int y,
              int w,
              int h,
              waba.fx.Font font)
Create an empty titled Dialog box of the given metrics using the given font.

Dialog

public Dialog(java.lang.String title,
              int x,
              int y,
              int w,
              int h)
Create an empty Dialog box of the given metrics with the given title in a default font.

Dialog

public Dialog(java.lang.String title,
              int x,
              int y,
              int w,
              int h,
              java.lang.String text,
              boolean centered)
Create a Dialog box of the given metrics with the given title in a default font with the given text centered or not.

Dialog

public Dialog(java.lang.String title,
              int x,
              int y,
              int w,
              int h,
              java.lang.String text)
Create a Dialog box of the given metrics with the given title in a default font with the given text.

Dialog

public Dialog(java.lang.String title,
              int x,
              int y,
              int w,
              int h,
              java.lang.String[] sa)
Create a Dialog box of the given metrics with the given title in a default font with the pre-formatted text given as a String[].
Method Detail

isActive

public boolean isActive()
Return true if the Dialog is currently displayed.

onPaint

public void onPaint(waba.fx.Graphics g)
Overrides:
onPaint in class waba.ui.Control

onEvent

public void onEvent(waba.ui.Event e)
Overrides:
onEvent in class waba.ui.Control