org.mockcentral.editor.nodes.mockobject.wizard
Class AddMethodExpectationsPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.mockcentral.editor.nodes.mockobject.wizard.AddMethodExpectationsPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class AddMethodExpectationsPage
extends org.eclipse.jface.wizard.WizardPage

The WizardPage used to add method expectations to a Mock Object within an EditMockObjectWizard. This page provides a CheckBoxTableViewer displaying all of the methods for the Mock Object interface (and, optionally, methods from java.lang.Object) that the user may select from.

Author:
David Hutchinson

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
AddMethodExpectationsPage(EditMockObjectWizard wizard, boolean isNewMockObject, org.mockcentral.editor.nodes.expectation_group.MockableMethodsTableModelBuilder methodsBuilder, org.mockcentral.editor.nodes.expectation.MethodNameValidator methodNameValidator)
          Creates a new instance.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
 void setVisible(boolean visible)
           
protected  void showAddNonInterfaceMethodWizard()
          Opens a new EditExpectationWizard used to construct a non-interface method expectation.
protected  void updateIncludeObjectMethods(boolean includeObjectMethods)
          Updates the CheckBoxTableViewer containing the list of available methods when the user checks or unchecks the button for including java.lang.Object methods.
protected  void updateMethodsSelected()
          Stores the list of checked methods in the bean.
protected  void updateTableModel()
          Builds a new bean for the CheckBoxTableViewer based on the Mock Object interface class and whether the user has chosen to include methods from java.lang.Object in the selectable list.
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
 

Constructor Detail

AddMethodExpectationsPage

public AddMethodExpectationsPage(EditMockObjectWizard wizard,
                                 boolean isNewMockObject,
                                 org.mockcentral.editor.nodes.expectation_group.MockableMethodsTableModelBuilder methodsBuilder,
                                 org.mockcentral.editor.nodes.expectation.MethodNameValidator methodNameValidator)
Creates a new instance.

Parameters:
wizard - the EditMockObjectWizard.
isNewMockObject - a flag for whether the Mock Object being edited was newly created or not.
methodsBuilder - the class used to build the list of mockable methods.
methodNameValidator - the class used to validate method names
Method Detail

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface org.eclipse.jface.dialogs.IDialogPage
Overrides:
setVisible in class org.eclipse.jface.dialogs.DialogPage

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)

updateTableModel

protected void updateTableModel()
Builds a new bean for the CheckBoxTableViewer based on the Mock Object interface class and whether the user has chosen to include methods from java.lang.Object in the selectable list.


updateMethodsSelected

protected void updateMethodsSelected()
Stores the list of checked methods in the bean.


showAddNonInterfaceMethodWizard

protected void showAddNonInterfaceMethodWizard()
Opens a new EditExpectationWizard used to construct a non-interface method expectation.


updateIncludeObjectMethods

protected void updateIncludeObjectMethods(boolean includeObjectMethods)
Updates the CheckBoxTableViewer containing the list of available methods when the user checks or unchecks the button for including java.lang.Object methods.