00035 {
00036 super(frame, "CorbaMethodDialog", false);
00037
00038 _user = user;
00039
00040 IntRepManager irMgr = IntRepManager.defaultIrMgr();
00041 OperationDef opDef = irMgr.describeOperation(intfName, opName);
00042 if(opDef == null) {
00043 ErrorStreamArea.println("Operation "+opName+" not found in "+intfName);
00044 _opName = null;
00045 return;
00046 }
00047
00048 getContentPane().add(createContents());
00049 getRootPane().setDefaultButton(_butOk);
00050
00051 ParameterDescription[] parameters = opDef.params();
00052 _opName = opName;
00053 _nArgs = parameters.length;
00054 _argChoice = new CorbaObjectChoice[_nArgs];
00055
00056 _resChoice = ChoiceFactory.getChoice(opDef.result());
00057 addPair(_resChoice.name(), _resChoice.inputRes());
00058
00059 addPair("=", new JLabel(" "));
00060
00061 _objChoice = ChoiceFactory.getInterfaceChoice("IDL:HxCorba/"+intfName+":1.0", intfName);
00062 addPair(_objChoice.name(), _objChoice.inputObj());
00063
00064 addPair(".", null);
00065 addPair(opName, null);
00066 addPair("(", null);
00067
00068 for(int i=0; i<_nArgs; i++) {
00069 _argChoice[i] = ChoiceFactory.getChoice(parameters[i].type);
00070 addPair(_argChoice[i].name()+" "+parameters[i].name,
00071 _argChoice[i].inputArg());
00072
00073 Any val = irMgr.getDefaultValue(intfName, opName, parameters[i].name);
00074 if(val != null) _argChoice[i].setInitialValue(val);
00075 }
00076
00077 addPair(")", null);
00078
00079 pack();
00080 setLocationRelativeTo(null);
00081 }