org.placelab.util.swt
Class QuestionBox
java.lang.Object
org.eclipse.swt.widgets.Dialog
org.placelab.util.swt.QuestionBox
- public class QuestionBox
- extends org.eclipse.swt.widgets.Dialog
|
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 |
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
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
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.