Crossfire JXClient, Trunk
Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
com.realtime.crossfire.jxclient.settings.Filenames Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.settings.Filenames:
Collaboration graph

Static Public Member Functions

static Path getDialogsFile (@NotNull final String skinName) throws IOException
 
static Path getKeybindingsFileVersion1 (@Nullable final CharSequence hostname, @Nullable final CharSequence character) throws IOException
 
static Path getKeybindingsFileVersion2 (@Nullable final CharSequence hostname, @Nullable final CharSequence character) throws IOException
 
static Path getMagicMapImageCacheDir ()
 
static Path getMessageLogFile (@Nullable final String hostname) throws IOException
 
static Path getMetaserverCacheFile ()
 
static Path getOriginalImageCacheDir ()
 
static Path getScaledImageCacheDir ()
 
static Path getSettingsFile () throws IOException
 
static Path getSettingsFile (@NotNull final String filename) throws IOException
 
static Path getShortcutsFile (@NotNull final CharSequence hostname, @NotNull final CharSequence character) throws IOException
 

Private Member Functions

 Filenames ()
 

Static Private Member Functions

static String encode (@NotNull final CharSequence str)
 
static Path getCrossfireFile () throws IOException
 

Detailed Description

Utility class to return references to settings files.

Author
Andreas Kirschbaum

Definition at line 37 of file Filenames.java.

Constructor & Destructor Documentation

◆ Filenames()

com.realtime.crossfire.jxclient.settings.Filenames.Filenames ( )
private

Private constructor to prevent instantiation.

Definition at line 42 of file Filenames.java.

Member Function Documentation

◆ encode()

static String com.realtime.crossfire.jxclient.settings.Filenames.encode ( @NotNull final CharSequence  str)
staticprivate

Encodes a string to make it safe as a file name.

Parameters
strthe string to encode
Returns
the encoded string

Definition at line 202 of file Filenames.java.

References com.realtime.crossfire.jxclient.util.HexCodec.hexEncode2().

Referenced by com.realtime.crossfire.jxclient.settings.Filenames.getKeybindingsFileVersion1(), com.realtime.crossfire.jxclient.settings.Filenames.getKeybindingsFileVersion2(), and com.realtime.crossfire.jxclient.settings.Filenames.getShortcutsFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCrossfireFile()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getCrossfireFile ( ) throws IOException
staticprivate

Returns the crossfire settings directory.

Returns
the settings directory
Exceptions
IOExceptionif the settings directory cannot be located

Definition at line 187 of file Filenames.java.

Referenced by com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Here is the caller graph for this function:

◆ getDialogsFile()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getDialogsFile ( @NotNull final String  skinName) throws IOException
static

Returns the file for storing dialog related information for a skin.

Parameters
skinNameidentifies the skin
Returns
the file
Exceptions
IOExceptionif the file cannot be accessed

Definition at line 164 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.window.DialogStateParser.load(), and com.realtime.crossfire.jxclient.window.DialogStateParser.save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getKeybindingsFileVersion1()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getKeybindingsFileVersion1 ( @Nullable final CharSequence  hostname,
@Nullable final CharSequence  character 
) throws IOException
static

Returns the fallback keybindings file.

Parameters
hostnamethe hostname of the character;
null
=global key bindings file
characterthe character name;
null
=global key bindings file
Returns
the keybindings file
Exceptions
IOExceptionif the keybindings file cannot be accessed

Definition at line 138 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.encode(), and com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient(), and com.realtime.crossfire.jxclient.gui.keybindings.KeybindingsManager.loadPerCharacterBindings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getKeybindingsFileVersion2()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getKeybindingsFileVersion2 ( @Nullable final CharSequence  hostname,
@Nullable final CharSequence  character 
) throws IOException
static

Returns the keybindings file.

Parameters
hostnamethe hostname of the character;
null
=global key bindings file
characterthe character name;
null
=global key bindings file
Returns
the keybindings file
Exceptions
IOExceptionif the keybindings file cannot be accessed

Definition at line 124 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.encode(), and com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient(), and com.realtime.crossfire.jxclient.gui.keybindings.KeybindingsManager.loadPerCharacterBindings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMagicMapImageCacheDir()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getMagicMapImageCacheDir ( )
static

Returns the image cache directory for magic map sized images.

Returns
the image cache directory

Definition at line 80 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMessageLogFile()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getMessageLogFile ( @Nullable final String  hostname) throws IOException
static

Returns the log file for text message logging.

Parameters
hostnamethe server hostname or
null
Returns
the log file
Exceptions
IOExceptionif the log file cannot be determined

Definition at line 223 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.window.Logger.log().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMetaserverCacheFile()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getMetaserverCacheFile ( )
static

Returns the metaserver cache file.

Returns
the metaserver cache file, or
null
if the file cannot be accessed

Definition at line 148 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOriginalImageCacheDir()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getOriginalImageCacheDir ( )
static

Returns the image cache directory.

Returns
the image cache directory

Definition at line 50 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getScaledImageCacheDir()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getScaledImageCacheDir ( )
static

Returns the image cache directory for double size images.

Returns
the image cache directory

Definition at line 65 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSettingsFile() [1/2]

static Path com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile ( ) throws IOException
static

◆ getSettingsFile() [2/2]

static Path com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile ( @NotNull final String  filename) throws IOException
static

Returns a file within the settings directory.

Parameters
filenamethe filename
Returns
the settings file
Exceptions
IOExceptionif the file cannot be accessed

Definition at line 175 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.getCrossfireFile().

Here is the call graph for this function:

◆ getShortcutsFile()

static Path com.realtime.crossfire.jxclient.settings.Filenames.getShortcutsFile ( @NotNull final CharSequence  hostname,
@NotNull final CharSequence  character 
) throws IOException
static

Returns the shortcuts file.

Parameters
hostnamethe hostname of the character;
null
=global key bindings file
characterthe character name;
null
=global key bindings file
Returns
the shortcuts file
Exceptions
IOExceptionif the file cannot be accessed

Definition at line 110 of file Filenames.java.

References com.realtime.crossfire.jxclient.settings.Filenames.encode(), and com.realtime.crossfire.jxclient.settings.Filenames.getSettingsFile().

Referenced by com.realtime.crossfire.jxclient.window.ShortcutsLoader.loadShortcuts().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: