com.izforge.izpack.panels.userinput.console.search
Class ConsoleSearchField

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.field.AbstractFieldView
      extended by com.izforge.izpack.panels.userinput.console.ConsoleField
          extended by com.izforge.izpack.panels.userinput.console.search.ConsoleSearchField
All Implemented Interfaces:
FieldView

public class ConsoleSearchField
extends ConsoleField

Based on ConsoleChoiceField


Constructor Summary
ConsoleSearchField(SearchField field, Console console, Prompt prompt)
          Constructs a ConsoleSearchField.
 
Method Summary
 boolean display()
          Displays the field.
protected  void listChoices(List<String> choices, int selected)
          Displays the choices.
 
Methods inherited from class com.izforge.izpack.panels.userinput.console.ConsoleField
error, getConsole, getMessage, print, printDescription, printLabel, println
 
Methods inherited from class com.izforge.izpack.panels.userinput.field.AbstractFieldView
getField, getSummaryKey, getVariable, isDisplayed, isReadonly, setDisplayed, setReadonly, setVariable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleSearchField

public ConsoleSearchField(SearchField field,
                          Console console,
                          Prompt prompt)
Constructs a ConsoleSearchField.

Parameters:
field - the field
console - the console
prompt - the prompt
Method Detail

display

public boolean display()
Description copied from class: ConsoleField
Displays the field.

For fields that update variables, this collects input and validates it.

Specified by:
display in class ConsoleField
Returns:
true if the field was displayed and validated successfully

listChoices

protected void listChoices(List<String> choices,
                           int selected)
Displays the choices.

Parameters:
choices - the choices
selected - the selected choice, or -1 if no choice is selected


Copyright © 2018. All rights reserved.