| java.lang.Object com.sun.j3d.utils.universe.ConfigCommand
ConfigCommand | class ConfigCommand (Code) | | Contains the elements which compose a configuration file command,
including the command name, type, and arguments.
|
Field Summary | |
final static int | ALIAS Specifies that this command creates an alias for a ConfigObject of the
same base name. | final static int | ATTRIBUTE Specifies that this command sets an attribute for a class known
to ConfiguredUniverse. | final static int | BUILTIN Specifies that this command is a deferred built-in command that can't
be immediately evaluated by the parser. | final static int | CREATE Specifies that this command creates a new ConfigObject. | final static int | IGNORE Specifes that this command is entirely processed by the
constructor and should be ignored by subsequent recipients. | final static int | INCLUDE Specifies that this command is an include file directive. | final static int | PROPERTY Specifies that this command sets a Java system property or a
property for a class unknown to ConfiguredUniverse. | int | argc The number of arguments in this command, including the command
name. | Object[] | argv An array containing all of this command's arguments, including
the command name. | String | baseName The base name of this command, from which the name of the ConfigObject
subclass that processes it is derived. | String | commandName The name of the command being invoked, which is always the first
argument of the command. | String | fileName The file from which this command was read. | String | instanceName The instance name of the ConfigObject subclass which processes this
command. | int | lineNumber The line number from which this command was read. | int | type The type of this command, either CREATE, PROPERTY, ALIAS,
BUILTIN, INCLUDE, or IGNORE. |
Constructor Summary | |
| ConfigCommand(Collection elements, String fileName, int lineNumber) Constructs a ConfigCommand from configuration file command arguments. |
Method Summary | |
static String | evaluateJavaProperty(String key) Evaluates the specified Java property string if allowed by the security
manager. | static String[] | formatMatrixRows(Matrix3d m3) Calls formatMatrixRows(3, 3, m) , where m is a
an array of doubles retrieved from the given Matrix3d. | static String[] | formatMatrixRows(Matrix4d m4) Calls formatMatrixRows(4, 4, m) , where m is a
an array of doubles retrieved from the given Matrix4d. | static String[] | formatMatrixRows(int rowCount, int colCount, double[] m) Formats a matrix with fixed fractional digits and integer padding to
align the decimal points in columns. | static String | setJavaProperty(String key, String value) Sets the given Java system property if allowed by the security manager. | public String | toString() Returns the String representation of this command. |
ALIAS | final static int ALIAS(Code) | | Specifies that this command creates an alias for a ConfigObject of the
same base name.
|
ATTRIBUTE | final static int ATTRIBUTE(Code) | | Specifies that this command sets an attribute for a class known
to ConfiguredUniverse. As of Java 3D 1.3.1, these commands are
handled the same as property commands (see PROPERTY below) and
this constant is no longer used.
|
BUILTIN | final static int BUILTIN(Code) | | Specifies that this command is a deferred built-in command that can't
be immediately evaluated by the parser. Its evaluation is delayed
until all config objects are instantiated and their properties can be
evaluated.
|
CREATE | final static int CREATE(Code) | | Specifies that this command creates a new ConfigObject.
|
IGNORE | final static int IGNORE(Code) | | Specifes that this command is entirely processed by the
constructor and should be ignored by subsequent recipients.
|
INCLUDE | final static int INCLUDE(Code) | | Specifies that this command is an include file directive.
|
PROPERTY | final static int PROPERTY(Code) | | Specifies that this command sets a Java system property or a
property for a class unknown to ConfiguredUniverse. Properties
for such a class are set by using the reflection API to invoke a
method whose name is specified in the command's argument list.
Such a method must accept an array of Object as its sole
parameter, where that array contains all the command elements
which appear after the method name.
As of Java 3D 1.3.1, this is handled the same as an attribute.
The individual setProperty() method implementations of
ConfigObject determine whether the method to set the property can
be invoked directly or through introspection. If through
introspection, then the evaluation of the property must be
delayed until the target object is instantiated.
|
argc | int argc(Code) | | The number of arguments in this command, including the command
name.
|
argv | Object[] argv(Code) | | An array containing all of this command's arguments, including
the command name.
|
baseName | String baseName(Code) | | The base name of this command, from which the name of the ConfigObject
subclass that processes it is derived. This is constructed by
stripping off the leading "New" prefix or the trailing "Attribute",
"Property", or "Alias" suffix of the command name. The name of the
ConfigObject subclass which handles the command is derived by adding
"Config" as a prefix to the base name.
|
commandName | String commandName(Code) | | The name of the command being invoked, which is always the first
argument of the command.
|
fileName | String fileName(Code) | | The file from which this command was read.
|
instanceName | String instanceName(Code) | | The instance name of the ConfigObject subclass which processes this
command. Together with the base name this provides the handle by which
a ConfigObject can be referenced by other commands in the configuration
file.
|
lineNumber | int lineNumber(Code) | | The line number from which this command was read.
|
type | int type(Code) | | The type of this command, either CREATE, PROPERTY, ALIAS,
BUILTIN, INCLUDE, or IGNORE.
|
ConfigCommand | ConfigCommand(Collection elements, String fileName, int lineNumber)(Code) | | Constructs a ConfigCommand from configuration file command arguments.
Parameters: elements - arguments to this command, including the command name Parameters: fileName - name of the file from where the command was read Parameters: lineNumber - line number where the command is found in the file |
evaluateJavaProperty | static String evaluateJavaProperty(String key)(Code) | | Evaluates the specified Java property string if allowed by the security
manager.
Parameters: key - string containing a Java property name string containing the Java property valaue |
formatMatrixRows | static String[] formatMatrixRows(Matrix3d m3)(Code) | | Calls formatMatrixRows(3, 3, m) , where m is a
an array of doubles retrieved from the given Matrix3d.
Parameters: m3 - matrix to be formatted matrix rows formatted into strings |
formatMatrixRows | static String[] formatMatrixRows(Matrix4d m4)(Code) | | Calls formatMatrixRows(4, 4, m) , where m is a
an array of doubles retrieved from the given Matrix4d.
Parameters: m4 - matrix to be formatted matrix rows formatted into strings |
formatMatrixRows | static String[] formatMatrixRows(int rowCount, int colCount, double[] m)(Code) | | Formats a matrix with fixed fractional digits and integer padding to
align the decimal points in columns. Non-negative numbers print up to
7 integer digits, while negative numbers print up to 6 integer digits
to account for the negative sign. 6 fractional digits are printed.
Parameters: rowCount - number of rows in the matrix Parameters: colCount - number of columns in the matrix Parameters: m - matrix to be formatted matrix rows formatted into strings |
setJavaProperty | static String setJavaProperty(String key, String value)(Code) | | Sets the given Java system property if allowed by the security manager.
Parameters: key - property name Parameters: value - property value previous property value if any |
toString | public String toString()(Code) | | Returns the String representation of this command.
string representing this command |
|
|