Package VASSAL.configure
Class FileConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.FileConfigurer
- Direct Known Subclasses:
AudioClipConfigurer,DirectoryConfigurer,ImageConfigurer
public class FileConfigurer extends Configurer
A Configurer for java.io.File values
-
Field Summary
Fields Modifier and Type Field Description protected ArchiveWriterarchiveprotected booleaneditableprotected FileChooserfcprotected JPanelpprotected DirectoryConfigurerstartingDirectoryprotected JTextFieldtfFields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value -
Constructor Summary
Constructors Constructor Description FileConfigurer(String key, String name)FileConfigurer(String key, String name, DirectoryConfigurer startingDirectory)FileConfigurer(String key, String name, ArchiveWriter archive)If a non-nullArchiveWriteris used in the constructor, then invokingsetValue(java.lang.Object)on this FileConfigurer will automatically add the file to the archive -
Method Summary
Modifier and Type Method Description protected voidaddToArchive(File f)voidchooseNewValue()ComponentgetControls()GUI interface for setting the option in an editing windowFilegetFileValue()StringgetValueString()protected FileChooserinitFileChooser()booleanisEditable()static voidmain(String[] args)voidsetEditable(boolean editable)voidsetValue(Object o)Set the Object valuevoidsetValue(String s)Set the Object value from a StringMethods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, removePropertyChangeListener, setFrozen, setName
-
Field Details
-
archive
-
p
-
tf
-
fc
-
editable
protected boolean editable -
startingDirectory
-
-
Constructor Details
-
FileConfigurer
-
FileConfigurer
- Parameters:
key-name-startingDirectory- If non-null, points to a preferences setting that specifies the starting directory for the "Select" button
-
FileConfigurer
If a non-nullArchiveWriteris used in the constructor, then invokingsetValue(java.lang.Object)on this FileConfigurer will automatically add the file to the archive
-
-
Method Details
-
initFileChooser
-
getValueString
- Specified by:
getValueStringin classConfigurer- Returns:
- a String representation of the Object value
-
setValue
Description copied from class:ConfigurerSet the Object value- Overrides:
setValuein classConfigurer
-
addToArchive
-
setValue
Description copied from class:ConfigurerSet the Object value from a String- Specified by:
setValuein classConfigurer
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-
chooseNewValue
public void chooseNewValue() -
getFileValue
-
main
-
isEditable
public boolean isEditable() -
setEditable
public void setEditable(boolean editable)
-