Class AbstractMemoryRendering
- All Implemented Interfaces:
IAdaptable,IMemoryRendering
- Direct Known Subclasses:
org.eclipse.debug.internal.ui.views.memory.renderings.AbstractBaseTableRendering
To contribute an action to a rendering, an objectContribution can
be used on a rendering implementation class itself using a
popupMenus extension. Additionally, the context menu created
by createPopupMenu() is registered with an identifier of this
rendering's container identifier. Actions may also be contributed to the
container's context menu specifically by using a viewerContribution
on a popupMenus extension that has a targetID referring
to this rendering container's identifier.
Clients implementing memory renderings must subclass this class.
- Since:
- 3.1
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractMemoryRendering(String renderingId) Constructs a new rendering of the given type. -
Method Summary
Modifier and TypeMethodDescriptionvoidNotification this rendering has become the active rendering.voidAdds a listener for property changes to this rendering.voidNotification this rendering has become hidden in its container.voidNotification this rendering has become visible in its container.protected voidcreatePopupMenu(Control control) Helper method for creating a pop up menu in the rendering for a control.voidNotification this rendering is no longer the active rendering.protected ImagedecorateImage(Image image) Decorates and returns this rendering's image.protected StringdecorateLabel(String label) Decorates and returns this rendering's label.voiddispose()Disposes this rendering.protected voidFires the given event to all registered listeners.getImage()Returns an image for this rendering.getLabel()Returns a label for this rendering.Returns the memory block displayed by this rendering.Returns the container hosting this memory rendering.protected MenuManagerReturns the pop up menu manager for this rendering, ornullif none.Returns the identifier associated with this rendering's type.voidinit(IMemoryRenderingContainer container, IMemoryBlock block) Initializes this rendering to be hosted in the given container, displaying the given memory block.booleanReturns whether this rendering is currently visible.voidRemoves the given property change listener from this rendering.Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.debug.ui.memory.IMemoryRendering
createControl, getControl
-
Constructor Details
-
AbstractMemoryRendering
Constructs a new rendering of the given type.- Parameters:
renderingId- memory rendering type identifier
-
-
Method Details
-
init
Description copied from interface:IMemoryRenderingInitializes this rendering to be hosted in the given container, displaying the given memory block. This method is called before this rendering's control has been created.- Specified by:
initin interfaceIMemoryRendering- Parameters:
container- container hosting this renderingblock- the memory block to render
-
dispose
public void dispose()Description copied from interface:IMemoryRenderingDisposes this rendering.- Specified by:
disposein interfaceIMemoryRendering
-
activated
public void activated()Description copied from interface:IMemoryRenderingNotification this rendering has become the active rendering. Only one rendering can be active at once. Generally, the active rendering is visible and has focus.- Specified by:
activatedin interfaceIMemoryRendering
-
deactivated
public void deactivated()Description copied from interface:IMemoryRenderingNotification this rendering is no longer the active rendering.- Specified by:
deactivatedin interfaceIMemoryRendering
-
becomesVisible
public void becomesVisible()Description copied from interface:IMemoryRenderingNotification this rendering has become visible in its container. Note that a rendering does not have to be active to be visible.- Specified by:
becomesVisiblein interfaceIMemoryRendering
-
becomesHidden
public void becomesHidden()Description copied from interface:IMemoryRenderingNotification this rendering has become hidden in its container.- Specified by:
becomesHiddenin interfaceIMemoryRendering
-
getMemoryBlock
Description copied from interface:IMemoryRenderingReturns the memory block displayed by this rendering.- Specified by:
getMemoryBlockin interfaceIMemoryRendering- Returns:
- the memory block displayed by this rendering
-
getRenderingId
Description copied from interface:IMemoryRenderingReturns the identifier associated with this rendering's type.- Specified by:
getRenderingIdin interfaceIMemoryRendering- Returns:
- the identifier associated with this rendering's type
- See Also:
-
addPropertyChangeListener
Description copied from interface:IMemoryRenderingAdds a listener for property changes to this rendering. Has no effect if an identical listener is already registered.- Specified by:
addPropertyChangeListenerin interfaceIMemoryRendering- Parameters:
listener- a property change listener
-
removePropertyChangeListener
Description copied from interface:IMemoryRenderingRemoves the given property change listener from this rendering. Has no effect if the identical listener is not registered.- Specified by:
removePropertyChangeListenerin interfaceIMemoryRendering- Parameters:
listener- a property change listener
-
getImage
Description copied from interface:IMemoryRenderingReturns an image for this rendering. Clients should not dispose this image. This rendering will dispose the image if required when this rendering is disposed.- Specified by:
getImagein interfaceIMemoryRendering- Returns:
- an image for this rendering
-
decorateImage
Decorates and returns this rendering's image.- Parameters:
image- base image- Returns:
- decorated image
- Since:
- 3.2
-
getLabel
Description copied from interface:IMemoryRenderingReturns a label for this rendering.- Specified by:
getLabelin interfaceIMemoryRendering- Returns:
- a label for this rendering
-
decorateLabel
Decorates and returns this rendering's label.- Parameters:
label- base label- Returns:
- decorated label
- Since:
- 3.2
-
createPopupMenu
Helper method for creating a pop up menu in the rendering for a control. Call this method when a context menu is required for a control in a rendering.To contribute an action to a rendering, an
objectContributioncan be used on a rendering implementation class itself using apopupMenusextension. Additionally, the context menu created by this method is registered with an identifier of this rendering's container. Actions may also be contributed to the context menu specifically by using aviewerContributionon apopupMenusextension that has atargetIDreferring to this rendering container's identifier.Clients are expected to become a menu listener for their pop up menu if they require to fill the context menu for the rendering.
- Parameters:
control- - control to create the pop up menu for
-
getPopupMenuManager
Returns the pop up menu manager for this rendering, ornullif none.- Returns:
- the pop up menu manager for this rendering, or
null
-
firePropertyChangedEvent
Fires the given event to all registered listeners.- Parameters:
event- the event to fire
-
getMemoryRenderingContainer
Returns the container hosting this memory rendering.- Returns:
- the container hosting this memory rendering
-
isVisible
public boolean isVisible()Returns whether this rendering is currently visible.- Returns:
- whether this rendering is currently visible
-