Horus Doc || Java GUI Reference || Doxygen's quick Index  

OctetChoice Class Reference

A CorbaObjectChoice for octet's. More...

Inheritance diagram for OctetChoice::

CorbaObjectChoice List of all members.

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...


Detailed Description

A CorbaObjectChoice for octet's.


Constructor & Destructor Documentation

OctetChoice::OctetChoice TypeCode    tc [inline]
 

00023 {
00024     super(tc);
00025 }


Member Function Documentation

String OctetChoice::name   [inline, virtual]
 

Name of the type.

Reimplemented from CorbaObjectChoice.

00028 {
00029     return "octet";
00030 }

JComponent OctetChoice::inputRes   [inline, virtual]
 

Dialog component where the user specifies the parameter.

Reimplemented from CorbaObjectChoice.

00033 {
00034     return null;
00035 }

JComponent OctetChoice::inputArg   [inline, virtual]
 

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 }

String OctetChoice::getResult Any    resAny [inline, virtual]
 

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 }

void OctetChoice::setArgument Any    argsAny [inline, virtual]
 

Request management: add argument to Any.

Reimplemented from CorbaObjectChoice.

00054 {
00055     Byte b = (Byte)asObject();
00056     argsAny.insert_octet(b.byteValue());
00057 }

java.lang.Object OctetChoice::asObject String    inText [inline, virtual]
 

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 }


The documentation for this class was generated from the following file:
Generated on Tue Feb 3 14:19:49 2004 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001