|
||||||||||
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 |
AVATAR_CONFIG_BASE_URI_KEY
|
static java.lang.String |
AVATAR_CONFIG_PROPS_FILE
|
static java.lang.String |
AVATAR_CONFIG_PROPS_PFX
|
static java.lang.String |
AVATAR_ID_KEY
|
static java.lang.String |
AVATAR_ID_LIST_KEY
|
static java.lang.String |
AVATAR_JAR_BASE_URI_KEY
|
static java.lang.String |
CACHEABLE_AVATAR_LIST_KEY
|
static java.lang.String |
DEFAULT_JA_PREFS
Default Preferences node name. |
static java.lang.String |
DEFAULT_PROPS_FILE
Common defaults properties file name. |
static java.lang.String |
DIRECT_FILES_AVATAR_LIST_KEY
|
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. |
java.lang.String |
avatarJarBaseURL()
Returns the setting of the "avatar.jar.base.uri" option. |
boolean |
avatarMenuDoUseSubmenus()
Returns the setting of the "avatar.menu.do.use.submenus" option. |
java.lang.String |
avatarSubmenuSpecs()
Returns the setting of the "avatar.submenu.specs" option. |
float[] |
backgroundRGB()
Returns an array of three RGB values taken from the "background.rgb" option if set, otherwise null . |
float |
busyAmbientMaxScale()
Returns the current setting of the "busy.ambient.max.scale" 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. |
static java.lang.String |
cacheableAvatarURIKey(java.lang.String avname)
Returns the cacheable avatar URI key for the given avatar name. |
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. |
static java.lang.String |
directFilesAvatarURIKey(java.lang.String avname)
Returns the direct files avatar URI key for the given avatar name. |
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 |
doBusyAmbient()
Returns the current setting of the "do.busy.ambient" option. |
boolean |
doForceAWT()
Returns the setting of the "do.use.awt.only" option. |
boolean |
doIdleAmbient()
Returns the current setting of the "do.idle.ambient" option. |
boolean |
doLazyAvatarCacheRefresh()
Returns the setting of the "do.lazy.avatar.cache.refresh" option. |
boolean |
doLogAnimationSummary()
Returns the setting of the "player.do.log.animation.summary" option. |
boolean |
doLogDroppedFrames()
Returns the setting of the "player.do.log.dropped.frames" option. |
boolean |
doLogDroppedFramesSummary()
Returns the setting of the "player.do.log.dropped.frames.summary" option. |
boolean |
doShowAnimationTimes()
Returns the setting of the "player.do.show.animation.times" option. |
boolean |
doStreamedAnimationBuild()
Returns the setting of the "do.streamed.animation.build" option. |
JAAvatarsEnv |
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 float 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. |
float |
getScaleProperty(java.lang.String key)
Returns the scale float property with the given key, whose
value is necessarily in the range [0..1]. |
BasicOptionSet |
getStandardAvatarOptions()
Returns the standard avatar option set. |
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 but it may be empty. |
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. |
int |
idleAmbientContinueWaitMS()
Returns the current setting of the "idle.ambient.continue.wait.ms" option. |
int |
idleAmbientInitialWaitMS()
Returns the current setting of the "idle.ambient.initial.wait.ms" option. |
float |
idleAmbientMaxScale()
Returns the current setting of the "idle.ambient.max.scale" option. |
static java.lang.String[] |
JA_OPTION_KEYS()
Returns a list of known JA Option key names. |
static JAOptions |
makeJAOptions(java.lang.String dfltnm,
java.lang.String[] args,
java.applet.Applet applet,
JAEnv jaenv)
Factory method for a new JAOptions set, with dfltnm
as the default options name, and with supplementary options and
their mode as specified by the given command-line arguments
(see JAOptions class description);
the option set belongs to an application, and
jaenv is the JA environment that hosts it. |
static JAOptions |
makeJAOptions(java.lang.String dfltnm,
java.lang.String[] args,
java.applet.Applet applet,
java.util.Properties argProps,
JAEnv jaenv)
Factory method for a new JAOptions set, with dfltnm
as the default options name, prefs , and with supplementary
options and their mode as specified by the given
command-line arguments (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 dfltnm,
java.lang.String[] args,
java.util.Properties argProps,
JAEnv jaenv)
|
boolean |
meshDuplicatesFormatIsNew()
Returns the setting of the "mesh.duplicates.format.is.new" option. |
int |
playerDropRangeLimitMS()
Returns the setting of the "player.drop.range.limit.ms" option. |
int |
playerFrameDriftLimitMS()
Returns the setting of the "player.frame.drift.limit.ms" option. |
int |
playerInitialLookaheadMS()
Returns the setting of the "player.initial.frames.lookahead.ms" option. |
static java.lang.String[] |
stringList(java.lang.String list)
Returns the result of splitting the given list string into an array of strings, splitting on the standard separator string, ":" ;
the result is guaranteed to be non-null but it may be empty. |
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 |
updateAnimgenFPS(float fps)
Updates the "animgen.fps" option with the given value. |
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 "default.sigml.base.uri" property. |
void |
updateDoBusyAmbient(boolean dba)
Updates the current setting for the "do.busy.ambient" option. |
void |
updateDoIdleAmbient(boolean dia)
Updates the current setting for the "do.idle.ambient" option. |
void |
updateDoLogDroppedFrames(boolean doldf)
Updates the "player.do.log.dropped.frames" option. |
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
public static final java.lang.String AVATAR_CONFIG_PROPS_FILE
public static final java.lang.String AVATAR_CONFIG_PROPS_PFX
public static final java.lang.String AVATAR_CONFIG_BASE_URI_KEY
public static final java.lang.String AVATAR_JAR_BASE_URI_KEY
public static final java.lang.String AVATAR_ID_KEY
public static final java.lang.String AVATAR_ID_LIST_KEY
public static final java.lang.String DIRECT_FILES_AVATAR_LIST_KEY
public static final java.lang.String CACHEABLE_AVATAR_LIST_KEY
Method Detail |
---|
public static JAOptions makeJAOptions(java.lang.String dfltnm, java.lang.String[] args, java.applet.Applet applet, JAEnv jaenv)
JAOptions
set, with dfltnm
as the default options name, and with supplementary options and
their mode as specified by the given command-line arguments
(see JAOptions
class description);
the option set belongs to an application, and
jaenv
is the JA environment that hosts it.
If the given arguments specify a properties file URL for supplementary
option settings, then the (stem of) that file name is also used as the
name of the option set's associated preferences node; otherwise
the given default options name is used as the preferences node name
and as the supplementary properties file name.
public static JAOptions makeJAOptions(java.lang.String dfltnm, java.lang.String[] args, java.util.Properties argProps, JAEnv jaenv)
public static JAOptions makeJAOptions(java.lang.String dfltnm, java.lang.String[] args, java.applet.Applet applet, java.util.Properties argProps, JAEnv jaenv)
JAOptions
set, with dfltnm
as the default options name, prefs
, and with supplementary
options and their mode as specified by the given
command-line arguments (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.
If the given arguments specify a properties file URL for supplementary
option settings, then (the stem of) that file name is also used as the
name of the option set's associated preferences node; otherwise
the given default options name is used as the preferences node name
and as the supplementary properties file name.
public JAEnv getJAEnv()
JAEnv
instance for this JAOptions
set.
public JAAvatarsEnv getAvatarsEnv()
JAOptions
set.
public BasicOptionSet getStandardAvatarOptions()
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 static java.lang.String[] stringList(java.lang.String list)
":"
;
the result is guaranteed to be non-null but it may be empty.
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 but it may be empty.
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)
float
property with the given key.
public float getScaleProperty(java.lang.String key)
float
property with the given key, whose
value is necessarily in the range [0..1].
public boolean doForceAWT()
public boolean doStreamedAnimationBuild()
public void updateDoStreamedAnimationBuild(boolean dosab)
public boolean doAvatarSkinSliding()
public boolean doAvatarSelfSliding()
public int[] appWindowLocationAndSize()
public void updateAppWindowLocationAndSize(int[] xywh)
public float[] backgroundRGB()
null
. The option values should be
unsigned integers, which this method converts to OpenGL-style
floating point values.
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 avatarJarBaseURL()
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 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 void updateAnimgenFPS(float fps)
public java.lang.String defaultSiGMLBaseURL()
public void updateDefaultSiGMLBaseURL(java.lang.String base)
public int playerInitialLookaheadMS()
public int playerFrameDriftLimitMS()
public int playerDropRangeLimitMS()
public boolean doLogDroppedFrames()
public boolean doShowAnimationTimes()
public boolean doLogAnimationSummary()
public boolean doLogDroppedFramesSummary()
public void updateDoLogDroppedFrames(boolean doldf)
public boolean doIdleAmbient()
public boolean doBusyAmbient()
public float idleAmbientMaxScale()
public float busyAmbientMaxScale()
public int idleAmbientInitialWaitMS()
public int idleAmbientContinueWaitMS()
public void updateDoIdleAmbient(boolean dia)
public void updateDoBusyAmbient(boolean dba)
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 java.lang.String directFilesAvatarURIKey(java.lang.String avname)
public static java.lang.String cacheableAvatarURIKey(java.lang.String avname)
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 |