com.izforge.izpack.installer
Class PanelAutomationHelper

java.lang.Object
  extended by com.izforge.izpack.installer.PanelAutomationHelper
All Implemented Interfaces:
AbstractUIHandler
Direct Known Subclasses:
CompilePanelAutomationHelper, InstallPanelAutomationHelper, ProcessPanelAutomationHelper

public abstract class PanelAutomationHelper
extends java.lang.Object
implements AbstractUIHandler

Abstract class implementing basic functions needed by all panel automation helpers.

Author:
tisc

Field Summary
 
Fields inherited from interface com.izforge.izpack.util.AbstractUIHandler
ANSWER_CANCEL, ANSWER_NO, ANSWER_YES, CHOICES_YES_NO, CHOICES_YES_NO_CANCEL
 
Constructor Summary
PanelAutomationHelper()
           
 
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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PanelAutomationHelper

public PanelAutomationHelper()
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 not 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.

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)