|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.JAOptions
public class JAOptions
A JAOptions
is a complete collection of options settings
associated with a given Java ARP avatar canvas (or with the
applet/application instance containing that canvas), and backed
by one or more nodes in the User Preferences hierarchy of the
underlying platform.
For Windows systems, user preferences are stored in the
Registry under the key
HKEY_CURRENT_USER\Software\JavaSoft\Prefs
while under Mac OS X, user preferences are held as a plist in the
directory
~/Library/Preferences
JA preferences nodes are all held (currently) under the user
Preferences node
/uk/ac/uea/cmp/ja
A JAOptions
collection is supported by a hierarchical
chain of BasicOptionSet
s, in order of precedence from
highest to lowest:
A user-configurable option set is usually backed by a Preferences
node.
For an application-specific option set, the name of this Preferences
node is fixed by the application; for the system-wide option set
the Preferences node name is jadefaults
.
In general, when an option set is created it is initialised
from its associated Preferences node, possibly supplemented by
a user-supplied properties file.
In the case where a properties file is supplied,
the associated Preferences node may optionally be
updated permanently from that file.
Note that applets are more restricted than applications in their power to manipulate permanent the options settings permanently recorded in the Preferences nodes.
When a JAOptions
collection is constructed, it is supplied
with a JAEnv
utilities processor, and defined
by the name of the associated application-specific Preferences
node, together with a pair of CLI-style argument strings, which
specify the application-specific Properties URL and its mode of use:
[(-s[ession] | -u[pdate])] [properties-URL]
The first argument indicates whether the properties are to be
used for the given session only, or if the associated Preferences
node is to be permanantly updated with these properties;
the default value is -session
only.
If the properties-URL
argument is omitted the associated
Preferences node name is used (resolved against the appropriate
base URL).
A properties file name with no extension automatically has the
the extension .properties
appended to it.
Nested Class Summary | |
---|---|
static interface |
JAOptions.KeyChecker
Key validity checking interface -- used when checking that a given preference key is valid in the context of an applet, as opposed to an app. |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_JA_PREFS
Default Preferences node name. |
static java.lang.String |
DEFAULT_PROPS_FILE
Common defaults properties file name. |
static char |
SEPARATOR
Separator character for multi-component string option values. |
static java.lang.String |
SEPARATOR_STR
String containing the separator character for multi-component string option values. |
Method Summary | |
---|---|
boolean |
animgenDoLog()
Returns the setting of the "animgen.do.log" option. |
float |
animgenFPS()
Returns the setting of the "animgen.fps" (frames-per-second) option. |
boolean |
animgenLogDoAppend()
Returns the setting of the "animgen.log.do.append" option. |
java.lang.String |
animgenLogFileURL()
Returns the setting of the "animgen.log.file.uri" option. |
int[] |
appWindowLocationAndSize()
Returns the values (x,y,width,height) from the "app.window.loc.size" option. |
java.lang.String |
avatarConfigBaseURL()
Returns the setting of the "avatar.config.base.uri" option. |
boolean |
avatarDefinitionIsToBeSaved()
Returns the setting of the "avatar.definition.do.save" option. |
java.lang.String |
avatarDefinitionSaveURL()
Returns the setting of the "avatar.definition.save.uri" option. |
java.lang.String |
avatarDefinitionVersion()
Returns the setting of the "avatar.definition.version" option. |
java.lang.String |
avatarID()
Returns the setting of the "avatar.id" option. |
java.lang.String[] |
avatarIDList()
Returns the setting of the "avatar.id.list" option. |
boolean |
avatarMenuDoUseSubmenus()
Returns the setting of the "avatar.menu.do.use.submenus" option. |
java.lang.String |
avatarSpecialDefinitionURL()
Returns the setting of the "avatar.special.definition.uri" option. |
java.lang.String |
avatarSubmenuSpecs()
Returns the setting of the "avatar.submenu.specs" option. |
java.lang.String[] |
cacheableAvatarList()
Returns the setting of the "cacheable.avatar.list" option. |
java.lang.String |
cacheableAvatarURI(java.lang.String avatar)
Returns the setting of the cacheable avatar URI key for the given avatar. |
float[] |
cameraSettings()
Returns an array of camera-settings values taken from the "camera.settings" option; any entries for which no setting is available will be set to -1. |
float[] |
cameraSettings(int SIZE)
Returns an array of camera-settings values taken from the "camera.settings" option; the array has the given size if that value is non-negative, or the actual number of available settings values otherwise; any entries for which no setting is available will be set to -1. |
float[] |
cameraSettings(int SIZE,
float DFLT)
Returns an array of camera-settings values taken from the "camera.settings" option; the array has the given size if that value is non-negative, or the actual number of available settings values otherwise; any entries for which no setting is available will be set to the given default value. |
static java.lang.String |
cameraSettingsString(float[] cam)
Returns the string representataion of the given camera settings values. |
java.lang.String |
defaultSiGMLBaseURL()
Returns the setting of the "default.sigml.base.uri" option. |
java.lang.String[] |
directFilesAvatarList()
Returns the setting of the "direct.files.avatar.list" option. |
java.lang.String |
directFilesAvatarURI(java.lang.String avatar)
Returns the setting of the direct files avatar base URI key for the given avatar. |
boolean |
doAvatarSelfSliding()
Returns the setting of the "do.avatar.self.sliding" option. |
boolean |
doAvatarSkinSliding()
Returns the setting of the "do.avatar.skin.sliding" option. |
boolean |
doForceAWT()
Returns the setting of the "do.use.awt.only" option. |
boolean |
doLazyAvatarCacheRefresh()
Returns the setting of the "do.lazy.avatar.cache.refresh" option. |
boolean |
doShowAnimationTimes()
Returns the setting of the "do.show.animation.times" option. |
boolean |
doStreamedAnimationBuild()
Returns the setting of the "do.streamed.animation.build" option. |
AvatarsEnv |
getAvatarsEnv()
Returns the avatars-data handler for this JAOptions set. |
java.lang.String |
getBaseURLProperty(java.lang.String key)
Returns the Base URL property with the given key. |
boolean |
getBooleanProperty(java.lang.String key)
Returns the boolean property with the given key. |
float |
getFloatProperty(java.lang.String key)
Returns the int property with the given key. |
int |
getIntegerProperty(java.lang.String key)
Returns the int property with the given key. |
JAEnv |
getJAEnv()
Returns the JAEnv instance for this JAOptions set. |
java.lang.String |
getOutputURLProperty(java.lang.String key)
Returns the Output URL property with the given key. |
java.lang.String[] |
getStringListProperty(java.lang.String key)
Returns the String list property with the given key,
obtained by obtaining the property as a String and
splitting it on the standard separator character, ":" ;
the result is guaranteed to be non-null. |
java.lang.String |
getStringProperty(java.lang.String key)
Returns the String property with the given key. |
java.lang.String |
getURLProperty(java.lang.String key)
Returns the URL property with the given key. |
static java.lang.String[] |
JA_OPTION_KEYS()
Returns a list of known JA Option key names. |
static JAOptions |
makeJAOptions(java.lang.String prefs,
java.lang.String[] args,
java.applet.Applet applet,
JAEnv jaenv)
Factory method for a new JAOptions set, using
the Preferences node name prefs , with
supplementary options and their mode as specified by the given
command-line argumments (see JAOptions class description);
applet is the applet that owns the option set, or null
if the set belongs to an application, and
jaenv is the JA environment that hosts the option set. |
static JAOptions |
makeJAOptions(java.lang.String prefs,
java.lang.String[] args,
JAEnv jaenv)
Factory method for a new JAOptions set, using
the Preferences node name prefs , with
supplementary options and their mode as specified by the given
command-line argumments (see JAOptions class description);
the option set belongs to an application, and
jaenv is the JA environment that hosts it. |
boolean |
meshDuplicatesFormatIsNew()
Returns the setting of the "mesh.duplicates.format.is.new" option. |
int |
playerFramesDriftLimitMS()
Returns the setting of the "player.frame.drift.limit.ms" option. |
boolean |
textureFileOnlyIsToBeSaved()
Returns a flag value indicating whether or not the texture file alone is to be saved, that is, if the texture is to be saved as a separate file, but not as part of the process of saving the main JARP avatar definition. |
boolean |
textureInputFormatIsJARP()
Returns the setting of the "texture.input.format.is.jarp" option. |
boolean |
textureInputIsCompressed()
Returns the setting of the "texture.input.is.compressed" option. |
boolean |
textureInputIsFlipped()
Returns the setting of the "texture.input.is.flipped" option. |
boolean |
textureInputIsSeparate()
Returns the setting of the "texture.input.is.separate" option. |
java.lang.String |
textureInputURL()
Returns the setting of the "texture.input.uri" option. |
boolean |
textureIsToBeSaved()
Returns the setting of the "texture.do.save" option. |
boolean |
textureOutputDoCompressed()
Returns the setting of the "texture.output.do.compressed" option. |
boolean |
textureOutputDoFlipPNG()
Returns the setting of the "texture.output.do.flip.png" option. |
boolean |
textureOutputDoPNG()
Returns the setting of the "texture.output.do.png" option. |
boolean |
textureOutputIsSeparate()
Returns the setting of the "texture.output.is.separate" option. |
java.lang.String |
textureSaveFileURL()
Returns the setting of the "texture.save.file.uri" option. |
java.lang.String |
textureSeparateFileName()
Returns the setting of the "texture.separate.file.name" option. |
void |
updateAppWindowLocationAndSize(int[] xywh)
Updates the "app.window.loc.size" option with the given values (x,y,width,height). |
void |
updateAvatarID(java.lang.String avatar)
Updates the "avatar.id" property. |
void |
updateBooleanProperty(java.lang.String key,
boolean bval)
Updates this options collection and, if appropriate, the underlying preferences with the given boolean key-value pair. |
void |
updateCameraSettings(float[] cam)
Updates the "camera.settings" option with the given values. |
void |
updateDefaultSiGMLBaseURL(java.lang.String base)
Updates the "avatar.id" property. |
void |
updateDoStreamedAnimationBuild(boolean dosab)
Updates the "do.streamed.animation.build" option with the given flag value. |
void |
updateStringProperty(java.lang.String key,
java.lang.String value)
Updates this options collection and, if appropriate, the underlying preferences with the given key-value pair. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char SEPARATOR
public static final java.lang.String SEPARATOR_STR
public static final java.lang.String DEFAULT_JA_PREFS
public static final java.lang.String DEFAULT_PROPS_FILE
Method Detail |
---|
public static JAOptions makeJAOptions(java.lang.String prefs, java.lang.String[] args, JAEnv jaenv)
JAOptions
set, using
the Preferences node name prefs
, with
supplementary options and their mode as specified by the given
command-line argumments (see JAOptions
class description);
the option set belongs to an application, and
jaenv
is the JA environment that hosts it.
public static JAOptions makeJAOptions(java.lang.String prefs, java.lang.String[] args, java.applet.Applet applet, JAEnv jaenv)
JAOptions
set, using
the Preferences node name prefs
, with
supplementary options and their mode as specified by the given
command-line argumments (see JAOptions
class description);
applet
is the applet that owns the option set, or null
if the set belongs to an application, and
jaenv
is the JA environment that hosts the option set.
public JAEnv getJAEnv()
JAEnv
instance for this JAOptions
set.
public AvatarsEnv getAvatarsEnv()
JAOptions
set.
public void updateStringProperty(java.lang.String key, java.lang.String value)
public void updateBooleanProperty(java.lang.String key, boolean bval)
public java.lang.String getStringProperty(java.lang.String key)
String
property with the given key.
public java.lang.String[] getStringListProperty(java.lang.String key)
String
list property with the given key,
obtained by obtaining the property as a String
and
splitting it on the standard separator character, ":"
;
the result is guaranteed to be non-null.
public boolean getBooleanProperty(java.lang.String key)
boolean
property with the given key.
public java.lang.String getURLProperty(java.lang.String key)
public java.lang.String getBaseURLProperty(java.lang.String key)
public java.lang.String getOutputURLProperty(java.lang.String key)
public int getIntegerProperty(java.lang.String key)
int
property with the given key.
public float getFloatProperty(java.lang.String key)
int
property with the given key.
public boolean doForceAWT()
public boolean doShowAnimationTimes()
public boolean doStreamedAnimationBuild()
public void updateDoStreamedAnimationBuild(boolean dosab)
public boolean doAvatarSkinSliding()
public boolean doAvatarSelfSliding()
public int[] appWindowLocationAndSize()
public void updateAppWindowLocationAndSize(int[] xywh)
public float[] cameraSettings(int SIZE, float DFLT)
public float[] cameraSettings(int SIZE)
public float[] cameraSettings()
public void updateCameraSettings(float[] cam)
public static java.lang.String cameraSettingsString(float[] cam)
public java.lang.String avatarConfigBaseURL()
public java.lang.String avatarID()
public void updateAvatarID(java.lang.String avatar)
public java.lang.String[] avatarIDList()
public java.lang.String[] directFilesAvatarList()
public java.lang.String[] cacheableAvatarList()
public java.lang.String directFilesAvatarURI(java.lang.String avatar)
public java.lang.String cacheableAvatarURI(java.lang.String avatar)
public boolean avatarMenuDoUseSubmenus()
public java.lang.String avatarSubmenuSpecs()
public java.lang.String avatarSpecialDefinitionURL()
public java.lang.String avatarDefinitionVersion()
public java.lang.String avatarDefinitionSaveURL()
public boolean avatarDefinitionIsToBeSaved()
public boolean doLazyAvatarCacheRefresh()
public java.lang.String animgenLogFileURL()
public boolean animgenDoLog()
public boolean animgenLogDoAppend()
public float animgenFPS()
public java.lang.String defaultSiGMLBaseURL()
public void updateDefaultSiGMLBaseURL(java.lang.String base)
public int playerFramesDriftLimitMS()
public boolean meshDuplicatesFormatIsNew()
public java.lang.String textureInputURL()
public boolean textureInputIsSeparate()
public boolean textureInputFormatIsJARP()
public boolean textureInputIsCompressed()
public boolean textureInputIsFlipped()
public java.lang.String textureSeparateFileName()
public boolean textureOutputIsSeparate()
public boolean textureOutputDoCompressed()
public boolean textureOutputDoPNG()
public boolean textureOutputDoFlipPNG()
public java.lang.String textureSaveFileURL()
public boolean textureIsToBeSaved()
public boolean textureFileOnlyIsToBeSaved()
public static final java.lang.String[] JA_OPTION_KEYS()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |