|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface to any X3D field. Provides all methods available on fields.
Field Summary | |
static int |
EVENTIN
|
static int |
EVENTOUT
|
static int |
EXPOSEDFIELD
|
static int |
MFColor
|
static int |
MFFloat
|
static int |
MFInt32
|
static int |
MFNode
|
static int |
MFRotation
|
static int |
MFString
|
static int |
MFTime
|
static int |
MFVec2f
|
static int |
MFVec3f
|
static int |
SFBool
|
static int |
SFColor
|
static int |
SFFloat
|
static int |
SFImage
|
static int |
SFInt32
|
static int |
SFNode
|
static int |
SFRotation
|
static int |
SFString
|
static int |
SFTime
|
static int |
SFVec2f
|
static int |
SFVec3f
|
static int |
UNKNOWN_FIELD
|
Method Summary | |
void |
addObserver(EventObserver observer,
java.lang.Object userData)
Add an observer for a field with read capability (EventOut or ExposedField) the observer object will be notified of any changes to this field |
int |
getAccessType()
Get the access type of this field, e.g. |
int |
getLength()
get the number of values in this field returns the number of single values, e.g an SFVec3f has the length 3 |
java.lang.String |
getName()
Get the name of this field. |
int |
getType()
Get the basic type of this field, e.g. |
boolean |
getValueBool()
get the value of an SFBool |
double |
getValueDouble()
get the value of an SFTime |
double[] |
getValueDoubleArray(int start,
int count)
get the value of an MFTime implementations may return a reference instead of a copy of the data of the field if the applications changes data in the returned array, the field must be notified using setValue(array) |
float |
getValueFloat()
get the value of an SFFloat |
float[] |
getValueFloatArray(int start,
int count)
get the value of an SFVec3f, MFFloat, etc. |
int |
getValueInt()
get the value of an SFInt32 |
int[] |
getValueIntArray(int start,
int count)
get the value of an MFInt32 implementations may return a reference instead of a copy of the data of the field if the applications changes data in the returned array, the field must be notified using setValue(array) |
Node |
getValueNode()
get the value of an SFNode |
Node[] |
getValueNodeArray(int start,
int count)
get the value of an MFNode |
java.lang.String |
getValueString()
get the value of an SFString |
java.lang.String[] |
getValueStringArray(int start,
int count)
get the value of an MFString implementations may return a reference instead of a copy of the data of the field if the applications changes data in the returned array, the field must be notified using setValue(array) |
void |
removeObserver(EventObserver observer,
java.lang.Object userData)
Remove a observer for changes in this field. the observer has been added before with addObserver |
void |
setValueBool(boolean value)
set the value of an SFBool |
void |
setValueDouble(double value)
set the value of an SFTime |
void |
setValueDoubleArray(int start,
int count,
double[] value)
set the value of an MFTime |
void |
setValueFloat(float value)
set the value of an SFFloat |
void |
setValueFloatArray(int start,
int count,
float[] value)
set the value of an SFVec3f, MFFloat, etc. |
void |
setValueInt(int value)
set the value of an SFInt32 |
void |
setValueIntArray(int start,
int count,
int[] value)
set the value of an MFInt32 |
void |
setValueNode(Node value)
set the value of an SFNode |
void |
setValueNodeArray(int start,
int count,
Node[] value)
set the value of an MFNode |
void |
setValueString(java.lang.String value)
set the value of an SFString |
void |
setValueStringArray(int start,
int count,
java.lang.String[] value)
set the value of an MFString implementations may return a reference instead of a copy of the data of the field if the applications changes data in the returned array, the field must be notified using setValue(array) |
Field Detail |
public static final int SFBool
public static final int SFColor
public static final int SFFloat
public static final int SFImage
public static final int SFInt32
public static final int SFNode
public static final int SFRotation
public static final int SFString
public static final int SFTime
public static final int SFVec2f
public static final int SFVec3f
public static final int MFColor
public static final int MFFloat
public static final int MFInt32
public static final int MFNode
public static final int MFRotation
public static final int MFString
public static final int MFTime
public static final int MFVec2f
public static final int MFVec3f
public static final int UNKNOWN_FIELD
public static final int EVENTIN
public static final int EVENTOUT
public static final int EXPOSEDFIELD
Method Detail |
public int getType()
public int getAccessType()
public java.lang.String getName()
public void addObserver(EventObserver observer, java.lang.Object userData)
the observer object will be notified of any changes to this field
observer
- The observer to adduserData
- The data to associate with this observer instance, can be nullpublic void removeObserver(EventObserver observer, java.lang.Object userData)
the observer has been added before with addObserver
observer
- The observer to removeuserData
- The userData associated with this observer instancepublic int getLength()
public boolean getValueBool() throws java.lang.IllegalArgumentException
public double getValueDouble() throws java.lang.IllegalArgumentException
public int getValueInt() throws java.lang.IllegalArgumentException
public float getValueFloat() throws java.lang.IllegalArgumentException
public java.lang.String getValueString() throws java.lang.IllegalArgumentException
public Node getValueNode() throws java.lang.IllegalArgumentException
public double[] getValueDoubleArray(int start, int count) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is read.public int[] getValueIntArray(int start, int count) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is read.public java.lang.String[] getValueStringArray(int start, int count) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is read.public float[] getValueFloatArray(int start, int count) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is read.public Node[] getValueNodeArray(int start, int count) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is read.public void setValueBool(boolean value) throws java.lang.IllegalArgumentException
value
- the new value for the fieldpublic void setValueDouble(double value) throws java.lang.IllegalArgumentException
value
- the new value for the fieldpublic void setValueInt(int value) throws java.lang.IllegalArgumentException
value
- the new value for the fieldpublic void setValueFloat(float value) throws java.lang.IllegalArgumentException
public void setValueString(java.lang.String value) throws java.lang.IllegalArgumentException
public void setValueNode(Node value) throws java.lang.IllegalArgumentException
public void setValueDoubleArray(int start, int count, double[] value) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is written.public void setValueIntArray(int start, int count, int[] value) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is written.public void setValueStringArray(int start, int count, java.lang.String[] value) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is written.public void setValueFloatArray(int start, int count, float[] value) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is written.public void setValueNodeArray(int start, int count, Node[] value) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException
start
- the start value, normally 0count
- the number of values. if -1 the whole array is read.
|
Questions or comments. Copyright 1999, Bitmanagement Software, Inc. |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |