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.
-
CommandLineConsole(WizardState)
- Creates a CommandLineConsole with the specified WizardState
object.
-
callObjectMethod(Object, String, Class[], Object[])
- Call an object method through reflection.
-
displayQuery(Object, String, String, String[], String[])
- Display a query to the user.
-
displayQuery(Object, String, String[], String[])
- Display a query to the user.
-
exit()
- Exit the applet/application.
Deprecated.
-
exit(int)
- Exit the applet/application with the specified exit
status.
-
getWizardSize()
- Gets the size of the wizard frame.
-
getWizardState()
- Returns the WizardState object for this console.
-
hasGUI()
- The CommandLineConsole has no gui.
-
run()
- Initialize the wizard console in a separate thread.
-
setFrameTitle(String)
- Sets the title of the containing Frame.
-
setIconImage(Image)
- Set the icon image of the wizard frame.
-
setWizardSize(Dimension)
- Sets the size of the wizard frame.
-
setWizardState(WizardState)
- Sets the WizardState object into this console.
CommandLineConsole
public CommandLineConsole(WizardState wizardState)
- Creates a CommandLineConsole with the specified WizardState
object.
- Parameters:
- wizardState - The connection to the server.
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.
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.
setWizardState
public void setWizardState(WizardState state)
- Sets the WizardState object into this console.
- Parameters:
- state - The new WizardState.
getWizardState
public WizardState getWizardState()
- Returns the WizardState object for this console.
- Returns:
- The wizard state for this console.
exit
public void exit()
- Note: exit() is deprecated.
Programs should now use exit(int).
- Exit the applet/application.
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.
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.
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.
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.
hasGUI
public boolean hasGUI()
- The CommandLineConsole has no gui. This method always returns
false.
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.
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.
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