Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef.ui.parts
Class AbstractEditPartViewer

java.lang.Object
  extended by
org.eclipse.gef.ui.parts.AbstractEditPartViewer
All Implemented Interfaces:
EditPartViewer, ISelectionProvider
Direct Known Subclasses:
GraphicalViewerImpl, TreeViewer

public abstract class AbstractEditPartViewer
extends java.lang.Object
implements EditPartViewer

The base implementation for EditPartViewer.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.gef. EditPartViewer
EditPartViewer.Conditional
 
Field Summary
protected  java.util.List constantSelection
          The unmodifiable list of selected editparts.
protected   EditPart focusPart
          Deprecated.   
protected  java.util.List selection
          The raw list of selected editparts.
protected  java.util.List selectionListeners
          Deprecated.   
 
Constructor Summary
AbstractEditPartViewer ()
          Constructs the viewer and calls init().
 
Method Summary
 void addDragSourceListener ( TransferDragSourceListener listener)
          Provided for compatibility with existing code.
 void addDragSourceListener ( TransferDragSourceListener listener)
          Adds a TransferDragSourceListener to this viewer.
 void addDropTargetListener ( TransferDropTargetListener listener)
          Provided for compatibility with existing code.
 void addDropTargetListener ( TransferDropTargetListener listener)
          Adds a TransferDropTargetListener to this viewer.
 void addPropertyChangeListener (java.beans.PropertyChangeListener listener)
          Adds a listener to be notified of viewer property changes.
 void addSelectionChangedListener ( ISelectionChangedListener listener)
           
 void appendSelection ( EditPart editpart)
          Appends the specified EditPart to the viewer's selection.
abstract  Control createControl (Composite parent)
          Optionally creates the default Control using the default style.
 void deselect ( EditPart editpart)
          Removes the specified EditPart from the current selection.
 void deselectAll ()
          Deselects all EditParts.
  EditPart findObjectAt ( Point pt)
          Returns null or the EditPart associated with the specified location.
  EditPart findObjectAtExcluding ( Point pt, java.util.Collection exclude)
          Returns null or the EditPart at the specified location, excluding the specified set.
protected  void fireSelectionChanged ()
          Fires selection changed to the registered listeners at the time called.
 void flush ()
          Flushes all pending updates to the Viewer.
  EditPart getContents ()
          Returns the contents of this Viewer.
  MenuManager getContextMenu ()
          Returns null or the MenuManager for this viewer.
 Control getControl ()
          Returns null or the SWT Control for this viewer.
protected   DelegatingDragAdapter getDelegatingDragAdapter ()
          Returns null or the DelegatingDragAdapater.
protected   DelegatingDropAdapter getDelegatingDropAdapter ()
          Returns null or the DelegatingDropAdapater.
protected  DragSource getDragSource ()
          Returns null or the DragSource.
protected  DropTarget getDropTarget ()
          Returns null or the DropTarget.
  EditDomain getEditDomain ()
          Returns the EditDomain to which this viewer belongs.
  EditPartFactory getEditPartFactory ()
          Returns the EditPartFactory for this viewer.
 java.util.Map getEditPartRegistry ()
          Returns the Map for registering EditParts by Keys.
  EditPart getFocusEditPart ()
          Returns the focus EditPart.
  KeyHandler getKeyHandler ()
          Returns the KeyHandler for this viewer.
 java.lang.Object getProperty (java.lang.String key)
          Returns the value of the given property.
  ResourceManager getResourceManager ()
          Returns null, or the ResourceManager for this Viewer.
  RootEditPart getRootEditPart ()
          Returns the RootEditPart.
 java.util.List getSelectedEditParts ()
          Returns an unmodifiable List containing zero or more selected editparts.
  ISelection getSelection ()
          Returns an ISelection containing a list of one or more EditPart.
  SelectionManager getSelectionManager ()
          Returns the viewer's selection manager.
 java.util.Map getVisualPartMap ()
          Returns the Map for associating visual parts with their EditParts.
protected  void handleDispose (DisposeEvent e)
          Called if and when the Control is disposed.
protected  void hookControl ()
          Called once the control has been set.
protected  void hookDragSource ()
          Called whenever the drag source is automatically created.
protected  void hookDropTarget ()
          Called whenever the drop target is automatically created.
protected  void init ()
          Called from the constructor.
protected  java.util.List primGetSelectedEditParts ()
          Returns the modifiable List of selected EditParts.
