org.exolab.castor.builder.util
Class ConsoleDialog

java.lang.Object
  extended byorg.exolab.castor.builder.util.ConsoleDialog

public class ConsoleDialog
extends java.lang.Object

A simple utility class to handle command line dialogs

Author:
Nathan Green, Keith Visco

Constructor Summary
ConsoleDialog()
          Creates a new Console Dialog
 
Method Summary
 boolean confirm(java.lang.String message)
          Presents a confirmation prompt with the given message
 char confirm(java.lang.String message, java.lang.String values)
          Presents a confirmation prompt for values with the given messge.
 char confirm(java.lang.String message, java.lang.String values, java.lang.String help)
          Presents a confirmation prompt for values with the given messge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleDialog

public ConsoleDialog()
Creates a new Console Dialog

Method Detail

confirm

public boolean confirm(java.lang.String message)
Presents a confirmation prompt with the given message

Returns:
true if the user has selected a positive confirmation, otherwise false

confirm

public char confirm(java.lang.String message,
                    java.lang.String values)
Presents a confirmation prompt for values with the given messge.

Parameters:
message - the confirmation prompt to display
values - a list of valid characters to accept
Returns:
whatever character the user presses

confirm

public char confirm(java.lang.String message,
                    java.lang.String values,
                    java.lang.String help)
Presents a confirmation prompt for values with the given messge

Parameters:
message - the confirmation prompt to display
values - a list of valid characters to accept
help - a help message when the user presses '?'
Returns:
whatever character the user presses


Intalio Inc. (C) 1999-2001. All rights reserved http://www.intalio.com