All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.script.ide.SCRIDE

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.ibm.beans.tools.debugger.BeanFWApp
                                   |
                                   +----com.ibm.beans.script.ide.SCRIDE

public class SCRIDE
extends BeanFWApp
implements FocusListener, ActionListener, SplitPanelListener, SCRIDEInterface
The Scripting IDE class is created by the SCRIDEComponent. The class can be instantiated and used for editing scripts of a Scripting Component that does not have a GUI Editor associated with it. The SCRIDE class is serializable.

See Also:
SCRIDEComponent

Variable Index

 o CHECKBOX_HEIGHT
The height of the checkbox that specifies if the script is compiled with debugging information.
 o CHECKBOX_WIDTH
The width of the checkbox that specifies if the script is compiled with debugging information.

Constructor Index

 o SCRIDE()
Creates a Scripting IDE in Frame.
 o SCRIDE(boolean)
Creates a Scripting IDE with an optional Frame.

Method Index

 o actionPerformed(ActionEvent)
This method is the action event handler that gets called when any button in the SCRIDE is pressed.
 o closeEditor()
Closes the Editor.
 o componentAdded(SplitPanelEvent)
Splits the current panel.
 o componentRemoved(SplitPanelEvent)
Removes the current panel.
 o editScript()
Edits scripts associated the SCRIDEComponent.
 o getPreferredSize()
Returns the preferred size of the ide.
 o getScrComponent()
Gets the SCRIDEComponent associated with this SCRIDE object.
 o getTopPanel()
Returns the topmost panel of the IDE.
 o handleCommonInit()
Initializes the graphical user interface and adds the split panel listener.
 o hasFrame()
Queries if the SCRIDE has a frame.
 o initialize(SCRIDEComponent)
Initializes the SCRIDE.
 o instanceAdded(SCRIDEComponentEvent)
Identifies that an instance was added to the SCRIDEComponent.
 o instanceRemoved(SCRIDEComponentEvent)
Identifies that an instance was removed from the SCRIDEComponent.
 o instanceRenamed(SCRIDEComponentEvent)
Identifies that an instance was renamed in the SCRIDEComponent.
 o isDebugChecked()
Checks if the checkbox that specifies if the script is compiled with debugging information is turned on.
 o openEditor(SCRIDEInstance)
Edits the passed SCRIDEInstance.
 o readExternal(ObjectInput)
Reads the object in.
 o runScript(boolean)
Calls the scripting component to run the script.
 o stopEditingScript()
Closes scripts associated with the SCRIDEComponent.
 o syncEditor()
Saves the contents of the active edit session.
 o terminateScript()
Calls the scripting component to terminate a script.
 o writeExternal(ObjectOutput)
Writes the object out.

Variables

 o CHECKBOX_WIDTH
 public static final int CHECKBOX_WIDTH
The width of the checkbox that specifies if the script is compiled with debugging information.

 o CHECKBOX_HEIGHT
 public static final int CHECKBOX_HEIGHT
The height of the checkbox that specifies if the script is compiled with debugging information.

Constructors

 o SCRIDE
 public SCRIDE()
Creates a Scripting IDE in Frame.

 o SCRIDE
 public SCRIDE(boolean createFrame)
Creates a Scripting IDE with an optional Frame.

Parameters:
createFrame - true if the SCRIDE should create a frame; false otherwise.

Methods

 o getScrComponent
 public SCRIDEComponent getScrComponent()
Gets the SCRIDEComponent associated with this SCRIDE object.

Returns:
The SCRIDEComponent associated with this SCRIDE object.
See Also:
SCRIDEComponent
 o getTopPanel
 public Component getTopPanel()
Returns the topmost panel of the IDE.

Returns:
The top panel of the IDE.
 o initialize
 public void initialize(SCRIDEComponent newScrComponent)
Initializes the SCRIDE. After construction or serialization the initialize function must be called before other methods can be used on the SCRIDE.

Parameters:
newScrComponent - The SCRIDEComponent associated with the SCRIDE.
See Also:
SCRIDEComponent
 o editScript
 public boolean editScript()
Edits scripts associated the SCRIDEComponent. This method causes the SCRIDE GUI to be active and visible.

Returns:
true if the SCRIDE was able to become active and visible; false otherwise.
See Also:
SCRIDEComponent
 o stopEditingScript
 public boolean stopEditingScript()
