com.izforge.izpack.panels.userinput.field.rule
Class RuleField

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.field.Field
      extended by com.izforge.izpack.panels.userinput.field.rule.RuleField

public class RuleField
extends Field

Rule field.

Author:
Tim Anderson

Constructor Summary
RuleField(RuleFieldConfig config, InstallData installData)
          Constructs a RuleField.
 
Method Summary
 String format(String[] values)
          Formats the values according to the field format.
 String getDefaultValue()
          Returns the default value of the field.
 String getInitialValue()
          Returns the initial value of the field.
 FieldLayout getLayout()
          Returns the field layout.
 ValidationStatus validate(String... values)
          Validates the field values against the field layout and any associated validators.
 ValidationStatus validateFormatted(String value)
          Validates a formatted value.
 
Methods inherited from class com.izforge.izpack.panels.userinput.field.Field
getDescription, getDescription, getInstallData, getLabel, getLabel, getOmitFromAuto, getOsModels, getPacks, getProcessors, getSize, getSummaryKey, getTooltip, getValue, getVariable, isConditionTrue, isEffectiveDisplayHidden, isEffectiveReadonly, replaceVariables, setSaving, setValue, setVariable, validate, wrapDefaultValue, wrapInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleField

public RuleField(RuleFieldConfig config,
                 InstallData installData)
Constructs a RuleField.

Parameters:
config - the field configuration
installData - the installation data
Throws:
IzPackException - if the field cannot be read
Method Detail

getLayout

public FieldLayout getLayout()
Returns the field layout.

Returns:
the field layout

getInitialValue

public String getInitialValue()
Returns the initial value of the field.

Overrides:
getInitialValue in class Field
Returns:
the initial value. May be null

getDefaultValue

public String getDefaultValue()
Returns the default value of the field.

Overrides:
getDefaultValue in class Field
Returns:
the default value. May be null

format

public String format(String[] values)
Formats the values according to the field format.

Parameters:
values - the values to format
Returns:
the formatted values
Throws:
IzPackException - if formatting fails

validate

public ValidationStatus validate(String... values)
Validates the field values against the field layout and any associated validators.

Overrides:
validate in class Field
Parameters:
values - the values to validate
Returns:
the status of the validation

validateFormatted

public ValidationStatus validateFormatted(String value)
Validates a formatted value.

Parameters:
value - the value to validate
Returns:
the status of the validation


Copyright © 2018. All rights reserved.