protected  void refreshDragSourceAdapter ()
          Creates or disposes a DragSource as needed, and sets the supported transfer types.
protected  void refreshDropTargetAdapter ()
          Creates or disposes a DropTarget as needed, and sets the supported transfer types.
 void registerAccessibleEditPart ( AccessibleEditPart acc)
          Used for accessibility purposes.
 void removeDragSourceListener ( TransferDragSourceListener listener)
          Removes the specified drag source listener.
 void removeDragSourceListener ( TransferDragSourceListener listener)
          Removes the specified drag source listener.
 void removeDropTargetListener ( TransferDropTargetListener listener)
          Removes the specified drop target listener.
 void removeDropTargetListener ( TransferDropTargetListener listener)
          Removes the specified drop target listener.
 void removePropertyChangeListener (java.beans.PropertyChangeListener listener)
          removes the first instance of the specified property listener.
 void removeSelectionChangedListener ( ISelectionChangedListener l)
           
 void reveal ( EditPart part)
          Reveals the given EditPart if it is not visible.
 void select ( EditPart editpart)
          Replaces the current selection with the specified EditPart.
 void setContents ( EditPart editpart)
          Sets the contents for this Viewer.
 void setContents (java.lang.Object contents)
          Creates an EditPart for the provided model object using the EditPartFactory.
 void setContextMenu ( MenuManager manager)
          Sets the context MenuManager for this viewer.
 void setControl (Control control)
          Sets the Control for this viewer.
 void setCursor (Cursor cursor)
          Sets the cursor for the viewer's Control.
protected  void setDragSource (DragSource source)
          Sets the drag source.
protected  void setDropTarget (DropTarget target)
          Sets the drop target.
 void setEditDomain ( EditDomain editdomain)
          Sets the EditDomain for this viewer.
 void setEditPartFactory ( EditPartFactory factory)
          Sets the EditPartFactory.
 void setFocus ( EditPart part)
          Sets the focus EditPart.
 void setKeyHandler ( KeyHandler handler)
          Sets the KeyHandler.
 void setProperty (java.lang.String key, java.lang.Object value)
          Sets a property on this viewer.
 void setRootEditPart ( RootEditPart editpart)
          Sets the root of this viewer.
 void setRouteEventsToEditDomain (boolean value)
          Turns on/off the routing of events directly to the Editor.
 void setSelection ( ISelection newSelection)
          Sets the selection to the given selection and fires selection changed.
 void setSelectionManager ( SelectionManager model)
          Sets the selection manager for this viewer.
protected  void unhookControl ()
          Called when the control is being set to null, but before it is null.
 void unregisterAccessibleEditPart ( AccessibleEditPart acc)
          Does nothing by default.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gef. EditPartViewer
findObjectAtExcluding
 

Field Detail

selection

protected final java.util.List selection
The raw list of selected editparts.


constantSelection

protected final java.util.List constantSelection
The unmodifiable list of selected editparts.


selectionListeners

protected java.util.List selectionListeners
Deprecated.   

The list of selection listeners.


focusPart

protected 
EditPart focusPart
Deprecated.   

The editpart specifically set to have focus. Note that if this value is null, the focus editpart is still implied to be the part with primary selection. Subclasses should call the accessor: getFocusEditPart() whenever possible.

Constructor Detail

AbstractEditPartViewer

public AbstractEditPartViewer()
Constructs the viewer and calls init().

Method Detail

setSelectionManager

public void setSelectionManager(
SelectionManager model)
Description copied from interface: EditPartViewer
Sets the selection manager for this viewer.

Specified by:
setSelectionManager in interface EditPartViewer
Parameters:
model - the new selection manager
See Also:
EditPartViewer.setSelectionManager(SelectionManager)

addDragSourceListener

public void addDragSourceListener(
TransferDragSourceListener listener)
Description copied from interface: EditPartViewer
Provided for compatibility with existing code.

Specified by:
addDragSourceListener in interface EditPartViewer
Parameters:
listener - a drag source listener
See Also:
EditPartViewer.addDragSourceListener(org.eclipse.gef.dnd.TransferDragSourceListener)

addDragSourceListener

public void addDragSourceListener(
TransferDragSourceListener listener)
Description copied from interface: EditPartViewer
Adds a TransferDragSourceListener to this viewer. This has the side-effect of creating a DragSource on the viewer's Control. A Control can only have a single DragSource. Clients must not create their own DragSource when using this method.

