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

CorbaObjectChoice Class Reference

Base class for ObjectChoice's dealing with Corba objects. More...

Inheritance diagram for CorbaObjectChoice::

AliasChoice BooleanChoice DoubleChoice EnumChoice InterfaceChoice LongChoice OctetChoice PixValueChoice SequenceChoice StringChoice StructChoice VoidChoice List of all members.

Public Methods

 CorbaObjectChoice (TypeCode tc)
 Constructor. More...

TypeCode typeCode ()
 Get the TypeCode of this ObjectChoice. More...

void setAliasInfo (String name, String id)
 This method is called when the type is an aliased one. More...

abstract String name ()
 Name of the type. More...

abstract JComponent inputRes ()
 Dialog component where the user specifies the parameter. More...

abstract JComponent inputArg ()
 Dialog component where the user specifies the result. More...

abstract String getResult (Any resAny)
 Request management: extract result from Any (and convert it to String). More...

abstract void setArgument (Any argsAny) throws InvalidChoiceException
 Request management: add argument to Any. More...

void setInitialValue (Any argsAny)
 Used to show default parameters. More...

String toString (java.lang.Object obj)
 Converts that object to string. More...

java.lang.Object asObject () throws InvalidChoiceException
 Returns the object selected in that choice. More...

abstract java.lang.Object asObject (String inText) throws InvalidChoiceException
 Returns the object introduced as that text. More...

String inputText ()
 Get the input text. More...


Detailed Description

Base class for ObjectChoice's dealing with Corba objects.

An ObjectChoice is a GUI component in a dialog box for (easy) selection of parameter values.


Constructor & Destructor Documentation

CorbaObjectChoice::CorbaObjectChoice TypeCode    tc [inline]
 

Constructor.

00028 {
00029     _type = tc;
00030 }


Member Function Documentation

TypeCode CorbaObjectChoice::typeCode   [inline]
 

Get the TypeCode of this ObjectChoice.

00035 {
00036    return _type;
00037 }

void CorbaObjectChoice::setAliasInfo String    name,
String    id
[inline]
 

This method is called when the type is an aliased one.

Reimplemented in SequenceChoice.

00042 {
00043 }

abstract String CorbaObjectChoice::name   [pure virtual]
 

Name of the type.

Reimplemented in AliasChoice, BooleanChoice, DoubleChoice, EnumChoice, InterfaceChoice, LongChoice, OctetChoice, PixValueChoice, SequenceChoice, StringChoice, StructChoice, and VoidChoice.

abstract JComponent CorbaObjectChoice::inputRes   [pure virtual]
 

Dialog component where the user specifies the parameter.

Reimplemented in AliasChoice, BooleanChoice, DoubleChoice, EnumChoice, InterfaceChoice, LongChoice, OctetChoice, PixValueChoice, SequenceChoice, StringChoice, StructChoice, and VoidChoice.

abstract JComponent CorbaObjectChoice::inputArg   [pure virtual]
 

Dialog component where the user specifies the result.

Reimplemented in AliasChoice, BooleanChoice, DoubleChoice, EnumChoice, InterfaceChoice, LongChoice, MatrixChoice, OctetChoice, PixValueChoice, PointChoice, SequenceChoice, SizesChoice, StringChoice, StructChoice, TagListChoice, and VoidChoice.

abstract String CorbaObjectChoice::getResult Any    resAny [pure virtual]
 

Request management: extract result from Any (and convert it to String).

Reimplemented in AliasChoice, BooleanChoice, DoubleChoice, EnumChoice, InterfaceChoice, LongChoice, OctetChoice, PixValueChoice, SequenceChoice, StringChoice, StructChoice, and VoidChoice.

abstract void CorbaObjectChoice::setArgument Any    argsAny [pure virtual]
 

Request management: add argument to Any.

Reimplemented in AliasChoice, BooleanChoice, DoubleChoice, EnumChoice, InterfaceChoice, LongChoice, OctetChoice, PixValueChoice, SequenceChoice, StringChoice, StructChoice, and VoidChoice.

void CorbaObjectChoice::setInitialValue Any    argsAny [inline]
 

Used to show default parameters.

Reimplemented in DoubleChoice, and LongChoice.

00068 {
00069 }

String CorbaObjectChoice::toString java.lang.Object    obj [inline]
 

Converts that object to string.

Useful method to implement getResult.

Reimplemented in AliasChoice, EnumChoice, InterfaceChoice, PixValueChoice, SequenceChoice, StructChoice, and VoidChoice.

00075 {
00076     return obj.toString(); // non-basic types must redefine this
00077 }

java.lang.Object CorbaObjectChoice::asObject   [inline]
 

Returns the object selected in that choice.

Useful method to implement setArgument.

Reimplemented in EnumChoice.

00083 {
00084     return asObject(inputText());
00085 }

abstract java.lang.Object CorbaObjectChoice::asObject String    inText [pure virtual]
 

Returns the object introduced as that text.

Useful method to implement setArgument.

Reimplemented in AliasChoice, BooleanChoice, DoubleChoice, EnumChoice, InterfaceChoice, LongChoice, MatrixChoice, OctetChoice, PixValueChoice, PointChoice, SequenceChoice, SizesChoice, StringChoice, StructChoice, TagListChoice, and VoidChoice.

String CorbaObjectChoice::inputText   [inline]
 

Get the input text.

00096 {
00097     JComponent c = inputArg();
00098     if(c instanceof JTextField) return ((JTextField)c).getText();
00099     if(c instanceof JComboBox) return ((JComboBox)c).getSelectedItem().toString();
00100 
00101     return null;
00102 }


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 15:11:17 2003 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001