org.exolab.castor.builder.util

Class ConsoleDialog

public class ConsoleDialog extends Object implements Dialog

A simple utility class to handle command line dialogs

Author: Nathan Green Keith Visco

Constructor Summary
ConsoleDialog()
Creates a new Console Dialog
Method Summary
booleanconfirm(String message)
Presents a confirmation prompt with the given message.
charconfirm(String message, String values)
Presents a confirmation prompt for values with the given messge.
charconfirm(String message, String values, String help)
Presents a confirmation prompt for values with the given messge
voidnotify(String message)
Displays the given message to the user.

Constructor Detail

ConsoleDialog

public ConsoleDialog()
Creates a new Console Dialog

Method Detail

confirm

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

Parameters: message, the confirmation prompt message to display

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

confirm

public char confirm(String message, 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(String message, String values, 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

notify

public void notify(String message)
Displays the given message to the user. No input is returned from the user.

Parameters: message the message to display to the user

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