Specified by:
addDragSourceListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.addDragSourceListener(TransferDragSourceListener)

addDropTargetListener

public void addDropTargetListener(
TransferDropTargetListener listener)
Description copied from interface: EditPartViewer
Provided for compatibility with existing code.

Specified by:
addDropTargetListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.addDropTargetListener(org.eclipse.gef.dnd.TransferDropTargetListener)

addDropTargetListener

public void addDropTargetListener(
TransferDropTargetListener listener)
Description copied from interface: EditPartViewer
Adds a TransferDropTargetListener to this viewer. This has the side-effect of creating a DropTarget on the viewer's Control. A Control can only have a single DropTarget. Clients must not create their own DropTarget when using this method.

Specified by:
addDropTargetListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.addDropTargetListener(TransferDropTargetListener)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: EditPartViewer
Adds a listener to be notified of viewer property changes.

Specified by:
addPropertyChangeListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.addPropertyChangeListener(PropertyChangeListener)

addSelectionChangedListener

public void addSelectionChangedListener(
ISelectionChangedListener listener)
Specified by:
addSelectionChangedListener in interface ISelectionProvider
See Also:
ISelectionProvider.addSelectionChangedListener(ISelectionChangedListener)

appendSelection

public void appendSelection(
EditPart editpart)
Description copied from interface: EditPartViewer
Appends the specified EditPart to the viewer's selection. The EditPart becomes the new primary selection. Fires selection changed to all ISelectionChangedListeners.

Specified by:
appendSelection in interface EditPartViewer
Parameters:
editpart - the EditPart to append
See Also:
EditPartViewer.appendSelection(EditPart)

createControl

public abstract Control createControl(Composite parent)
Description copied from interface: EditPartViewer
Optionally creates the default Control using the default style. The Control can also be created externally and then set into the Viewer.

Specified by:
createControl in interface EditPartViewer
Parameters:
parent - the parent in which create the SWT Control
Returns:
the created Control for convenience
See Also:
EditPartViewer.createControl(Composite)

deselect

public void deselect(
EditPart editpart)
Description copied from interface: EditPartViewer
Removes the specified EditPart from the current selection. If the selection becomes empty, the viewer's contents becomes the current selected part. The last EditPart in the new selection is made primary.

Fires selection changed to ISelectionChangedListeners.

Specified by:
deselect in interface EditPartViewer
Parameters:
editpart - the EditPart to deselect
See Also:
EditPartViewer.deselect(EditPart)

deselectAll

public void deselectAll()
Description copied from interface: EditPartViewer
Deselects all EditParts. The viewer's contents becomes the current selection. Fires selection changed to ISelectionChangedListeners.

Specified by:
deselectAll in interface EditPartViewer
See Also:
EditPartViewer.deselectAll()

handleDispose

protected void handleDispose(DisposeEvent e)
Called if and when the Control is disposed. Subclasses may extend this method to perform additional cleanup.

Parameters:
e - the disposeevent

findObjectAt

public final 
EditPart findObjectAt(
Point pt)
Description copied from interface: EditPartViewer
Returns null or the EditPart associated with the specified location. The location is relative to the client area of the Viewer's Control. An EditPart is not directly visible. It is targeted using its visual part which it registered using the visual part map. What constitutes a visual part is viewer-specific. Examples include Figures and TreeItems.

Specified by:
findObjectAt in interface EditPartViewer
Parameters:
pt - The location
Returns:
null or an EditPart
See Also:
EditPartViewer.findObjectAt(Point)

findObjectAtExcluding

public final 
EditPart findObjectAtExcluding(
Point pt,
                                            java.util.Collection exclude)
Description copied from interface: EditPartViewer
Returns null or the EditPart at the specified location, excluding the specified set. This method behaves similarly to EditPartViewer.findObjectAt(Point).

Specified by:
findObjectAtExcluding in interface EditPartViewer
Parameters:
pt - The mouse location
exclude - The set of EditParts to be excluded
Returns:
null or an EditPart
See Also:
EditPartViewer.findObjectAtExcluding(Point, Collection)

fireSelectionChanged

protected void fireSelectionChanged()
Fires selection changed to the registered listeners at the time called.


flush

public void flush()
Description copied from interface: EditPartViewer
Flushes all pending updates to the Viewer.

Specified by:
flush in interface EditPartViewer
See Also:
EditPartViewer.flush()

getContextMenu

