Inheritance diagram for LongChoice::

Public Methods | |
| LongChoice (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... | |
| void | setInitialValue (Any argsAny) |
| Used to show default parameters. More... | |
| java.lang.Object | asObject (String inText) throws InvalidChoiceException |
| Returns the object introduced as that text. More... | |
|
|
00025 {
00026 super(tc);
00027 }
|
|
|
Name of the type.
Reimplemented from CorbaObjectChoice.
00030 {
00031 return "long";
00032 }
|
|
|
Dialog component where the user specifies the parameter.
Reimplemented from CorbaObjectChoice.
00035 {
00036 return null;
00037 }
|
|
|
Dialog component where the user specifies the result.
Reimplemented from CorbaObjectChoice.
00040 {
00041 if(_input == null) {
00042 _input = new JTextField("");
00043 _input.addFocusListener(new HxJava.Util.SelectOnFocus());
00044 }
00045 return _input;
00046 }
|
|
|
Request management: extract result from Any (and convert it to String).
Reimplemented from CorbaObjectChoice.
00049 {
00050 int result;
00051 result = resAny.extract_long();
00052 return ""+result;
00053 }
|
|
|
Request management: add argument to Any.
Reimplemented from CorbaObjectChoice.
00056 {
00057 Integer i = (Integer)asObject();
00058 argsAny.insert_long(i.intValue());
00059 }
|
|
|
Used to show default parameters.
Reimplemented from CorbaObjectChoice.
00062 {
00063 int result = argsAny.extract_long();
00064 _input.setText(""+result);
00065 }
|
|
|
Returns the object introduced as that text. Useful method to implement setArgument. Reimplemented from CorbaObjectChoice.
00068 {
00069 Integer val = new Integer(0);
00070 try {
00071 val = new Integer(inText);
00072 }catch(NumberFormatException e) {
00073 _input.requestFocus();
00074 throw new InvalidChoiceException("Not a number");
00075 }
00076 return val;
00077 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001