org.placelab.util.swt
Class QuestionBox

java.lang.Object
  extended byorg.eclipse.swt.widgets.Dialog
      extended byorg.placelab.util.swt.QuestionBox

public class QuestionBox
extends org.eclipse.swt.widgets.Dialog


Nested Class Summary
static class QuestionBox.QuestionPackage
           
 
Field Summary
protected  java.util.Hashtable answers
           
protected  int buttonChosen
           
protected  java.lang.String[] buttons
           
protected  java.lang.String message
           
protected  java.util.Vector questions
           
protected  java.util.Vector responseBoxes
           
protected  boolean submit
           
 
Constructor Summary
QuestionBox(org.eclipse.swt.widgets.Shell parent, java.util.Vector questions, java.lang.String msg)
          Questions are a Vector of QuestionBox.QuestionPackages that you want to ask
 
Method Summary
 int getButtonChosen()
           
 java.lang.Object open()
          Returns a Hashtable where questions key to answers.
 void setButtons(java.lang.String[] buttonNames)
          Before calling open(), you may set the buttons names.
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

questions

protected java.util.Vector questions

responseBoxes

protected java.util.Vector responseBoxes

submit

protected boolean submit

message

protected java.lang.String message

answers

protected java.util.Hashtable answers

buttons

protected java.lang.String[] buttons

buttonChosen

protected int buttonChosen
Constructor Detail

QuestionBox

public QuestionBox(org.eclipse.swt.widgets.Shell parent,
                   java.util.Vector questions,
                   java.lang.String msg)
Questions are a Vector of QuestionBox.QuestionPackages that you want to ask

Method Detail

setButtons

public void setButtons(java.lang.String[] buttonNames)
Before calling open(), you may set the buttons names. The last button in the array will be the default button. Call getButtonChosen after open() returns to get the index of the chosen button.


getButtonChosen

public int getButtonChosen()

open

public java.lang.Object open()
Returns a Hashtable where questions key to answers.