All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.core.CommandLineConsole

java.lang.Object
   |
   +----com.sun.wizards.core.CommandLineConsole

public class CommandLineConsole
extends Object
implements AppConsole, Runnable
CommandLineConsole is the object that facilitates command line wizard operation by simulating a user pressing the "next" button until the wizard operation is complete.

The command line mode currently only works if the wizard requires no user input other than to traverse through the wizard.


Constructor Index

 o CommandLineConsole(WizardState)
Creates a CommandLineConsole with the specified WizardState object.

Method Index

 o callObjectMethod(Object, String, Class[], Object[])
Call an object method through reflection.
 o displayQuery(Object, String, String, String[], String[])
Display a query to the user.
 o displayQuery(Object, String, String[], String[])
Display a query to the user.
 o exit()
Exit the applet/application. Deprecated.
 o exit(int)
Exit the applet/application with the specified exit status.
 o getWizardSize()
Gets the size of the wizard frame.
 o getWizardState()
Returns the WizardState object for this console.
 o hasGUI()
The CommandLineConsole has no gui.
 o run()
Initialize the wizard console in a separate thread.
 o setFrameTitle(String)
Sets the title of the containing Frame.
 o setIconImage(Image)
Set the icon image of the wizard frame.
 o setWizardSize(Dimension)
Sets the size of the wizard frame.
 o setWizardState(WizardState)
Sets the WizardState object into this console.

Constructors

 o CommandLineConsole
 public CommandLineConsole(WizardState wizardState)
Creates a CommandLineConsole with the specified WizardState object.

Parameters:
wizardState - The connection to the server.

Methods

 o run
 public void run()
Initialize the wizard console in a separate thread. This frees the WizardState constructor. After initialization is complete, the panels in the client panel tree are traversed by this method automatically.

 o setFrameTitle
 public void setFrameTitle(String title)
Sets the title of the containing Frame. Since there is no title bar on a command line wizard, this method does nothing.

Parameters:
title - The title for this wizard.
 o setWizardState
 public void setWizardState(WizardState state)
Sets the WizardState object into this console.

Parameters:
state - The new WizardState.
 o getWizardState
 public WizardState getWizardState()
Returns the WizardState object for this console.

Returns:
The wizard state for this console.
 o exit
 public void exit()
Note: exit() is deprecated. Programs should now use exit(int).

Exit the applet/application.

 o exit
 public void exit(int status)
Exit the applet/application with the specified exit status. By convention, a non-zero status indicates abnormal termination. This method never returns.

Parameters:
status - The exit status.
 o displayQuery
 public void displayQuery(Object target,
                          String title,
                          String message,
                          String buttons[],
                          String methods[])
Display a query to the user. This method is provided to fulfill the AppConsole interface. This method currently fails silently.

Parameters:
target - The object to call when a selection from the dialog is made.
title - The title of the query
message - The message to be displayed to the user.
buttons - The buttons (button labels) offered to the user to select from.
methods - A list of methods (in the same order as the list of buttons) that will be called when a dialog selection is made.
 o displayQuery
 public void displayQuery(Object target,
                          String message,
                          String buttons[],
                          String methods[])
Display a query to the user. This method is provided to fulfill the AppConsole interface. This method currently fails silently.

Parameters:
target - The object to call when a selection from the dialog is made.
message - The message to be displayed to the user.
buttons - The buttons (button labels) offered to the user to select from.
methods - A list of methods (in the same order as the list of buttons) that will be called when a dialog selection is made.
 o callObjectMethod
 public Object callObjectMethod(Object target,
                                String methodName,
                                Class argTypes[],
                                Object args[])
Call an object method through reflection.

Parameters:
target - The object to call the method on.
methodName - The name of the method to call.
argTypes - The parameter list identifying the correct method.
args - The parameters to pass to the method.
Returns:
The method return value.
 o hasGUI
 public boolean hasGUI()
The CommandLineConsole has no gui. This method always returns false.

 o setIconImage
 public void setIconImage(Image icon)
Set the icon image of the wizard frame. Since this console has no GUI presence, this method does nothing.

Parameters:
icon - The icon image to be displayed.
 o setWizardSize
 public void setWizardSize(Dimension size)
Sets the size of the wizard frame. Since this console has no GUI presence, this method does nothing.

Parameters:
size - The new size for the wizard frame.
 o getWizardSize
 public Dimension getWizardSize()
Gets the size of the wizard frame. Since this console has no GUI presence, this method returns a size of 0 width and 0 height.


All Packages  Class Hierarchy  This Package  Previous  Next  Index