public 
MenuManager getContextMenu()
Description copied from interface: EditPartViewer
Returns null or the MenuManager for this viewer. The menu manager is set using EditPartViewer.setContextMenu(MenuManager).

Specified by:
getContextMenu in interface EditPartViewer
Returns:
null or a MenuManager
See Also:
EditPartViewer.getContextMenu()

getContents

public 
EditPart getContents()
Description copied from interface: EditPartViewer
Returns the contents of this Viewer. The contents is the EditPart associated with the top-level model object. It is considered to be "The Diagram". If the user has nothing selected, the contents is implicitly the selected object.

The Root of the Viewer is different. By constrast, the root is never selected or targeted, and does not correspond to something in the model.

Specified by:
getContents in interface EditPartViewer
Returns:
the contents EditPart
See Also:
EditPartViewer.getContents()

getControl

public Control getControl()
Description copied from interface: EditPartViewer
Returns null or the SWT Control for this viewer. The control is either set explicitly or can be created by the viewer.

Specified by:
getControl in interface EditPartViewer
Returns:
the SWT Control
See Also:
EditPartViewer.getControl()

getDelegatingDragAdapter

protected 
DelegatingDragAdapter getDelegatingDragAdapter()
Returns null or the DelegatingDragAdapater. The adapter is created automatically when addDragSourceListener(TransferDragSourceListener) is called.

Returns:
null or the adapter

getDelegatingDropAdapter

protected 
DelegatingDropAdapter getDelegatingDropAdapter()
Returns null or the DelegatingDropAdapater. The adapter is created automatically when addDropTargetListener(TransferDropTargetListener) is called.

Returns:
null or the adapter

getDragSource

protected DragSource getDragSource()
Returns null or the DragSource. The drag source is created automatically when addDragSourceListener(TransferDragSourceListener) is called.

Returns:
null or the drag source

getDropTarget

protected DropTarget getDropTarget()
Returns null or the DropTarget. The drop target is created automatically when addDropTargetListener(TransferDropTargetListener) is called.

Returns:
null or the drop target

getEditDomain

public 
EditDomain getEditDomain()
Description copied from interface: EditPartViewer
Returns the EditDomain to which this viewer belongs.

Specified by:
getEditDomain in interface EditPartViewer
Returns:
the viewer's EditDomain
See Also:
EditPartViewer.getEditDomain()

getEditPartFactory

public 
EditPartFactory getEditPartFactory()
Description copied from interface: EditPartViewer
Returns the EditPartFactory for this viewer. The EditPartFactory is used to create the contents EditPart when EditPartViewer.setContents(Object) is called. It is made available so that other EditParts can use it to create their children or connection editparts.

Specified by:
getEditPartFactory in interface EditPartViewer
Returns:
EditPartFactory
See Also:
EditPartViewer.getEditPartFactory()

getEditPartRegistry

public java.util.Map getEditPartRegistry()
Description copied from interface: EditPartViewer
Returns the Map for registering EditParts by Keys. EditParts may register themselves using any method, and may register themselves with multiple keys. The purpose of such registration is to allow an EditPart to be found by other EditParts, or by listeners of domain notifiers. By default, EditParts are registered by their model.

Some models use a "domain" notification system, in which all changes are dispatched to a single listener. Such a listener might use this map to lookup editparts for a given model, and then ask the editpart to update.

Specified by:
getEditPartRegistry in interface EditPartViewer
Returns:
the registry map
See Also:
EditPartViewer.getEditPartRegistry()

getFocusEditPart

public 
EditPart getFocusEditPart()
Description copied from interface: EditPartViewer
Returns the focus EditPart. Focus refers to keyboard focus. This is the same concept as focus in a native Tree or Table. The User can change focus using the keyboard without affecting the currently selected objects. Never returns null.

Specified by:
getFocusEditPart in interface EditPartViewer
Returns:
the focus EditPart
See Also:
EditPartViewer.getFocusEditPart()

getKeyHandler

public 
KeyHandler getKeyHandler()
Description copied from interface: EditPartViewer
Returns the KeyHandler for this viewer. The KeyHandler is sent KeyEvents by the currently active Tool. This is important, because only the current tool knows if it is in a state in which keys should be ignored, such as during a drag. By default, only the SelectionTool forwards keysrokes. It does not do so during a drag.

Specified by:
getKeyHandler in interface EditPartViewer
Returns:
null or a KeyHandler
See Also:
EditPartViewer.getKeyHandler()

