|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.debug.ui.memory.AbstractMemoryRendering
Abstract implementation of a memory rendering.
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.
| Constructor Summary | |
|---|---|
AbstractMemoryRendering(String renderingId)
Constructs a new rendering of the given type. |
|
| Method Summary | |
|---|---|
void |
activated()
Notification this rendering has become the active rendering. |
void |
addPropertyChangeListener(IPropertyChangeListener listener)
Adds a listener for property changes to this rendering. |
void |
becomesHidden()
Notification this rendering has become hidden in its container. |
void |
becomesVisible()
Notification this rendering has become visible in its container. |
protected void |
createPopupMenu(Control control)
Helper method for creating a pop up menu in the rendering for a control. |
void |
deactivated()
Notification this rendering is no longer the active rendering. |
protected Image |
decorateImage(Image image)
Decorates and returns this rendering's image. |
protected String |
decorateLabel(String label)
Decorates and returns this rendering's label. |
void |
dispose()
Disposes this rendering. |
protected void |
firePropertyChangedEvent(PropertyChangeEvent event)
Fires the given event to all registered listeners. |
Image |
getImage()
Returns an image for this rendering. |
String |
getLabel()
Returns a label for this rendering. |
IMemoryBlock |
getMemoryBlock()
Returns the memory block displayed by this rendering. |
IMemoryRenderingContainer |
getMemoryRenderingContainer()
Returns the container hosting this memory rendering. |
protected MenuManager |
getPopupMenuManager()
Returns the pop up menu manager for this rendering, or null
if none. |
String |
getRenderingId()
Returns the identifier associated with this rendering's type. |
void |
init(IMemoryRenderingContainer container,
IMemoryBlock block)
Initializes this rendering to be hosted in the given container, displaying the given memory block. |
boolean |
isVisible()
Returns whether this rendering is currently visible. |
void |
removePropertyChangeListener(IPropertyChangeListener listener)
Removes the given property change listener from this rendering. |
| Methods inherited from class org.eclipse.core.runtime.PlatformObject |
|---|
getAdapter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.debug.ui.memory.IMemoryRendering |
|---|
createControl, getControl |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Constructor Detail |
public AbstractMemoryRendering(String renderingId)
renderingId - memory rendering type identifier| Method Detail |
public void init(IMemoryRenderingContainer container,
IMemoryBlock block)
IMemoryRendering
init in interface IMemoryRenderingcontainer - container hosting this renderingblock - the memory block to renderpublic void dispose()
IMemoryRendering
dispose in interface IMemoryRenderingpublic void activated()
IMemoryRendering
activated in interface IMemoryRenderingpublic void deactivated()
IMemoryRendering
deactivated in interface IMemoryRenderingpublic void becomesVisible()
IMemoryRendering
becomesVisible in interface IMemoryRenderingpublic void becomesHidden()
IMemoryRendering
becomesHidden in interface IMemoryRenderingpublic IMemoryBlock getMemoryBlock()
IMemoryRendering
getMemoryBlock in interface IMemoryRenderingpublic String getRenderingId()
IMemoryRendering
getRenderingId in interface IMemoryRenderingIMemoryRenderingTypepublic void addPropertyChangeListener(IPropertyChangeListener listener)
IMemoryRendering
addPropertyChangeListener in interface IMemoryRenderinglistener - a property change listenerpublic void removePropertyChangeListener(IPropertyChangeListener listener)
IMemoryRendering
removePropertyChangeListener in interface IMemoryRenderinglistener - a property change listenerpublic Image getImage()
IMemoryRendering
getImage in interface IMemoryRenderingprotected Image decorateImage(Image image)
image - base image
public String getLabel()
IMemoryRendering
getLabel in interface IMemoryRenderingprotected String decorateLabel(String label)
label - base label
protected void createPopupMenu(Control control)
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 this method is registered with an identifier of this rendering's container.
Actions may also be contributed to the context menu specifically by using a
viewerContribution on a popupMenus extension
that has a targetID referring 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.
control - - control to create the pop up menu forprotected MenuManager getPopupMenuManager()
null
if none.
nullprotected void firePropertyChangedEvent(PropertyChangeEvent event)
event - the event to firepublic IMemoryRenderingContainer getMemoryRenderingContainer()
public boolean isVisible()
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.