|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.interview.Question
com.sun.interview.FileListQuestion
public abstract class FileListQuestion
A question
to which the response is one or more filenames.
Field Summary | |
---|---|
protected java.io.File[] |
value
The current (default or latest) response to this question. |
Fields inherited from class com.sun.interview.Question |
---|
interview, key, tag |
Constructor Summary | |
---|---|
protected |
FileListQuestion(Interview interview,
java.lang.String tag)
Create a question with a nominated tag. |
Method Summary | |
---|---|
void |
clear()
Clear any response to this question, resetting the value back to its initial state. |
protected static boolean |
equal(java.io.File[] f1,
java.io.File[] f2)
Determine if two arrays of filenames are equal. |
java.io.File |
getBaseDirectory()
Get the default directory for files for a response to this question. |
java.io.File[] |
getDefaultValue()
Get the default response for this question. |
FileFilter[] |
getFilters()
Get the filters used to select valid files for a response to this question. |
java.lang.String |
getStringValue()
Get the response to this question as a string. |
java.io.File[] |
getValue()
Get the current (default or latest) response to this question. |
java.io.File[] |
getValueOnPath()
Verify this question is on the current path, and if it is, return the current value. |
boolean |
isBaseRelativeOnly()
Determine whether all valid responses to this question should be relative to the base directory (i.e. |
boolean |
isDuplicatesAllowed()
Check whether or not duplicates should be allowed in the list. |
boolean |
isValueAlwaysValid()
Check if the question always has a valid response. |
boolean |
isValueValid()
Check if the question currently has a valid response. |
static java.lang.String |
join(java.io.File[] ff)
Convert a list of filenames to a newline separated string. |
protected void |
load(java.util.Map data)
Load the value for this question from a dictionary, using the tag as the key. |
protected void |
save(java.util.Map data)
Save the value for this question in a dictionary, using the tag as the key. |
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 |
setDefaultValue(java.io.File[] v)
Set the default response for this question, used by the clear method. |
void |
setDuplicatesAllowed(boolean b)
Specify whether or not duplicates should be allowed in the list. |
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 |
setValue(java.io.File[] newValue)
Set the current value. |
void |
setValue(java.lang.String paths)
Set the response to this question to the value represented by a string-valued argument. |
static java.io.File[] |
split(java.lang.String s)
Break apart a string containing a white-space separate list of file names into an array of individual files. |
Methods inherited from class com.sun.interview.Question |
---|
addMarker, equals, export, getChecklistItems, getHelpID, getImage, getInterview, getKey, getNext, getResourceString, getResourceString, getSummary, getTag, getText, getTextArgs, hashCode, hasMarker, isEnabled, isHidden, reload, removeMarker, setImage, setImage, setSummary, setText |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File[] value
Constructor Detail |
---|
protected FileListQuestion(Interview interview, java.lang.String tag)
interview
- The interview containing this question.tag
- A unique tag to identify this specific question.Method Detail |
---|
public java.io.File[] getDefaultValue()
setDefaultValue(java.io.File[])
public void setDefaultValue(java.io.File[] v)
v
- the default response for this question.getDefaultValue()
public void setDuplicatesAllowed(boolean b)
b
- true if duplicates should be allowed, and false otherwiseisDuplicatesAllowed()
public boolean isDuplicatesAllowed()
setDuplicatesAllowed(boolean)
public java.io.File[] getValue()
setValue(java.lang.String)
public java.io.File[] getValueOnPath() throws Interview.NotOnPathFault
Interview.NotOnPathFault
- if this question is not on the
current pathgetValue()
public java.lang.String getStringValue()
Question
getStringValue
in class Question
Question.setValue(String)
public void setValue(java.lang.String paths)
setValue
in class Question
paths
- A string containing a value value appropriate for the
particular type of question whose value is being set.getValue()
public void setValue(java.io.File[] newValue)
newValue
- The value to be set.getValue()
public boolean isValueValid()
Question
isValueValid
in class Question
public boolean isValueAlwaysValid()
Question
isValueAlwaysValid
in class Question
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()
,
setFilters(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 clear()
clear
in class Question
protected void load(java.util.Map data)
load
in class Question
data
- The map from which to load the value for this question.public static java.io.File[] split(java.lang.String s)
s
- The string to be broken apart
join(java.io.File[])
protected void save(java.util.Map data)
save
in class Question
data
- The map in which to save the value for this question.public static java.lang.String join(java.io.File[] ff)
ff
- an array of filenames
split(java.lang.String)
protected static boolean equal(java.io.File[] f1, java.io.File[] f2)
f1
- the first array to be comparedf2
- the other array to be compared
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |