com.izforge.izpack.panels
Class ProcessPanelConsoleHelper

java.lang.Object
  extended by com.izforge.izpack.installer.PanelConsoleHelper
      extended by com.izforge.izpack.panels.ProcessPanelConsoleHelper
All Implemented Interfaces:
PanelConsole, AbstractUIHandler, AbstractUIProcessHandler

public class ProcessPanelConsoleHelper
extends PanelConsoleHelper
implements PanelConsole, AbstractUIProcessHandler


Field Summary
private  int currentJob
           
private  int noOfJobs
           
 
Fields inherited from interface com.izforge.izpack.util.AbstractUIHandler
ANSWER_CANCEL, ANSWER_NO, ANSWER_YES, CHOICES_YES_NO, CHOICES_YES_NO_CANCEL
 
Constructor Summary
ProcessPanelConsoleHelper()
           
 
Method Summary
 int askQuestion(java.lang.String title, java.lang.String question, int choices)
          Ask the user a question.
 int askQuestion(java.lang.String title, java.lang.String question, int choices, int default_choice)
          Ask the user a question.
 void emitError(java.lang.String title, java.lang.String message)
          Notify the user of some error.
 void emitErrorAndBlockNext(java.lang.String title, java.lang.String message)
          Notify the user of some error and block the next button.
 void emitNotification(java.lang.String message)
          Notify the user about something.
 boolean emitWarning(java.lang.String title, java.lang.String message)
          Warn the user about something.
 void finishProcess()
           
 void finishProcessing(boolean unlockPrev, boolean unlockNext)
           
 void logOutput(java.lang.String message, boolean stderr)
          Log the given message.
 boolean runConsole(AutomatedInstallData installData)
          Asks the panel to run in interactive console mode
 boolean runConsoleFromPropertiesFile(AutomatedInstallData installData, java.util.Properties p)
          Asks the panel to run and do its work, given a set of properties to use as variables
 boolean runGeneratePropertiesFile(AutomatedInstallData installData, java.io.PrintWriter printWriter)
          Asks the panel to return all inputed fields/variables in a string with a properties file style
 void startProcess(java.lang.String name)
          Notify the user that a process has started.
 void startProcessing(int no_of_processes)
           
 
Methods inherited from class com.izforge.izpack.installer.PanelConsoleHelper
askEndOfConsolePanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

noOfJobs

private int noOfJobs

currentJob

private int currentJob
Constructor Detail

ProcessPanelConsoleHelper

public ProcessPanelConsoleHelper()
Method Detail

emitNotification

public void emitNotification(java.lang.String message)
Description copied from interface: AbstractUIHandler
Notify the user about something.

The difference between notification and warning is that a notification should not need user interaction and can savely be ignored.

Specified by:
emitNotification in interface AbstractUIHandler
Parameters:
message - The notification.

emitWarning

public boolean emitWarning(java.lang.String title,
                           java.lang.String message)
Description copied from interface: AbstractUIHandler
Warn the user about something.

Specified by:
emitWarning in interface AbstractUIHandler
Parameters:
title - The message title (used for dialog name, might not be displayed)
message - The warning message.
Returns:
true if the user decided to continue

emitError

public void emitError(java.lang.String title,
                      java.lang.String message)
Description copied from interface: AbstractUIHandler
Notify the user of some error.

Specified by:
emitError in interface AbstractUIHandler
Parameters:
title - The message title (used for dialog name, might not be displayed)
message - The error message.

emitErrorAndBlockNext

public void emitErrorAndBlockNext(java.lang.String title,
                                  java.lang.String message)
Description copied from interface: AbstractUIHandler
Notify the user of some error and block the next button.

Specified by:
emitErrorAndBlockNext in interface AbstractUIHandler
Parameters:
title - The message title (used for dialog name, might not be displayed)
message - The error message.

askQuestion

public int askQuestion(java.lang.String title,
                       java.lang.String question,
                       int choices)
Description copied from interface: AbstractUIHandler
Ask the user a question.

Specified by:
askQuestion in interface AbstractUIHandler
Parameters:
title - The title of the question (useful for dialogs). Might be null.
question - The question.
choices - The set of choices to present. Either CHOICES_YES_NO or CHOICES_YES_NO_CANCEL
Returns:
The user's choice. (ANSWER_CANCEL, ANSWER_YES or ANSWER_NO)

askQuestion

public int askQuestion(java.lang.String title,
                       java.lang.String question,
                       int choices,
                       int default_choice)
Description copied from interface: AbstractUIHandler
Ask the user a question.

Specified by:
askQuestion in interface AbstractUIHandler
Parameters:
title - The title of the question (useful for dialogs). Might be null.
question - The question.
choices - The set of choices to present. Either CHOICES_YES_NO or CHOICES_YES_NO_CANCEL
default_choice - The default choice. One of ANSWER_CANCEL, ANSWER_YES or ANSWER_NO.
Returns:
The user's choice. (ANSWER_CANCEL, ANSWER_YES or ANSWER_NO)

logOutput

public void logOutput(java.lang.String message,
                      boolean stderr)
Description copied from interface: AbstractUIProcessHandler
Log the given message.

Specified by:
logOutput in interface AbstractUIProcessHandler
stderr - true if this is a message received from a program via stderr

startProcessing

public void startProcessing(int no_of_processes)
Specified by:
startProcessing in interface AbstractUIProcessHandler

startProcess

public void startProcess(java.lang.String name)
Description copied from interface: AbstractUIProcessHandler
Notify the user that a process has started.

Specified by:
startProcess in interface AbstractUIProcessHandler

finishProcess

public void finishProcess()
Specified by:
finishProcess in interface AbstractUIProcessHandler

finishProcessing

public void finishProcessing(boolean unlockPrev,
                             boolean unlockNext)
Specified by:
finishProcessing in interface AbstractUIProcessHandler

runGeneratePropertiesFile

public boolean runGeneratePropertiesFile(AutomatedInstallData installData,
                                         java.io.PrintWriter printWriter)
Description copied from interface: PanelConsole
Asks the panel to return all inputed fields/variables in a string with a properties file style

Specified by:
runGeneratePropertiesFile in interface PanelConsole
Parameters:
installData - The installation data

runConsoleFromPropertiesFile

public boolean runConsoleFromPropertiesFile(AutomatedInstallData installData,
                                            java.util.Properties p)
Description copied from interface: PanelConsole
Asks the panel to run and do its work, given a set of properties to use as variables

Specified by:
runConsoleFromPropertiesFile in interface PanelConsole
Parameters:
installData - The installation data
p - The the properties

runConsole

public boolean runConsole(AutomatedInstallData installData)
Description copied from interface: PanelConsole
Asks the panel to run in interactive console mode

Specified by:
runConsole in interface PanelConsole
Parameters:
installData - The installation data *