6 // Michael Kircher (mk1@cs.wustl.edu)
9 // This class serves as factory for Visualization Components
11 // ============================================================================
15 class VisCompFactory
{
17 VisComp
getNewVisComp (int property
, String name
) {
19 ClassLoader classLoader_
= this.getClass().getClassLoader();
21 VisComp visComp_
= null;
22 String visCompName_
= "VisComp";
24 case Properties
.DOUBLE
:
25 visCompName_
= "Double"+visCompName_
;
27 case Properties
.NAVIGATION
:
28 visCompName_
= "Navigation"+visCompName_
;
30 case Properties
.WEAPONS
:
31 visCompName_
= "Weapons"+visCompName_
;
33 case Properties
.PERSIAN
:
34 visCompName_
= "Persian"+visCompName_
;
36 case Properties
.MULTIDOUBLE
:
37 visCompName_
= "MultiDouble"+visCompName_
;
42 System
.out
.println ("Trying to connect: " + visCompName_
+ " .. ");
43 visComp_
= (VisComp
) Beans
.instantiate (classLoader_
, visCompName_
);
44 visComp_
.setName (name
);
45 System
.out
.println ("Connected: " + visCompName_
);
49 System
.out
.println ("Unable to load JavaBean: " + e
);