com.izforge.izpack.panels.userinput.field.file
Class FileFieldView

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.field.file.FileFieldView
Direct Known Subclasses:
DirFieldView

public class FileFieldView
extends Object

Presentation helper for file fields.

Author:
Tim Anderson

Constructor Summary
FileFieldView(AbstractFileField field, Prompt prompt)
          Constructs an FileFieldView.
 
Method Summary
protected  void emptyPathMessage()
          Displays a warning message if the path is empty.
protected  void error(String title, String message)
          Displays an error message.
 AbstractFileField getField()
          Returns the field.
protected  String getMessage(String id)
          Returns a localised message for the supplied message identifier.
protected  Prompt getPrompt()
          Returns the prompt.
protected  boolean validate(File value)
          Validates a value.
 boolean validate(String path)
          Validates a path.
protected  void warn(String title, String message)
          Displays a warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFieldView

public FileFieldView(AbstractFileField field,
                     Prompt prompt)
Constructs an FileFieldView.

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

getField

public AbstractFileField getField()
Returns the field.

Returns:
the field

validate

public boolean validate(String path)
Validates a path.

Parameters:
path - the path to validate
Returns:
true if the path is valid, false if it is invalid

getPrompt

protected Prompt getPrompt()
Returns the prompt.

Returns:
the prompt

getMessage

protected String getMessage(String id)
Returns a localised message for the supplied message identifier.

Parameters:
id - the message identifier
Returns:
the corresponding message, or id if the message does not exist

validate

protected boolean validate(File value)
Validates a value.

Parameters:
value - the value to validate
Returns:
true if the value is valid, false if it is invalid

emptyPathMessage

protected void emptyPathMessage()
Displays a warning message if the path is empty.


warn

protected void warn(String title,
                    String message)
Displays a warning message.

Parameters:
title - the warning title
message - the warning message

error

protected void error(String title,
                     String message)
Displays an error message.

Parameters:
title - the error title
message - the error message


Copyright © 2018. All rights reserved.