TPTP 4.5.0 Testing Tools Project
Internal API Specification

org.eclipse.hyades.test.ui.internal.editor.form.util
Class StaticDetailPageProvider

java.lang.Object
  extended by org.eclipse.hyades.test.ui.internal.editor.form.util.StaticDetailPageProvider
All Implemented Interfaces:
DetailSection.IDetailPageProvider, org.eclipse.hyades.ui.util.IDisposable

public class StaticDetailPageProvider
extends java.lang.Object
implements DetailSection.IDetailPageProvider

Simple implementation of IDetailPageProvider that records a set of associations between an input element type and a DetailPage. This provider provides the same functionality that was built in DetailSection in version 3.x.


Constructor Summary
StaticDetailPageProvider()
           
 
Method Summary
 void addDetailPage(java.lang.Class objectClass, org.eclipse.hyades.test.ui.editor.form.util.IDetailPage detailPage)
          Records an association between a given java type and a detail page.
 void dispose()
          Invoked when the owning DetailSection is disposed.
 org.eclipse.hyades.test.ui.editor.form.util.IDetailPage getDetailPage(java.lang.Object element)
          Returns a DetailPage for a specific element.
 boolean isEmpty()
          Returns whether no association have been registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticDetailPageProvider

public StaticDetailPageProvider()
Method Detail

addDetailPage

public void addDetailPage(java.lang.Class objectClass,
                          org.eclipse.hyades.test.ui.editor.form.util.IDetailPage detailPage)
Records an association between a given java type and a detail page. This provider will return the detail page for any input element that is of type objectClass.

Parameters:
objectClass - A java type.
detailPage - A Detail Page. This detail page is owned by the provider, ie it will be disposed by the provider when the provider is disposed.

getDetailPage

public org.eclipse.hyades.test.ui.editor.form.util.IDetailPage getDetailPage(java.lang.Object element)
Description copied from interface: DetailSection.IDetailPageProvider
Returns a DetailPage for a specific element.

Specified by:
getDetailPage in interface DetailSection.IDetailPageProvider
Parameters:
element - An element.
Returns:
A DetailPage for element, or null if this provider does not know the element type (in that case, the owning DetailSection displays a default DetailPage).

isEmpty

public boolean isEmpty()
Returns whether no association have been registered.

Returns:

dispose

public void dispose()
Description copied from interface: DetailSection.IDetailPageProvider
Invoked when the owning DetailSection is disposed. This method should dispose any DetailPage that was created by the provider.

Specified by:
dispose in interface DetailSection.IDetailPageProvider
Specified by:
dispose in interface org.eclipse.hyades.ui.util.IDisposable

TPTP 4.5.0 Testing Tools Project
Internal API Specification