org.mockcentral.editor.components
Class MockCentralPluginNodeView

java.lang.Object
  extended by org.mockcentral.editor.components.MockCentralPluginNodeView
All Implemented Interfaces:
org.mockcentral.editor.nodes.IMockCentralNodeView
Direct Known Subclasses:
DeletedNodeEditorPage, EditExpectationPage, EditFixturePage, EditMockObjectPage, MockCentralPluginNodeGroupView

public abstract class MockCentralPluginNodeView
extends java.lang.Object
implements org.mockcentral.editor.nodes.IMockCentralNodeView

Base for the view classes used to edit MockCentralNode data. These editors are embedded in the ScrolledPageBook on the EditorFormPage. One instance exists per node type (FixtureGroup, Fixture, MockObjectGroup, etc) and the instances are freshly loaded with node-specific data upon being activated.

Author:
David Hutchinson

Field Summary
protected  java.util.Map<java.lang.String,org.eclipse.swt.graphics.Image> imagesMap
           
protected  org.eclipse.swt.widgets.Composite page
          the base Composite for this view.
protected  org.eclipse.ui.forms.widgets.FormToolkit toolkit
          the FormToolkit.
 
Constructor Summary
MockCentralPluginNodeView(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite page)
          Creates a new instance.
 
Method Summary
 org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent, java.lang.String text, java.lang.String toolTipText)
          Utility method to create a push-style Button for the view.
 org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Utility method to create a Label for the view.
 void dispose()
          disposes of resources as necessary.
 java.util.Map<java.lang.String,org.eclipse.swt.graphics.Image> getImagesMap()
          Returns the imagesMap.
 org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
          Returns the IOperationHistory of the current editor.
 org.eclipse.core.commands.operations.IUndoContext getUndoContext()
          Returns the IUndoContext of the current editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mockcentral.editor.nodes.IMockCentralNodeView
getInputDescription, setNodeModel
 

Field Detail

toolkit

protected org.eclipse.ui.forms.widgets.FormToolkit toolkit
the FormToolkit.


page

protected org.eclipse.swt.widgets.Composite page
the base Composite for this view.


imagesMap

protected java.util.Map<java.lang.String,org.eclipse.swt.graphics.Image> imagesMap
Constructor Detail

MockCentralPluginNodeView

public MockCentralPluginNodeView(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                                 org.eclipse.swt.widgets.Composite page)
Creates a new instance.

Parameters:
toolkit - the parent view's FormToolkit.
page - the base Composite for this view.
Method Detail

getImagesMap

public java.util.Map<java.lang.String,org.eclipse.swt.graphics.Image> getImagesMap()
Returns the imagesMap.

Returns:
the imagesMap.

createButton

public org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
                                                   java.lang.String text,
                                                   java.lang.String toolTipText)
Utility method to create a push-style Button for the view.

Parameters:
parent - the parent Composite for the Button.
text - the Button text.
toolTipText - the Button tooltip text.
Returns:
the Button.

createLabel

public org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent,
                                                 java.lang.String text)
Utility method to create a Label for the view.

Parameters:
parent - the parent Composite for the Label.
text - the Label text.
Returns:
the Label.

getOperationHistory

public org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
Returns the IOperationHistory of the current editor.

Returns:
the IOperationHistory of the current editor.

getUndoContext

public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
Returns the IUndoContext of the current editor.

Returns:
the IUndoContext of the current editor.

dispose

public void dispose()
disposes of resources as necessary.