FreeWRL/FreeX3D
3.0.0
Main Page
Related Pages
Data Structures
Files
File List
FWProtoDeclaration.java
1
package
sai;
2
import
org.web3d.x3d.sai.*;
3
import
java.util.*;
4
5
public
class
FWProtoDeclaration
implements
X3DProtoDeclaration
,
X3DExternProtoDeclaration
{
6
String protoName;
7
FreeWRLFieldDefinition
[] fields;
8
FreeWRLBrowser
browser;
9
int
nodeType;
10
11
FWProtoDeclaration
(
FreeWRLBrowser
b) {
12
browser = b;
13
}
14
public
String getProtoName() {
15
return
protoName;
16
}
17
18
public
String toString() {
19
String temp;
20
temp =
""
+ protoName +
" "
+ FreeWRLFieldTypes.getStringDesc(nodeType);
21
temp = temp +
" "
+ fields.length;
22
for
(
int
i = 0; i < fields.length; i++) {
23
temp = temp +
" "
+ fields[i].getFieldTypeString() +
" "
+ fields[i].getName() +
" "
+ fields[i].getDefault();
24
}
25
26
return
temp;
27
28
}
29
public
X3DProtoInstance
createInstance()
throws
InvalidOperationTimingException
,
InvalidProtoException
{
30
String retval;
31
StringTokenizer tokens;
32
FWProtoInstance
proto;
33
34
retval = browser.sendGlobalCommand(
"b "
+ protoName);
35
tokens =
new
StringTokenizer(retval);
36
proto =
new
FWProtoInstance
(browser);
37
proto.setNodeName(tokens.nextToken());
38
proto.setPointer(tokens.nextToken());
39
40
return
proto;
41
}
42
public
X3DFieldDefinition
[] getFieldDefinitions()
throws
InvalidOperationTimingException
,
InvalidProtoException
{
43
return
fields;
44
}
45
46
public
int
getLoadState() {
47
return
-1;
48
}
49
50
public
void
loadNow() {
51
}
52
53
public
void
setProtoName(String name) {
54
protoName = name;
55
}
56
57
public
void
setFields(
FreeWRLFieldDefinition
[] f) {
58
fields = f;
59
}
60
61
public
void
setType(
int
t) {
62
nodeType = t;
63
}
64
65
public
int
[] getNodeType()
throws
InvalidProtoException
{
66
int
[] types;
67
types =
new
int
[1];
68
types[0] = nodeType;
69
70
return
types;
71
}
72
73
public
void
dispose() {
74
75
}
76
}
org.web3d.x3d.sai.X3DProtoDeclaration
Definition:
X3DProtoDeclaration.java:3
org.web3d.x3d.sai.InvalidProtoException
Definition:
InvalidProtoException.java:3
sai.FWProtoInstance
Definition:
FWProtoInstance.java:4
org.web3d.x3d.sai.X3DFieldDefinition
Definition:
X3DFieldDefinition.java:3
sai.FWProtoDeclaration
Definition:
FWProtoDeclaration.java:5
org.web3d.x3d.sai.X3DProtoInstance
Definition:
X3DProtoInstance.java:3
org.web3d.x3d.sai.X3DExternProtoDeclaration
Definition:
X3DExternProtoDeclaration.java:3
sai.FreeWRLFieldDefinition
Definition:
FreeWRLFieldDefinition.java:4
org.web3d.x3d.sai.InvalidOperationTimingException
Definition:
InvalidOperationTimingException.java:3
sai.FreeWRLBrowser
Definition:
FreeWRLBrowser.java:18
src
java
sai
FWProtoDeclaration.java
Generated on Thu Dec 14 2017 12:14:40 for FreeWRL/FreeX3D by
1.8.6