com.izforge.izpack.panels.licence
Class AbstractLicenceConsolePanel

java.lang.Object
  extended by com.izforge.izpack.installer.console.AbstractConsolePanel
      extended by com.izforge.izpack.installer.console.AbstractTextConsolePanel
          extended by com.izforge.izpack.panels.licence.AbstractLicenceConsolePanel
All Implemented Interfaces:
ConsolePanel
Direct Known Subclasses:
HTMLLicenceConsolePanel, LicenceConsolePanel, PDFLicenceConsolePanel

public abstract class AbstractLicenceConsolePanel
extends AbstractTextConsolePanel

Abstract panel for displaying license text to the console.

Author:
Tim Anderson

Constructor Summary
AbstractLicenceConsolePanel(PanelView<ConsolePanel> panel, Resources resources)
          Constructs a AbstractLicenseConsolePanel.
 
Method Summary
protected  URL loadLicence()
          Loads the license document URL.
protected  String loadLicenceAsString()
           
protected  String loadLicenceAsString(String encoding)
           
protected  boolean promptEndPanel(InstallData installData, Console console)
          Prompts to end the license panel.
 
Methods inherited from class com.izforge.izpack.installer.console.AbstractTextConsolePanel
getText, removeHTML, run, run
 
Methods inherited from class com.izforge.izpack.installer.console.AbstractConsolePanel
createInstallationRecord, generateOptions, getI18nStringForClass, getI18nStringForClass, getPanel, handlePanelValidationResult, printHeadLine, promptRerunPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLicenceConsolePanel

public AbstractLicenceConsolePanel(PanelView<ConsolePanel> panel,
                                   Resources resources)
Constructs a AbstractLicenseConsolePanel.

Parameters:
panel - the parent panel/view. May be null
resources - the resources
Method Detail

loadLicence

protected URL loadLicence()
Loads the license document URL.

Returns:
The license text URL.

loadLicenceAsString

protected String loadLicenceAsString()

loadLicenceAsString

protected String loadLicenceAsString(String encoding)

promptEndPanel

protected boolean promptEndPanel(InstallData installData,
                                 Console console)
Prompts to end the license panel.

This displays a prompt to accept, reject, or redisplay. On redisplay, it invokes AbstractTextConsolePanel.run(InstallData, Console).

Overrides:
promptEndPanel in class AbstractConsolePanel
Parameters:
installData - the installation date
console - the console to use
Returns:
true to accept, false to reject. If the panel is displayed again, the result of AbstractTextConsolePanel.run(InstallData, Console) is returned


Copyright © 2018. All rights reserved.