com.izforge.izpack.panels.userinput
Class DelegatingPrompt

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.DelegatingPrompt
All Implemented Interfaces:
Prompt

public class DelegatingPrompt
extends Object
implements Prompt

Implementation of Prompt that delegates all requests to another prompt. The underlying prompt may be switched.

Author:
Tim Anderson

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.izforge.izpack.api.handler.Prompt
Prompt.Option, Prompt.Options, Prompt.Type
 
Constructor Summary
DelegatingPrompt(Prompt prompt)
          Constructs a DelegatingPrompt.
 
Method Summary
 Prompt.Option confirm(Prompt.Type type, String message, Prompt.Options options)
          Displays a confirmation message.
 Prompt.Option confirm(Prompt.Type type, String message, Prompt.Options options, Prompt.Option defaultOption)
          Displays a confirmation message.
 Prompt.Option confirm(Prompt.Type type, String title, String message, Prompt.Options options)
          Displays a confirmation message.
 Prompt.Option confirm(Prompt.Type type, String title, String message, Prompt.Options options, Prompt.Option defaultOption)
          Displays a confirmation message.
 void error(String message)
           
 void error(String title, String message)
           
 void error(String title, String message, Throwable throwable)
           
 void error(String message, Throwable throwable)
           
 void error(Throwable throwable)
           
 void message(Prompt.Type type, String message)
           
 void message(Prompt.Type type, String title, String message)
           
 void message(Prompt.Type type, String title, String message, Throwable throwable)
           
 void message(Throwable throwable)
           
 void setPrompt(Prompt prompt)
          Registers the prompt to delegate to.
 void warn(String message)
           
 void warn(String title, String message)
           
 void warn(Throwable throwable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingPrompt

public DelegatingPrompt(Prompt prompt)
Constructs a DelegatingPrompt.

Parameters:
prompt - the prompt to delegate to
Method Detail

setPrompt

public void setPrompt(Prompt prompt)
Registers the prompt to delegate to.

Parameters:
prompt - the prompt

message

public void message(Throwable throwable)
Specified by:
message in interface Prompt

message

public void message(Prompt.Type type,
                    String message)
Specified by:
message in interface Prompt

message

public void message(Prompt.Type type,
                    String title,
                    String message)
Specified by:
message in interface Prompt

message

public void message(Prompt.Type type,
                    String title,
                    String message,
                    Throwable throwable)
Specified by:
message in interface Prompt

error

public void error(Throwable throwable)
Specified by:
error in interface Prompt

error

public void error(String message,
                  Throwable throwable)
Specified by:
error in interface Prompt

error

public void error(String title,
                  String message,
                  Throwable throwable)
Specified by:
error in interface Prompt

warn

public void warn(Throwable throwable)
Specified by:
warn in interface Prompt

warn

public void warn(String message)
Specified by:
warn in interface Prompt

warn

public void warn(String title,
                 String message)
Specified by:
warn in interface Prompt

error

public void error(String message)
Specified by:
error in interface Prompt

error

public void error(String title,
                  String message)
Specified by:
error in interface Prompt

confirm

public Prompt.Option confirm(Prompt.Type type,
                             String message,
                             Prompt.Options options)
Displays a confirmation message.

Specified by:
confirm in interface Prompt
Parameters:
type - the type of the message
message - the message
options - the options which may be selected
Returns:
the selected option

confirm

public Prompt.Option confirm(Prompt.Type type,
                             String message,
                             Prompt.Options options,
                             Prompt.Option defaultOption)
Displays a confirmation message.

Specified by:
confirm in interface Prompt
Parameters:
type - the type of the message
message - the message
options - the options which may be selected
defaultOption - the default option to select
Returns:
the selected option

confirm

public Prompt.Option confirm(Prompt.Type type,
                             String title,
                             String message,
                             Prompt.Options options)
Displays a confirmation message.

Specified by:
confirm in interface Prompt
Parameters:
type - the type of the message
title - the message title. May be null
message - the message
options - the options which may be selected
Returns:
the selected option

confirm

public Prompt.Option confirm(Prompt.Type type,
                             String title,
                             String message,
                             Prompt.Options options,
                             Prompt.Option defaultOption)
Displays a confirmation message.

Specified by:
confirm in interface Prompt
Parameters:
type - the type of the message
title - the message title. May be null
message - the message
options - the options which may be selected
defaultOption - the default option to select
Returns:
the selected option


Copyright © 2018. All rights reserved.