org.acm.seguin.awt
Class Question

java.lang.Object
  extended by org.acm.seguin.awt.Question

public class Question
extends java.lang.Object

Asks the user a yes no question. Has the capability of automatically answering yes for junit tests.

Author:
Chris Seguin

Constructor Summary
Question()
           
 
Method Summary
static boolean isYes(java.lang.String title, java.lang.String question)
          Asks the user a question and returns true if the answer is yes
static void setAlwaysYes(boolean way)
          Determines if we should always answer yes to any question
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Question

public Question()
Method Detail

setAlwaysYes

public static void setAlwaysYes(boolean way)
Determines if we should always answer yes to any question

Parameters:
way - true if we should always answer yes

isYes

public static boolean isYes(java.lang.String title,
                            java.lang.String question)
Asks the user a question and returns true if the answer is yes

Parameters:
title - The title of the message displayed to the user
question - The question that we asked of the user
Returns:
true if they answered yes