com.izforge.izpack.installer.console
Class AbstractTextConsolePanel

java.lang.Object
  extended by com.izforge.izpack.installer.console.AbstractConsolePanel
      extended by com.izforge.izpack.installer.console.AbstractTextConsolePanel
All Implemented Interfaces:
ConsolePanel

public abstract class AbstractTextConsolePanel
extends AbstractConsolePanel

Abstract console panel for displaying paginated text.

Author:
Tim Anderson

Constructor Summary
AbstractTextConsolePanel(PanelView<ConsolePanel> panel)
          Constructs an AbstractTextConsolePanel.
 
Method Summary
protected abstract  String getText()
          Returns the text to display.
protected  String removeHTML(String text)
          Helper to strip HTML from text.
 boolean run(InstallData installData, Console console)
          Runs the panel using the specified console.
 boolean run(InstallData installData, Properties properties)
          Runs the panel using the supplied properties.
 
Methods inherited from class com.izforge.izpack.installer.console.AbstractConsolePanel
createInstallationRecord, generateOptions, getI18nStringForClass, getI18nStringForClass, getPanel, handlePanelValidationResult, printHeadLine, promptEndPanel, promptRerunPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTextConsolePanel

public AbstractTextConsolePanel(PanelView<ConsolePanel> panel)
Constructs an AbstractTextConsolePanel.

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

run

public boolean run(InstallData installData,
                   Properties properties)
Runs the panel using the supplied properties.

Parameters:
installData - the installation data
properties - the properties
Returns:
true

run

public boolean run(InstallData installData,
                   Console console)
Runs the panel using the specified console.

If there is no text to display, the panel will return false.

Specified by:
run in interface ConsolePanel
Overrides:
run in class AbstractConsolePanel
Parameters:
installData - the installation data
console - the console
Returns:
true if the panel ran successfully, otherwise false

getText

protected abstract String getText()
Returns the text to display.

Returns:
the text. A null indicates failure

removeHTML

protected String removeHTML(String text)
Helper to strip HTML from text. From code originally developed by Jan Blok.

Parameters:
text - the text. May be null
Returns:
the text with HTML removed


Copyright © 2018. All rights reserved.