IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.transform.ui
Class AbstractTransformConfigTab

java.lang.Object
  extended bycom.ibm.xtools.transform.ui.internal.dialogs.BaseTransformConfigTab
      extended bycom.ibm.xtools.transform.ui.AbstractTransformConfigTab

public abstract class AbstractTransformConfigTab
extends com.ibm.xtools.transform.ui.internal.dialogs.BaseTransformConfigTab

The Abstract Transform Config Tab is the base class for all tabs that are shown in the Transformation Configuration Manager. Each tab represents some customizable functionality for the given transformation. The data provided by the tab is stored as properties in a transformation context. This makes that data available to the transformation elements during execution.

The transformation UI also requires the tab's data to be persisted and the save/restore mechanism uses a string to save the data. The format of that persisted data string is up to the tab itself but is usually a list of name/value pairs.


Constructor Summary
AbstractTransformConfigTab(ITransformationDescriptor transDesc, String tabId, String label)
          Constructor for a transform configuration tab
 
Method Summary
abstract  Control createContents(Composite parent)
          Create the contents (controls) for the tab.
 void dispose()
          This method is called when the tab is being displosed.
protected  ITransformContext getCurrentTransformContext()
          Construct a transform context from the information currently displayed in the GUI.
abstract  String getTabData()
          Return the current tab information.
abstract  void populateContext(ITransformContext context, String info)
          Populate the transform context based on the supplied data string.
protected  void setDirty()
          Indicate that the contents of the tab is dirty and requires an apply.
protected  void setErrorMessage(String message)
          Set an error message in the dialog's UI.
protected  void setMessage(String message)
          Set a message (the title) in the dialog's UI.
abstract  void setTabData(String newInfo)
          Update the tab's controls with the given data.
 
Methods inherited from class com.ibm.xtools.transform.ui.internal.dialogs.BaseTransformConfigTab
getErrorMessage, getLabel, getMessage, getTabId, getTransformationDescriptor, isDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTransformConfigTab

public AbstractTransformConfigTab(ITransformationDescriptor transDesc,
                                  String tabId,
                                  String label)
Constructor for a transform configuration tab

Parameters:
transDesc - the ITransformationDescriptor the tab is for
tabId - a unique identifier for this tab
label - the localized label to be displayed on the tab
Method Detail

createContents

public abstract Control createContents(Composite parent)
Create the contents (controls) for the tab. This method is called during initialization and is shared by all configruations associated with the same transformation.

Parameters:
parent - The Composite into which to create the tab's controls
Returns:
Control the main containing control of the tab

setTabData

public abstract void setTabData(String newInfo)
Update the tab's controls with the given data. This data is a string representing the persisted tab information that was previously obtained from the tab. This method should parse the data and update the fields on the tab accordingly.

Parameters:
newInfo - The string containing the new information to display

getTabData

public abstract String getTabData()
Return the current tab information. This data is stored in a string and its format should allow the tab to parse it and update the tabs fields in a subsequent session. (see setTabData()).

Returns:
String - The formatted information

populateContext

public abstract void populateContext(ITransformContext context,
                                     String info)
Populate the transform context based on the supplied data string. This method is called to put the data into the context so that transformation elements can access it during execution. The data that goes into the context should be obtained from the string and not the current state of the tab's controls.

Parameters:
context - The transformation execute context to populate
info - The string containing the formatted data for the tab

dispose

public void dispose()
This method is called when the tab is being displosed. The tab should release any resources that are indirectly used by the control hierarchy of the tab itself. In most cases, when the parent tab folder is disposed, the tab's controls are disposed.


setDirty

protected final void setDirty()
Indicate that the contents of the tab is dirty and requires an apply.

See Also:
BaseTransformConfigTab.setDirty()

setMessage

protected final void setMessage(String message)
Set a message (the title) in the dialog's UI. This message describes the purpose of the tab.

Parameters:
message - - the message that describes the tab's purpose

setErrorMessage

protected final void setErrorMessage(String message)
Set an error message in the dialog's UI. This message is displayed in the title area and indicates an error with the user entered data.

Parameters:
message - - the message that describes the error

getCurrentTransformContext

protected final ITransformContext getCurrentTransformContext()
Construct a transform context from the information currently displayed in the GUI.

This method is meant to be used ONLY when the Configure or Run dialog is being displayed and must not be called inside the 'populateContext' method (which will cause a recursion).

Returns:
the populated transform context

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.