Closes scripts associated with the SCRIDEComponent. This method causes the SCRIDE GUI to be deactived and invisible.

Returns:
true if the SCRIDE was able to become active and visible; false otherwise.
See Also:
SCRIDEComponent
 o syncEditor
 public synchronized void syncEditor()
Saves the contents of the active edit session. If the SCRIDEInstanceEditor is active, save the current contents of the editor to the SCRIDEInstances SCRIDEEditableObject. This does not close the editor. It only flushes the editor contents. This method can be used before some operation is performed using the SCRIDEInstance SCRIDEEditableObject data.

See Also:
SCRIDEInstance, SCRIDEInstanceEditor, SCRIDEEditableObject
 o hasFrame
 public boolean hasFrame()
Queries if the SCRIDE has a frame.

Returns:
Returns true if the SCRIDE has a frame; false otherwise.
 o instanceAdded
 public void instanceAdded(SCRIDEComponentEvent event)
Identifies that an instance was added to the SCRIDEComponent. It is called by the SCRIDEComponent when creating an instance.

Parameters:
event - The SCRIDEComponentEvent.
 o instanceRemoved
 public void instanceRemoved(SCRIDEComponentEvent event)
Identifies that an instance was removed from the SCRIDEComponent. It is called by the SCRIDEComponent when removing an instance.

Parameters:
event - The SCRIDEComponentEvent.
 o instanceRenamed
 public void instanceRenamed(SCRIDEComponentEvent event)
Identifies that an instance was renamed in the SCRIDEComponent. It is called by the SCRIDEComponent when renaming an instance.

Parameters:
event - The SCRIDEComponentEvent.
 o openEditor
 public synchronized void openEditor(SCRIDEInstance instance)
Edits the passed SCRIDEInstance. This method creates a SCRIDEInstanceEditor given a SCRIDEInstance. This method allows the user to modify a SCRIDEEditableObject associated with the SCRIDEInstance. If the editor is already created, the contents of the previous edit session are saved and the editor allows editing of the passed SCRIDEInstance.

Parameters:
instance - The instance to be edited.
See Also:
SCRIDEInstance, SCRIDEInstanceEditor, SCRIDEEditableObject
 o closeEditor
 public synchronized void closeEditor()
Closes the Editor. This method terminates the current edit session (SCRIDEInstanceEditor). This method is called when the editor is about to be destroyed. If the editor is created, the contents of the previous edit session are saved.

See Also:
SCRIDEInstanceEditor
 o runScript
 protected void runScript(boolean runDebug)
Calls the scripting component to run the script. This method is called when the Run button is pressed.

Parameters:
runDebug - true if script is run with the debugger, false otherwise.
 o terminateScript
 protected void terminateScript()
Calls the scripting component to terminate a script. This method is called when the Terminate button is pressed.

 o componentAdded
 public synchronized void componentAdded(SplitPanelEvent event)
Splits the current panel. This method is called when a panel is added in the SplitPanel view

Parameters:
event - Event fired by the split panel when a new component is added.
 o componentRemoved
 public synchronized void componentRemoved(SplitPanelEvent event)
Removes the current panel. This method is called when a panel is removed in the SplitPanel view. This method ensures that the SCRIDEInstanceEditor data is saved when it is removed from the SplitPanel view.

Parameters:
event - Event fired by the split panel when a component is removed.
 o writeExternal
 public void writeExternal(ObjectOutput out) throws IOException
Writes the object out.

Parameters:
out - The output stream.
Throws: IOException
A streaming output error.
Overrides:
writeExternal in class BeanFWApp
 o readExternal
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
Reads the object in.

Parameters:
in - The input stream.
Throws: IOException
A streaming input error.
Throws: ClassNotFoundException
Class not found during streaming.
Overrides:
readExternal in class BeanFWApp
 o handleCommonInit
 protected void handleCommonInit()
Initializes the graphical user interface and adds the split panel listener.

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of the ide.

Returns:
The preferred size.
Overrides:
getPreferredSize in class BeanFWApp
 o actionPerformed
 public void actionPerformed(ActionEvent event)
This method is the action event handler that gets called when any button in the SCRIDE is pressed.

Parameters:
event - The action event object.
Overrides:
actionPerformed in class BeanFWApp
 o isDebugChecked
 public boolean isDebugChecked()
Checks if the checkbox that specifies if the script is compiled with debugging information is turned on.

Returns:
true if the script is compiled with debugging information; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index