com.izforge.izpack.panels.userinput.gui.text
Class GUITextField

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.field.AbstractFieldView
      extended by com.izforge.izpack.panels.userinput.gui.GUIField
          extended by com.izforge.izpack.panels.userinput.gui.text.GUITextField
All Implemented Interfaces:
FieldView, FocusListener, EventListener, DocumentListener

public class GUITextField
extends GUIField
implements FocusListener, DocumentListener

Text field view.

Author:
Tim Anderson

Constructor Summary
GUITextField(TextField field)
          Constructs a GUITextField.
 
Method Summary
 void changedUpdate(DocumentEvent e)
           
 void focusGained(FocusEvent event)
           
 void focusLost(FocusEvent event)
           
 JComponent getFirstFocusableComponent()
          Return a JComponent of this field which is the primary candidate to gain focus.
 void insertUpdate(DocumentEvent e)
           
 void removeUpdate(DocumentEvent e)
           
 void setChanged(boolean changed)
           
 boolean updateField(Prompt prompt, boolean skipValidation)
          Updates the field from the view.
 boolean updateView()
          Updates the view from the field.
 
Methods inherited from class com.izforge.izpack.panels.userinput.gui.GUIField
addComponent, addDescription, addField, addLabel, addLabel, addText, addTooltip, getComponents, getInstallData, notifyUpdateListener, replaceVariables, setUpdateListener, translateStaticText, updateField, warning
 
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

GUITextField

public GUITextField(TextField field)
Constructs a GUITextField.

Parameters:
field - the field
Method Detail

updateField

public boolean updateField(Prompt prompt,
                           boolean skipValidation)
Updates the field from the view.

Overrides:
updateField in class GUIField
Parameters:
prompt - the prompt to display messages
skipValidation - set to true when wanting to save field data without validating
Returns:
true if the field was updated, false if the view is invalid

updateView

public boolean updateView()
Updates the view from the field.

Overrides:
updateView in class GUIField
Returns:
true if the view was updated

setChanged

public void setChanged(boolean changed)

focusGained

public void focusGained(FocusEvent event)
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent event)
Specified by:
focusLost in interface FocusListener

insertUpdate

public void insertUpdate(DocumentEvent e)
Specified by:
insertUpdate in interface DocumentListener

removeUpdate

public void removeUpdate(DocumentEvent e)
Specified by:
removeUpdate in interface DocumentListener

changedUpdate

public void changedUpdate(DocumentEvent e)
Specified by:
changedUpdate in interface DocumentListener

getFirstFocusableComponent

public JComponent getFirstFocusableComponent()
Description copied from class: GUIField
Return a JComponent of this field which is the primary candidate to gain focus.

Specified by:
getFirstFocusableComponent in class GUIField
Returns:
the primary JComponent to gain focus


Copyright © 2018. All rights reserved.