Inheritance diagram for AliasChoice::

Public Methods | |
| AliasChoice (TypeCode tc) | |
| String | name () | 
| Name of the type. More... | |
| JComponent | inputRes () | 
| Dialog component where the user specifies the parameter. More... | |
| JComponent | inputArg () | 
| Dialog component where the user specifies the result. More... | |
| String | getResult (Any resAny) | 
| Request management: extract result from Any (and convert it to String). More... | |
| void | setArgument (Any argsAny) throws InvalidChoiceException | 
| Request management: add argument to Any. More... | |
| String | toString (java.lang.Object obj) | 
| Converts that object to string. More... | |
| java.lang.Object | asObject (String name) throws InvalidChoiceException | 
| Returns the object introduced as that text. More... | |
      
  | 
  
| 
 
 
 00027 {
00028     super(tc);
00029     try {
00030         _name = tc.name();
00031         _content = ChoiceFactory.getChoice(tc.content_type());
00032         _content.setAliasInfo(tc.name(), tc.id());
00033 
00034     }catch(org.omg.CORBA.TypeCodePackage.BadKind e){
00035         //this is not suposed to happen
00036     }
00037 }
 | 
  
      
  | 
  
| 
 Name of the type. 
 Reimplemented from CorbaObjectChoice. 
 00040 {
00041     return _name;
00042 }
 | 
  
      
  | 
  
| 
 Dialog component where the user specifies the parameter. 
 Reimplemented from CorbaObjectChoice. 
 00045 {
00046     return _content.inputRes();
00047 }
 | 
  
      
  | 
  
| 
 Dialog component where the user specifies the result. 
 Reimplemented from CorbaObjectChoice. 
 00050 {
00051     return _content.inputArg();
00052 }
 | 
  
      
  | 
  
| 
 Request management: extract result from Any (and convert it to String). 
 Reimplemented from CorbaObjectChoice. 
 00055 {
00056     String result = null;
00057 
00058     try {
00059         //result = HxCorba."name"Helper.extract(resAny);
00060 
00061         Class helper = Class.forName("HxCorba."+_name+"Helper");
00062         Class[] argTypes = { Any.class };
00063         Method methExt = helper.getMethod("extract", argTypes);
00064         java.lang.Object[] args = { resAny };
00065         java.lang.Object obj = methExt.invoke(null, args);
00066 
00067         result = toString(obj);
00068 
00069     }catch(Exception e) {
00070         ErrorStreamArea.println(e+": Cannot find helper class for "+_name);
00071     }
00072 
00073     return result;
00074 }
 | 
  
      
  | 
  
| 
 Request management: add argument to Any. 
 Reimplemented from CorbaObjectChoice. 
 00077 {
00078     java.lang.Object obj = asObject();
00079 
00080     try {
00081         //HxCorba."name"Helper.insert(argsAny, _content);
00082 
00083         Class helper = Class.forName("HxCorba."+_name+"Helper");
00084         Class[] argTypes = { Any.class, obj.getClass() };
00085         Method methIns = helper.getMethod("insert", argTypes);
00086         java.lang.Object[] args = { argsAny, obj };
00087         methIns.invoke(null, args);
00088 
00089     }catch(Exception e) {
00090         ErrorStreamArea.println(e+": Cannot find helper class for "+_name);
00091     }
00092 }
 | 
  
      
  | 
  
| 
 Converts that object to string. Useful method to implement getResult. Reimplemented from CorbaObjectChoice. 
 00095 {
00096     return _content.toString(obj);
00097 }
 | 
  
      
  | 
  
| 
 Returns the object introduced as that text. Useful method to implement setArgument. Reimplemented from CorbaObjectChoice. 
  | 
  
1.2.12 written by Dimitri van Heesch,
 © 1997-2001