Inheritance diagram for SequenceChoice::

Public Methods | |
| SequenceChoice (TypeCode tc) | |
| void | setAliasInfo (String name, String id) |
| This method is called when the type is an aliased one. More... | |
| 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... | |
|
|
00025 {
00026 super(tc);
00027 try {
00028 _content = ChoiceFactory.getChoice(tc.content_type());
00029 _name = null;
00030 _id = null;
00031 }catch(org.omg.CORBA.TypeCodePackage.BadKind e){
00032 //???
00033 }
00034 }
|
|
||||||||||||
|
This method is called when the type is an aliased one.
Reimplemented from CorbaObjectChoice.
00037 {
00038 _name = name;
00039 _id = id;
00040 }
|
|
|
Name of the type.
Reimplemented from CorbaObjectChoice.
00043 {
00044 return ""; //never used. sequences always in alias;
00045 }
|
|
|
Dialog component where the user specifies the parameter.
Reimplemented from CorbaObjectChoice.
00048 {
00049 if(_id == null) return null; //not alias
00050
00051 if(_input == null) {
00052 StubComboBoxModel model = new StubComboBoxModel(_id);
00053 _input = new JComboBox(model);
00054
00055 _input.setEditable(true);
00056 _input.getEditor().getEditorComponent().addFocusListener(new HxJava.Util.SelectOnFocus());
00057
00058 _input.setSelectedIndex(-1);
00059 _input.getEditor().setItem("");
00060 }
00061
00062 return _input;
00063 }
|
|
|
Dialog component where the user specifies the result.
Reimplemented from CorbaObjectChoice.
00066 {
00067 if(_input == null) {
00068 StubComboBoxModel model = new StubComboBoxModel(_id);
00069 _input = new JComboBox(model);
00070 }
00071 return _input;
00072
00073 //return new JLabel("seq arguments unsup.");
00074 }
|
|
|
Request management: extract result from Any (and convert it to String).
Reimplemented from CorbaObjectChoice.
00077 {
00078 return "seq??";//never used. sequences always in alias;
00079 }
|
|
|
Request management: add argument to Any.
Reimplemented from CorbaObjectChoice.
00082 {
00083 //never used. sequences always in alias;
00084 }
|
|
|
Converts that object to string. Useful method to implement getResult. Reimplemented from CorbaObjectChoice.
00087 {
00088 if(obj == null) return null;
00089
00090 if(_id == null)
00091 return "Sequence of "+_content.name()+", length="+Array.getLength(obj);
00092
00093 String resName = _input.getSelectedItem().toString();
00094
00095 if(resName.length() == 0)
00096 resName = _name+"+";
00097
00098 resName = StubRepository.instance().addStub(_id, resName, obj);
00099 return resName;
00100 }
|
|
|
Returns the object introduced as that text. Useful method to implement setArgument. Reimplemented from CorbaObjectChoice.
00103 {
00104 return StubRepository.instance().getStub(_id, name);
00105 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001