TPTP 4.4.0 Monitoring Tools Project
Internal API Specification

org.eclipse.tptp.wsdm.tooling.editor.mrt.internal
Class GridFormGenerator

java.lang.Object
  extended byorg.eclipse.tptp.wsdm.tooling.editor.mrt.internal.GridFormGenerator
Direct Known Subclasses:
MrtPrototypeForm, RelationshipProtoTypeForm, ServiceGroupProtoTypeForm

public class GridFormGenerator
extends java.lang.Object

Base class for form-generators. Rather than subclassing ScrolledForm in JFace we subclass this. ScrolledForm is not designed for extension. Note: to use FormToolkit, org.eclipse.ui.forms must be an explicit plug-in dependency.

See http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/pde-ui-home/working/EclipseForms/EclipseForms.html for info on writing forms.


Constructor Summary
protected GridFormGenerator(org.eclipse.swt.widgets.Composite parent, java.lang.String name, int widthHint)
          Creates a scrolledform with 2 colums for layouting purpose.
 
Method Summary
protected  org.eclipse.swt.widgets.Composite createSection(java.lang.String title, java.lang.String descr)
          Create an Eclipse-looking form section, with twistie rollup feature.
protected  org.eclipse.swt.widgets.Composite createSection(java.lang.String title, java.lang.String descr, int colspan, int rowspan)
          Create an Eclipse-looking form section, with twistie rollup feature.
 org.eclipse.ui.forms.widgets.ScrolledForm getForm()
          Returns the ScrolledForm.
 java.lang.String getTitle()
          Returns the title of the Form.
protected  org.eclipse.ui.forms.widgets.FormToolkit getToolkit()
          Returns the toolkit of the form.
protected  boolean showOkDialog(java.lang.String title, java.lang.String msg, int dlgType)
          Shows the message dialog and an OK button
protected  int showOkDialog(java.lang.String title, java.lang.String msg, int dlgType, int numberOfButtons)
          Shows the message dialog and an OK button
protected  void showUnimplementedDialog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridFormGenerator

protected GridFormGenerator(org.eclipse.swt.widgets.Composite parent,
                            java.lang.String name,
                            int widthHint)
Creates a scrolledform with 2 colums for layouting purpose.

Parameters:
parent - - The composite which should be used for drawing the form
name - - name of the form
Method Detail

getForm

public org.eclipse.ui.forms.widgets.ScrolledForm getForm()
Returns the ScrolledForm.

Returns:
ScrolledForm - The form created for layouting purpose.

getTitle

public java.lang.String getTitle()
Returns the title of the Form.

Returns:
String - The title of the form created for layouting purpose.

getToolkit

protected org.eclipse.ui.forms.widgets.FormToolkit getToolkit()
Returns the toolkit of the form.

Returns:
FormToolkit - The toolkit of the form.

createSection

protected org.eclipse.swt.widgets.Composite createSection(java.lang.String title,
                                                          java.lang.String descr)
Create an Eclipse-looking form section, with twistie rollup feature.

Parameters:
title - - String that provides the title of the section
descr - - String that provides the description of the section

createSection

protected org.eclipse.swt.widgets.Composite createSection(java.lang.String title,
                                                          java.lang.String descr,
                                                          int colspan,
                                                          int rowspan)
Create an Eclipse-looking form section, with twistie rollup feature.

Parameters:
title - - String that provides the title of the section
descr - - String that provides the description of the section
colspan - - int that gives the column span value
rowspan - - int value to specify the row span value

showUnimplementedDialog

protected void showUnimplementedDialog()

showOkDialog

protected boolean showOkDialog(java.lang.String title,
                               java.lang.String msg,
                               int dlgType)
Shows the message dialog and an OK button

Parameters:
title - - Title of the dialog
msg - - Message to be displayed
dlgType - - Whether info/warning/error, etc.
Returns:
boolean - The code of the button selected

showOkDialog

protected int showOkDialog(java.lang.String title,
                           java.lang.String msg,
                           int dlgType,
                           int numberOfButtons)
Shows the message dialog and an OK button

Parameters:
title - - Title of the dialog
msg - - Message to be displayed
dlgType - - Whether info/warning/error, etc.
numberOfButtons - - Number of buttons - 1:OK, 2:OK,Cancel
Returns:
boolean - The code of the button selected

TPTP 4.4.0 Monitoring Tools Project
Internal API Specification