getProperty

public java.lang.Object getProperty(java.lang.String key)
Description copied from interface: EditPartViewer
Returns the value of the given property. Returns null if the property has not been set, or has been set to null.

Specified by:
getProperty in interface EditPartViewer
Parameters:
key - the property's key
Returns:
the given properties value or null.
See Also:
EditPartViewer.getProperty(String)

getResourceManager

public 
ResourceManager getResourceManager()
Description copied from interface: EditPartViewer
Returns null, or the ResourceManager for this Viewer. Once a viewer has a Control, clients may access the viewer's resource manager. Any resources constructed using this manager, but not freed, will be freed when the viewer's control is disposed. This does not mean that clients should be lazy about deallocating resources. If a resource is no longer needed but the viewer is still in use, the client must deallocate the resource.

Typical usage is by EditParts contained inside the viewer. EditParts which are removed from the viewer should free their resources during EditPart.removeNotify(). When the viewer is disposed, removeNotify() is not called, but the viewer's resource manager will be disposed anyway.

The viewer's default resource manager is linked to JFace's global shared resources.

Specified by:
getResourceManager in interface EditPartViewer
Returns:
the ResourceManager associated with this viewer
See Also:
EditPartViewer.getResourceManager()

getRootEditPart

public 
RootEditPart getRootEditPart()
Description copied from interface: EditPartViewer
Returns the RootEditPart. The RootEditPart is a special EditPart that serves as the parent to the contents editpart. The root is never selected. The root does not correspond to anything in the model. The User does not interact with the root.

The RootEditPart has a single child: the contents.

By defining the concept of "root", GEF allows the application's "real" EditParts to be more homogeneous. For example, all non-root EditParts have a parent. Also, it allows applications to change the type of root being used without affecting their own editpart implementation hierarchy.

Specified by:
getRootEditPart in interface EditPartViewer
Returns:
the RootEditPart
See Also:
EditPartViewer.getRootEditPart()

getSelectedEditParts

public java.util.List getSelectedEditParts()
Description copied from interface: EditPartViewer
Returns an unmodifiable List containing zero or more selected editparts. This list may be empty. In contrast, the inherited method ISelectionProvider.getSelection() should not return an empty selection. When no editparts are selected, generally the contents editpart is considered to be selected. This list can be modified indirectly by calling other methods on the viewer.

Specified by:
getSelectedEditParts in interface EditPartViewer
Returns:
a list containing zero or more editparts
See Also:
EditPartViewer.getSelectedEditParts()

getSelection

public 
ISelection getSelection()
Returns an ISelection containing a list of one or more EditPart. Whenever getSelectedEditParts() returns an empty list, the contents editpart ( getContents()) is returned as the current selection.

Specified by:
getSelection in interface EditPartViewer
See Also:
ISelectionProvider.getSelection()

getSelectionManager

public 
SelectionManager getSelectionManager()
Description copied from interface: EditPartViewer
Returns the viewer's selection manager. The selection manager has complete control over the viewer's representation of selection. It provides the ISelection for the viewer, and manages all changes to the current selection.

Specified by:
getSelectionManager in interface EditPartViewer
Returns:
the selection manager
See Also:
EditPartViewer.getSelectionManager()

getVisualPartMap

public java.util.Map getVisualPartMap()
Description copied from interface: EditPartViewer
Returns the Map for associating visual parts with their EditParts. This map is used for hit-testing. Hit testing is performed by first determining which visual part is hit, and then mapping that part to an EditPart. What consistutes a visual part is viewer-specific. Examples include Figures and TreeItems.

Specified by:
getVisualPartMap in interface EditPartViewer
Returns:
the visual part map
See Also:
EditPartViewer.getVisualPartMap()

hookControl

protected void hookControl()
Called once the control has been set.

See Also:
unhookControl()

hookDragSource

protected void hookDragSource()
Called whenever the drag source is automatically created.


hookDropTarget

protected void hookDropTarget()
Called whenever the drop target is automatically created.


init

protected void init()
Called from the constructor. Subclasses may extend this method.


primGetSelectedEditParts

protected java.util.List primGetSelectedEditParts()
Returns the modifiable List of selected EditParts.

Returns:
the internal list of selected editparts

refreshDragSourceAdapter

protected void refreshDragSourceAdapter()
Creates or disposes a DragSource as needed, and sets the supported transfer types. Clients should not need to call or override this method.


