All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.script.ide.SCRIDEComponent

java.lang.Object
   |
   +----com.ibm.beans.script.SCRComponent
           |
           +----com.ibm.beans.script.ide.SCRIDEComponent

public abstract class SCRIDEComponent
extends SCRComponent
The SCRIDEComponent class is the base scripting component class that connects with the IBM scripting IDE This class is derived from the SCRComponent. All scripting components, which connect with the IBM scripting IDE, should be derived from this class.

See Also:
SCRComponent

Variable Index

 o ide
Scripting IDE object.

Constructor Index

 o SCRIDEComponent()
Constructor for the SCRIDEComponent.

Method Index

 o createIDE(boolean)
Creates an IDE for editing the script.
 o createRegisteredClass(Class)
Creates a SCRRegisteredClass object.
 o deregisterObjectHandle(SCRObjectHandle)
Deregisters the object handle with IDE.
 o editScript()
Starts IDE as a separate frame to edit the script.
 o editScriptNoFrame()
Starts IDE as an embedded panel to edit the script.
 o getInstances()
Queries the objects registered with scripting component.
 o getSystemInstance()
Gets the IDE instance not related to any registered Java object.
 o initialize(SCRClient, SCREnvironment)
Creates event processor and a Vector for registered classes.
 o initObjectHandle(SCRIDEObjectHandle, Class)
Initializes SCRIDEObjectHandle.
 o registerObjectHandle(Class, SCRObjectHandle)
Registers the object handle with IDE.
 o renameObject(String, String)
Renames the object handle.
 o stopEditingScript()
Stops the script editing.
 o syncEditor()
Saves the contents of the current edit session in preparation for object streaming.

Variables

 o ide
 protected SCRIDEInterface ide
Scripting IDE object. It is created when the editScript method is called or set by the defaultReadObject method.

See Also:
SCRIDE

Constructors

 o SCRIDEComponent
 public SCRIDEComponent()
Constructor for the SCRIDEComponent. This constructor is called by the derived class constructor.

See Also:
SCRComponent

Methods

 o initialize
 public void initialize(SCRClient scr_client,
                        SCREnvironment env)
Creates event processor and a Vector for registered classes. This method is called by the scripting environment. The method registers all the existing object handles and adds itself as a scripting environment's event listener.

Parameters:
scr_client - The scripting client. The component calls the client when it requests the client to run, terminate, or save the script.
env - The associated SCREnvironment object.
Overrides:
initialize in class SCRComponent
See Also:
scrEnv
 o createRegisteredClass
 public SCRRegisteredClass createRegisteredClass(Class cls)
Creates a SCRRegisteredClass object. This method is called by the registerClass method. If a scripting component needs to create a SCRRegisteredClass object other than SCRIDERegisteredClass object, it should override this method.

Parameters:
cls - The associated Java class object.
Returns:
The newly created SCRIDERegisteredClass object. It will be used in class registration.
Overrides:
createRegisteredClass in class SCRComponent
See Also:
SCRIDERegisteredClass, SCRRegisteredClass, registerClass
 o getInstances
 public SCRIDEInstance[] getInstances()
Queries the objects registered with scripting component. This method returns SCRIDEInstance objects of all the registered Java objects. This method is called by the IDE when the IDE is started.

Returns:
SCRIDEInstance objects of all the registered Java objects.
See Also:
SCRIDE
 o getSystemInstance
 public SCRIDEInstance getSystemInstance()
Gets the IDE instance not related to any registered Java object. The default is return null. Subclass need to override this method to return the system IDE instance.

Returns:
The system IDE instance.
 o initObjectHandle
 protected void initObjectHandle(SCRIDEObjectHandle obj_handle,
                                 Class cls)
Initializes SCRIDEObjectHandle. This method registers the class of the Java object and calls the init method of the handle. If any extra initialization work needs to be done at the component level, the scripting component developer should override this method.

Parameters:
obj_handle - The object handle that needs to be initialized.
cls - Class of the object to be registered.
See Also:
registerClass, init
 o registerObjectHandle
 protected void registerObjectHandle(Class cls,
                                     SCRObjectHandle handle)
Registers the object handle with IDE.

Parameters:
cls - Class of the object to be registered.
handle - The object handle that needs to be registered.
Overrides:
registerObjectHandle in class SCRComponent
 o deregisterObjectHandle
 protected void deregisterObjectHandle(SCRObjectHandle obj_handle)
Deregisters the object handle with IDE.

Parameters:
obj_handle - The object handle that needs to be deregistered.
Overrides:
deregisterObjectHandle in class SCRComponent
 o renameObject
 public SCRObjectHandle renameObject(String oldName,
                                     String newName)
Renames the object handle.

Parameters:
oldName - Old name of the object.
newName - New name of the object.
Returns:
The object handle associated with the object that is renamed.
Overrides:
renameObject in class SCRComponent
 o createIDE
 public SCRIDEInterface createIDE(boolean withFrame)
Creates an IDE for editing the script. Subclasses should override this method if they wish to supply another IDE.

Parameters:
withFrame - Specifies if the IDE is created with a frame around it.
Returns:
The IDE object that has a SCRIDEInterface interface.
 o editScript
 public boolean editScript()
Starts IDE as a separate frame to edit the script. This method is called by the scripting environment. This method creates and initializes the SCRIDE object and calls the editScript method of the SCRIDE.

Returns:
true if the IDE can be started successfully; false otherwise.
Overrides:
editScript in class SCRComponent
See Also:
SCRIDE
 o editScriptNoFrame
 public Component editScriptNoFrame()
Starts IDE as an embedded panel to edit the script. This method is called by the scripting environment. This method creates and initializes the SCRIDE object and calls the editScript method of the SCRIDE.

Returns:
The SCRIDE component or null if the SCRIDE is opened in a Frame.
Overrides:
editScriptNoFrame in class SCRComponent
See Also:
SCRIDE
 o stopEditingScript
 public boolean stopEditingScript()
Stops the script editing. This method is called by the scripting environment. The method creates and initializes the SCRIDE object and calls editScript method of the SCRIDE.

Returns:
true if script editing is stopped, false otherwise.
Overrides:
stopEditingScript in class SCRComponent
See Also:
SCRIDE
 o syncEditor
 public void syncEditor()
Saves the contents of the current edit session in preparation for object streaming.

Overrides:
syncEditor in class SCRComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index