Inheritance diagram for OctetChoice::

Public Methods | |
| OctetChoice (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... | |
| java.lang.Object | asObject (String inText) throws InvalidChoiceException |
| Returns the object introduced as that text. More... | |
|
|
00023 {
00024 super(tc);
00025 }
|
|
|
Name of the type.
Reimplemented from CorbaObjectChoice.
00028 {
00029 return "octet";
00030 }
|
|
|
Dialog component where the user specifies the parameter.
Reimplemented from CorbaObjectChoice.
00033 {
00034 return null;
00035 }
|
|
|
Dialog component where the user specifies the result.
Reimplemented from CorbaObjectChoice.
00038 {
00039 if(_input == null) {
00040 _input = new JTextField("0");
00041 _input.addFocusListener(new HxJava.Util.SelectOnFocus());
00042 }
00043 return _input;
00044 }
|
|
|
Request management: extract result from Any (and convert it to String).
Reimplemented from CorbaObjectChoice.
00047 {
00048 byte result;
00049 result = resAny.extract_octet();
00050 return ""+result;
00051 }
|
|
|
Request management: add argument to Any.
Reimplemented from CorbaObjectChoice.
00054 {
00055 Byte b = (Byte)asObject();
00056 argsAny.insert_octet(b.byteValue());
00057 }
|
|
|
Returns the object introduced as that text. Useful method to implement setArgument. Reimplemented from CorbaObjectChoice.
00060 {
00061 Byte val = new Byte((byte)0);
00062 try {
00063 val = new Byte(inText);
00064 }catch(NumberFormatException e) {
00065 _input.requestFocus();
00066 throw new InvalidChoiceException("Not a number");
00067 }
00068 return val;
00069 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001