refreshDropTargetAdapter

protected void refreshDropTargetAdapter()
Creates or disposes a DropTarget as needed, and sets the supported transfer types. Clients should not need to call or override this method.


registerAccessibleEditPart

public void registerAccessibleEditPart(
AccessibleEditPart acc)
Description copied from interface: EditPartViewer
Used for accessibility purposes.

Specified by:
registerAccessibleEditPart in interface EditPartViewer
Parameters:
acc - the AccessibleEditPart
See Also:
EditPartViewer.registerAccessibleEditPart(AccessibleEditPart)

removeDragSourceListener

public void removeDragSourceListener(
TransferDragSourceListener listener)
Deprecated.   

Description copied from interface: EditPartViewer
Removes the specified drag source listener. If all listeners are removed, the DragSource that was created will be disposed.

Specified by:
removeDragSourceListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.removeDragSourceListener(org.eclipse.gef.dnd.TransferDragSourceListener)

removeDragSourceListener

public void removeDragSourceListener(
TransferDragSourceListener listener)
Description copied from interface: EditPartViewer
Removes the specified drag source listener. If all listeners are removed, the DragSource that was created will be disposed.

Specified by:
removeDragSourceListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.removeDragSourceListener(TransferDragSourceListener)

removeDropTargetListener

public void removeDropTargetListener(
TransferDropTargetListener listener)
Deprecated.   

Description copied from interface: EditPartViewer
Removes the specified drop target listener. If all listeners are removed, the DropTarget that was created will be disposed.

Specified by:
removeDropTargetListener in interface EditPartViewer
Parameters:
listener -
See Also:
EditPartViewer.removeDropTargetListener(org.eclipse.gef.dnd.TransferDropTargetListener)

removeDropTargetListener

public void removeDropTargetListener(
TransferDropTargetListener listener)
Description copied from interface: EditPartViewer
Removes the specified drop target listener. If all listeners are removed, the DropTarget that was created will be disposed.

