Source code: com/prolifics/jni/ClassTagFactory.java
1 /* @(#)ClassTagFactory.java 77.6 99/01/13 16:22:08 */
2
3 /*************************************************/
4 /* Copyright (c) 1998 */
5 /* by */
6 /* JYACC, Inc., New York NY USA */
7 /* and contributors. */
8 /* Use of this program is governed by the */
9 /* JYACC Public License Version 1.0, a copy of */
10 /* which can be obtained at */
11 /* http://www.possl.org/jyacc-license.html */
12 /*************************************************/
13
14 package com.prolifics.jni;
15
16 /**
17 ClassTagFactory assumes that the Prolifics Java tags represent class names.
18 */
19 public class ClassTagFactory implements FactoryInterface
20 {
21 public ClassTagFactory(ApplicationInterface application)
22 {
23 }
24
25 public ScreenHandler getScreenHandler(String tag) throws
26 ClassNotFoundException, InstantiationException, IllegalAccessException
27 {
28 return (ScreenHandler)Class.forName(tag).newInstance();
29 }
30
31 public GroupHandler getGroupHandler(String tag) throws
32 ClassNotFoundException, InstantiationException, IllegalAccessException
33 {
34 return (GroupHandler)Class.forName(tag).newInstance();
35 }
36
37 public GridHandler getGridHandler(String tag) throws
38 ClassNotFoundException, InstantiationException, IllegalAccessException
39 {
40 return (GridHandler)Class.forName(tag).newInstance();
41 }
42
43 public DynamicLabelHandler getDynamicLabelHandler(String tag) throws
44 ClassNotFoundException, InstantiationException, IllegalAccessException
45 {
46 return (DynamicLabelHandler)Class.forName(tag).newInstance();
47 }
48 public TextHandler getTextHandler(String tag) throws
49 ClassNotFoundException, InstantiationException, IllegalAccessException
50 {
51 return (TextHandler)Class.forName(tag).newInstance();
52 }
53 public ButtonHandler getButtonHandler(String tag) throws
54 ClassNotFoundException, InstantiationException, IllegalAccessException
55 {
56 return (ButtonHandler)Class.forName(tag).newInstance();
57 }
58 public RadiobuttonHandler getRadiobuttonHandler(String tag) throws
59 ClassNotFoundException, InstantiationException, IllegalAccessException
60 {
61 return (RadiobuttonHandler)Class.forName(tag).newInstance();
62 }
63 public CheckboxHandler getCheckboxHandler(String tag) throws
64 ClassNotFoundException, InstantiationException, IllegalAccessException
65 {
66 return (CheckboxHandler)Class.forName(tag).newInstance();
67 }
68 public ListboxHandler getListboxHandler(String tag) throws
69 ClassNotFoundException, InstantiationException, IllegalAccessException
70 {
71 return (ListboxHandler)Class.forName(tag).newInstance();
72 }
73 public OptionmenuHandler getOptionmenuHandler(String tag) throws
74 ClassNotFoundException, InstantiationException, IllegalAccessException
75 {
76 return (OptionmenuHandler)Class.forName(tag).newInstance();
77 }
78 public TogglebuttonHandler getTogglebuttonHandler(String tag) throws
79 ClassNotFoundException, InstantiationException, IllegalAccessException
80 {
81 return (TogglebuttonHandler)Class.forName(tag).newInstance();
82 }
83 public ComboboxHandler getComboboxHandler(String tag) throws
84 ClassNotFoundException, InstantiationException, IllegalAccessException
85 {
86 return (ComboboxHandler)Class.forName(tag).newInstance();
87 }
88 public ScaleHandler getScaleHandler(String tag) throws
89 ClassNotFoundException, InstantiationException, IllegalAccessException
90 {
91 return (ScaleHandler)Class.forName(tag).newInstance();
92 }
93 public ActiveXHandler getActiveXHandler(String tag) throws
94 ClassNotFoundException, InstantiationException, IllegalAccessException
95 {
96 return (ActiveXHandler)Class.forName(tag).newInstance();
97 }
98 public TabCardHandler getTabCardHandler(String tag) throws
99 ClassNotFoundException, InstantiationException, IllegalAccessException
100 {
101 return (TabCardHandler)Class.forName(tag).newInstance();
102 }
103 }