com.sun.interview
Class PropertiesQuestion.FilenameConstraints

java.lang.Object
  extended by com.sun.interview.PropertiesQuestion.ValueConstraints
      extended by com.sun.interview.PropertiesQuestion.FilenameConstraints
Enclosing class:
PropertiesQuestion

public static class PropertiesQuestion.FilenameConstraints
extends PropertiesQuestion.ValueConstraints


Field Summary
protected  java.io.File[] suggestions
           
 
Constructor Summary
PropertiesQuestion.FilenameConstraints()
           
PropertiesQuestion.FilenameConstraints(java.io.File baseDir, boolean relativeOnly)
           
 
Method Summary
 java.io.File getBaseDirectory()
          Get the default directory for files for a response to this question.
 FileFilter[] getFilters()
          Get the filters used to select valid files for a response to this question.
 java.io.File[] getSuggestions()
           
 boolean isBaseRelativeOnly()
          Determine whether all valid responses to this question should be relative to the base directory (in or under it).
 void setBaseDirectory(java.io.File dir)
          Set the default directory for files for a response to this question.
 void setBaseRelativeOnly(boolean b)
          Specify whether all valid responses to this question should be relative to the base directory (i.e.
 void setFilter(FileFilter filter)
          Set a filter used to select valid files for a response to this question.
 void setFilters(FileFilter[] filters)
          Set the filters used to select valid files for a response to this question.
 void setSuggestions(java.io.File[] sugs)
          Supply some possible values that the user may want to select from.
 
Methods inherited from class com.sun.interview.PropertiesQuestion.ValueConstraints
isReadOnly, isUnsetAllowed, isValid, isVisible, setReadOnly, setUnsetAllowed, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

suggestions

protected java.io.File[] suggestions
Constructor Detail

PropertiesQuestion.FilenameConstraints

public PropertiesQuestion.FilenameConstraints()

PropertiesQuestion.FilenameConstraints

public PropertiesQuestion.FilenameConstraints(java.io.File baseDir,
                                              boolean relativeOnly)
Method Detail

getFilters

public FileFilter[] getFilters()
Get the filters used to select valid files for a response to this question.

Returns:
An array of filters
See Also:
setFilter(com.sun.interview.FileFilter), setFilters(com.sun.interview.FileFilter[])

setFilter

public void setFilter(FileFilter filter)
Set a filter used to select valid files for a response to this question. Use this method, or setFilters(), not both.

Parameters:
filter - a filter used to select valid files for a response to this question
See Also:
getFilters(), setFilters(com.sun.interview.FileFilter[])

setFilters

public void setFilters(FileFilter[] filters)
Set the filters used to select valid files for a response to this question. The first element in the array is selected by default. Use this method, or setFilter(), not both.

Parameters:
filters - An array of filters used to select valid files for a response to this question
See Also:
getFilters(), setFilter(com.sun.interview.FileFilter)

getBaseDirectory

public java.io.File getBaseDirectory()
Get the default directory for files for a response to this question.

Returns:
the default directory in which files should be found/placed
See Also:
setBaseDirectory(java.io.File), isBaseRelativeOnly()

setBaseDirectory

public void setBaseDirectory(java.io.File dir)
Set the default directory for files for a response to this question.

Parameters:
dir - the default directory in which files should be found/placed
See Also:
getBaseDirectory()

isBaseRelativeOnly

public boolean isBaseRelativeOnly()
Determine whether all valid responses to this question should be relative to the base directory (in or under it). False by default.

Returns:
true if all valid responses to this question should be relative to the base directory
See Also:
setBaseRelativeOnly(boolean)

setBaseRelativeOnly

public void setBaseRelativeOnly(boolean b)
Specify whether all valid responses to this question should be relative to the base directory (i.e. in or under it.)

Parameters:
b - this parameter should be true if all valid responses to this question should be relative to the base directory
See Also:
setBaseRelativeOnly(boolean)

setSuggestions

public void setSuggestions(java.io.File[] sugs)
Supply some possible values that the user may want to select from. The getPath() string will be used for presentation and persistent storage of the value.


getSuggestions

public java.io.File[] getSuggestions()


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.