public static class PropertiesQuestion.FilenameConstraints extends PropertiesQuestion.ValueConstraints
Modifier and Type | Field and Description |
---|---|
protected java.io.File[] |
suggestions
Current value set for the suggested response values.
|
Constructor and Description |
---|
FilenameConstraints() |
FilenameConstraints(java.io.File baseDir,
boolean relativeOnly) |
Modifier and Type | Method and Description |
---|---|
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).
|
java.lang.String |
isValid(java.lang.String v)
Is the given value valid for this field? Since this constraint
class has no particular typing, the default only check that the
value is non-empty.
|
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.
|
isReadOnly, isUnsetAllowed, isVisible, setReadOnly, setUnsetAllowed, setVisible
protected java.io.File[] suggestions
setSuggestions(File[])
,
getSuggestions()
public FilenameConstraints()
public FilenameConstraints(java.io.File baseDir, boolean relativeOnly)
baseDir
- Base directory where selection should begin from.relativeOnly
- Force the result of this value to be relative
to the base location. This is limited on some filesystem types
of course, where relative paths from one place to another are not
always possible.public java.lang.String isValid(java.lang.String v)
PropertiesQuestion.ValueConstraints
isValid
in class PropertiesQuestion.ValueConstraints
v
- The value to check.PropertiesQuestion.getInvalidKeys()
public FileFilter[] getFilters()
setFilter(com.sun.interview.FileFilter)
,
setFilters(com.sun.interview.FileFilter[])
public void setFilter(FileFilter filter)
filter
- a filter used to select valid files for a response
to this questiongetFilters()
,
setFilters(com.sun.interview.FileFilter[])
public void setFilters(FileFilter[] filters)
filters
- An array of filters used to select valid files for a response
to this questiongetFilters()
,
setFilter(com.sun.interview.FileFilter)
public java.io.File getBaseDirectory()
setBaseDirectory(java.io.File)
,
isBaseRelativeOnly()
public void setBaseDirectory(java.io.File dir)
dir
- the default directory in which files should be found/placedgetBaseDirectory()
public boolean isBaseRelativeOnly()
setBaseRelativeOnly(boolean)
public void setBaseRelativeOnly(boolean b)
b
- this parameter should be true if all valid responses
to this question should be relative to the base directorysetBaseRelativeOnly(boolean)
public void setSuggestions(java.io.File[] sugs)
getPath()
string will be used for
presentation and persistent storage of the value.public java.io.File[] getSuggestions()
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.