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 Details Link icon

  • Constructor Details Link icon

    • FileConfigurer Link icon

      public FileConfigurer(String key, String name)
    • FileConfigurer Link icon

      public FileConfigurer(String key, String name, DirectoryConfigurer startingDirectory)
      Parameters:
      key - Configurer key
      name - Configurer label
      startingDirectory - If non-null, points to a preferences setting that specifies the starting directory for the "Select" button
    • FileConfigurer Link icon

      public FileConfigurer(String key, String name, ArchiveWriter archive)
      If a non-null ArchiveWriter is used in the constructor, then invoking setValue(java.lang.Object) on this FileConfigurer will automatically add the file to the archive
  • Method Details Link icon

    • initFileChooser Link icon

      protected FileChooser initFileChooser()
    • getValueString Link icon

      public String getValueString()
      Specified by:
      getValueString in class Configurer
      Returns:
      a String representation of the Object value
    • setValue Link icon

      public void setValue(Object o)
      Description copied from class: Configurer
      Set the Object value
      Overrides:
      setValue in class Configurer
    • addToArchive Link icon

      protected void addToArchive(File f)
    • setValue Link icon

      public void setValue(String s)
      Description copied from class: Configurer
      Set the Object value from a String
      Specified by:
      setValue in class Configurer
    • setLabelVisible Link icon

      public void setLabelVisible(boolean visible)
      Description copied from class: Configurer
      Show/Hide the internal label maintained by this Configurer. It is up to individual Configurers to track and hide the label (if they can). This method is currently only utilized by the Preference configs PrefsEditor.addOption(String, Configurer) to extract an existing label in a configurer, display correctly aligned and suppress the original label. This keeps compatibility with custom module code setting up preferences. This method only needs to be implemented in Configurers that are added as preferences.
      Overrides:
      setLabelVisible in class Configurer
      Parameters:
      visible - Hide label if true
    • getControls Link icon

      public Component getControls()
      Description copied from class: Configurer
      GUI interface for setting the option in an editing window
      Specified by:
      getControls in class Configurer
    • chooseNewValue Link icon

      public void chooseNewValue()
    • getFileValue Link icon

      public File getFileValue()
    • main Link icon

      public static void main(String[] args)
    • isEditable Link icon

      public boolean isEditable()
    • setEditable Link icon

      public void setEditable(boolean editable)