Class SymbolSet
java.lang.Object
VASSAL.tools.imports.Importer
VASSAL.tools.imports.adc2.SymbolSet
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMaxSize(Dimension max) booleanDetermine whether the file is valid for the given importer.protected voidRead a symbol set from the specified file.protected voidRead an SDX file if one exists.voidWrite all of the game pieces to the archive.Methods inherited from class Importer
forceExtension, getExtension, getFileName, getLayeredPieceCollection, getMainMap, getUniqueImageFileName, getUniqueImageFileName, importFile, insertComponent, readNullTerminatedString, readNullTerminatedString, readWindowsFileName, stripExtensionModifier and TypeMethodDescriptionstatic StringforceExtension(String s, String ext) Strip the extension from a filename and replace with the given extension.static StringGet the extension from a file name.static StringGet the file name without the qualifying path.protected LayeredPieceCollectionprotected Mapstatic Stringstatic StringgetUniqueImageFileName(String s, String ext) Get a unique file name for an image in the game module archive.voidimportFile(ImportAction action, File f) Two methods are needed to import a file.protected static voidinsertComponent(Buildable child, Buildable parent) static StringReturn a null-terminated string from an input stream.static StringreadNullTerminatedString(InputStream in, int maxLen) Read a null-terminated string from a file up to a maximum length which includes the null termination.static StringRead a null-terminated string representing a Windows file name and convert Windows separator characters '\\' to the local separator character.static StringReturn a file name without the extension.
-
Constructor Details
-
SymbolSet
public SymbolSet()
-
-
Method Details
-
getMaxSize
-
getMaxSize
-
getModalSize
- Returns:
- The most frequently occuring dimension for game pieces in this module.
-
load
Read a symbol set from the specified file.- Overrides:
loadin classImporter- Parameters:
f- The base file to be imported.- Throws:
IOException- oops
-
readPermutationFile
Read an SDX file if one exists. This is a list of image indeces starting with terrain separated by newlines. Only piece images are actually permuted.- Parameters:
f- - Set file.- Throws:
IOException
-
writeToArchive
Write all of the game pieces to the archive. Mainly for testing or if only the symbol set is imported.- Specified by:
writeToArchivein classImporter- Throws:
IOException- oops
-
isValidImportFile
Description copied from class:ImporterDetermine whether the file is valid for the given importer.- Specified by:
isValidImportFilein classImporter- Parameters:
f- File- Returns:
trueiffis a valid file for this type.- Throws:
IOException- oops
-