com.izforge.izpack.uninstaller
Class UninstallerFrame.DestroyerHandler

java.lang.Object
  extended bycom.izforge.izpack.uninstaller.UninstallerFrame.DestroyerHandler
All Implemented Interfaces:
AbstractUIHandler, AbstractUIProgressHandler
Enclosing class:
UninstallerFrame

private final class UninstallerFrame.DestroyerHandler
extends java.lang.Object
implements AbstractUIProgressHandler

The destroyer handler. This class also implements the InstallListener because the FileExecutor needs it. TODO: get rid of the InstallListener - implement generic Listener

Author:
Julien Ponge, Tino Schwarze

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
private UninstallerFrame.DestroyerHandler()
           
 
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 error)
          The destroyer encountered an error.
 void emitNotification(java.lang.String text)
          Output a notification.
 boolean emitWarning(java.lang.String title, java.lang.String text)
          Output a warning.
 void nextStep(java.lang.String step_name, int step_no, int no_of_substeps)
          The next step starts.
 void progress(int pos, java.lang.String message)
          The destroyer progresses.
 void startAction(java.lang.String name, int max)
          The destroyer starts.
 void stopAction()
          The destroyer stops.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UninstallerFrame.DestroyerHandler

private UninstallerFrame.DestroyerHandler()
Method Detail

startAction

public void startAction(java.lang.String name,
                        int max)
The destroyer starts.

Specified by:
startAction in interface AbstractUIProgressHandler
Parameters:
name - The name of the overall action. Not used here.
max - The maximum value of the progress.

stopAction

public void stopAction()
The destroyer stops.

Specified by:
stopAction in interface AbstractUIProgressHandler

progress

public void progress(int pos,
                     java.lang.String message)
The destroyer progresses.

Specified by:
progress in interface AbstractUIProgressHandler
Parameters:
pos - The actual position.
message - The message.

nextStep

public void nextStep(java.lang.String step_name,
                     int step_no,
                     int no_of_substeps)
Description copied from interface: AbstractUIProgressHandler
The next step starts.

Specified by:
nextStep in interface AbstractUIProgressHandler
Parameters:
step_name - The name of the step which starts now.
step_no - The number of the step.
no_of_substeps - The number of sub-steps this step consists of.

emitNotification

public void emitNotification(java.lang.String text)
Output a notification. Does nothing here.

Specified by:
emitNotification in interface AbstractUIHandler
Parameters:
text -

emitWarning

public boolean emitWarning(java.lang.String title,
                           java.lang.String text)
Output a warning.

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

emitError

public void emitError(java.lang.String title,
                      java.lang.String error)
The destroyer encountered an error.

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

askQuestion

public int askQuestion(java.lang.String title,
                       java.lang.String question,
                       int choices)
Ask the user a question.

Specified by:
askQuestion in interface AbstractUIHandler
Parameters:
title - Message title.
question - The question.
choices - The set of choices to present.
Returns:
The user's choice.
See Also:
AbstractUIHandler.askQuestion(String, String, int)

askQuestion

public int askQuestion(java.lang.String title,
                       java.lang.String question,
                       int choices,
                       int default_choice)
Ask the user a question.

Specified by:
askQuestion in interface AbstractUIHandler
Parameters:
title - Message title.
question - The question.
choices - The set of choices to present.
default_choice - The default choice. (-1 = no default choice)
Returns:
The user's choice.
See Also:
AbstractUIHandler.askQuestion(String, String, int, int)