Specified by:
removeDropTargetListener in interface EditPartViewer
Parameters:
listener - the listener
See Also:
EditPartViewer.removeDropTargetListener(TransferDropTargetListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: EditPartViewer
removes the first instance of the specified property listener.

Specified by:
removePropertyChangeListener in interface EditPartViewer
Parameters:
listener - the listener to remove
See Also:
EditPartViewer.removePropertyChangeListener(PropertyChangeListener)

removeSelectionChangedListener

public void removeSelectionChangedListener(
ISelectionChangedListener l)
Specified by:
removeSelectionChangedListener in interface ISelectionProvider
See Also:
ISelectionProvider.removeSelectionChangedListener(ISelectionChangedListener)

reveal

public void reveal(
EditPart part)
Description copied from interface: EditPartViewer
Reveals the given EditPart if it is not visible.

Specified by:
reveal in interface EditPartViewer
Parameters:
part - the EditPart to reveal
See Also:
EditPartViewer.reveal(EditPart)

select

public void select(
EditPart editpart)
Description copied from interface: EditPartViewer
Replaces the current selection with the specified EditPart. That part becomes the primary selection. Fires selection changed to ISelectionChangedListeners.

Specified by:
select in interface EditPartViewer
Parameters:
editpart - the new selection
See Also:
EditPartViewer.select(EditPart)

setContextMenu

public void setContextMenu(
MenuManager manager)
Description copied from interface: EditPartViewer
Sets the context MenuManager for this viewer. The MenuManager will be asked to create a Menu, which will be used as the context menu for this viewer's Control.

Specified by:
setContextMenu in interface EditPartViewer
Parameters:
manager - the ContextMenuProvider
See Also:
EditPartViewer.setContextMenu(MenuManager)

setContents

public void setContents(
EditPart editpart)
Description copied from interface: EditPartViewer
Sets the contents for this Viewer. The contents can also be set using EditPartViewer.setContents(Object).

Specified by:
setContents in interface EditPartViewer
Parameters:
editpart - the contents
See Also:
EditPartViewer.setContents(EditPart)

setContents

public void setContents(java.lang.Object contents)
Description copied from interface: EditPartViewer
Creates an EditPart for the provided model object using the EditPartFactory. That EditPart is then added to the RootEditPart, and becomes the viewer's contents editpart.

Specified by:
setContents in interface EditPartViewer
Parameters:
contents - the contents model object
See Also:
EditPartViewer.setContents(Object)

setControl

public void setControl(Control control)
Description copied from interface: EditPartViewer
Sets the Control for this viewer. The viewer's control is also set automatically if EditPartViewer.createControl(Composite) is called.

Specified by:
setControl in interface EditPartViewer
Parameters:
control - the Control
See Also:
EditPartViewer.setControl(Control)

setCursor

public void setCursor(Cursor cursor)
Description copied from interface: EditPartViewer
Sets the cursor for the viewer's Control. This method should only be called by Tools. null can be used to indicate that the default cursor should be restored.

Specified by:
setCursor in interface EditPartViewer
Parameters:
cursor - null or a Cursor
See Also:
EditPartViewer.setCursor(Cursor)

setDragSource

protected void setDragSource(DragSource source)
Sets the drag source. Called from refreshDragSourceAdapter().

Parameters:
source - null or a drag source

setDropTarget

protected void setDropTarget(DropTarget target)
Sets the drop target. Called from refreshDropTargetAdapter().

Parameters:
target - dropTarget null or a drop target

setEditDomain

public void setEditDomain(
EditDomain editdomain)
Description copied from interface: EditPartViewer
Sets the EditDomain for this viewer. The Viewer will route all mouse and keyboard events to the EditDomain.

Specified by:
setEditDomain in interface EditPartViewer
Parameters:
editdomain - The EditDomain
See Also:
EditPartViewer.setEditDomain(EditDomain)

setEditPartFactory

public void setEditPartFactory(
EditPartFactory factory)
Description copied from interface: EditPartViewer
Sets the EditPartFactory.

Specified by:
setEditPartFactory in interface EditPartViewer
Parameters:
factory - the factory
See Also:
EditPartViewer.setEditPartFactory(org.eclipse.gef.EditPartFactory)

setFocus

public void setFocus(
EditPart part)
Description copied from interface: EditPartViewer
Sets the focus EditPart.

Specified by:
setFocus in interface EditPartViewer
Parameters:
part - the FocusPart.
See Also:
EditPartViewer.setFocus(EditPart)

setKeyHandler

public void setKeyHandler(
KeyHandler handler)
Description copied from interface: EditPartViewer
Sets the KeyHandler.

Specified by:
setKeyHandler in interface EditPartViewer
Parameters:
handler - the KeyHandler
See Also:
EditPartViewer.setKeyHandler(KeyHandler)

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Description copied from interface: EditPartViewer
Sets a property on this viewer. A viewer property is an arbitrary key-value pair that can be observed via EditPartViewer.addPropertyChangeListener(PropertyChangeListener). A null value will remove the property from the viewer.

Specified by:
setProperty in interface EditPartViewer
Parameters:
key - a unique string identifying the property
value - the properties new value or null to remove
See Also:
EditPartViewer.setProperty(String, Object)

setRootEditPart

public void setRootEditPart(
RootEditPart editpart)
Description copied from interface: EditPartViewer
Sets the root of this viewer. The root should not be confused with the contents.

Specified by:
setRootEditPart in interface EditPartViewer
Parameters:
editpart - the RootEditPart
See Also:
EditPartViewer.setRootEditPart(RootEditPart)

setRouteEventsToEditDomain

public void setRouteEventsToEditDomain(boolean value)
Description copied from interface: EditPartViewer
Turns on/off the routing of events directly to the Editor. If supported by the viewer implementation, all Events should be routed to the EditDomain rather than handled in the default way.

Specified by:
setRouteEventsToEditDomain in interface EditPartViewer
Parameters:
value - true if the viewer should route events to the EditDomain
See Also:
EditPartViewer.setRouteEventsToEditDomain(boolean)

setSelection

public void setSelection(
ISelection newSelection)
Sets the selection to the given selection and fires selection changed. The ISelection should be an IStructuredSelection or it will be ignored.

Specified by:
setSelection in interface ISelectionProvider
See Also:
ISelectionProvider.setSelection(ISelection)

unhookControl

protected void unhookControl()
Called when the control is being set to null, but before it is null.


unregisterAccessibleEditPart

public void unregisterAccessibleEditPart(
AccessibleEditPart acc)
Does nothing by default. Subclasses needing to add accessibility support should override this method.

Specified by:
unregisterAccessibleEditPart in interface EditPartViewer
Parameters:
acc - the accessible part
See Also:
EditPartViewer.unregisterAccessibleEditPart(AccessibleEditPart)

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire