|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Displays EditParts, manages selection, and routes Input events to an EditDomain. The EditDomain typically sends these events to the Tool that is currently active. The output of an EditPartViewer is the set of selected EditParts. The last member of the selection is said to be "primary" selected. The Viewer tells EditParts of their membership to the viewer's selection by calling setSelection(int)
| Method Summary | |
void |
addDragSourceListener(TransferDragSourceListener listener)
Adds the TransferDragSourceListener to the viewer to handle DragEvents. |
void |
addDropTargetListener(TransferDropTargetListener listener)
Adds the TransferDropTargetListener to the viewer to handle DropEvents. |
void |
appendSelection(EditPart editpart)
appends the EditPart to the Viewer's selection set. |
Control |
createControl(Composite composite)
if called, will create the default Control with the default style bits. |
void |
deselect(EditPart editpart)
Removes the EditPart from the selection, and sets the last member of the selection to be the "primary" selection. |
void |
deselectAll()
deselects all EditParts. |
void |
dispose()
Disposes the viewer. |
EditPart |
findObjectAt(Point p)
Returns null or the EditPart at the given mouse location. |
EditPart |
findObjectAtExcluding(Point p,
Collection c)
Returns null or the EditPart at the given mouse location,
excluding all EditParts in the Collection
c. |
void |
flush()
|
EditPart |
getContents()
Returns the contents of this EditPartViewer. |
Control |
getControl()
Returns the SWT Control for this viewer. |
EditDomain |
getEditDomain()
Returns the EditDomain to which the viewer belongs |
EditPartFactory |
getEditPartFactory()
|
Map |
getEditPartRegistry()
Returns the map for registering EditParts by Keys. |
EditPart |
getFocusEditPart()
|
KeyHandler |
getKeyHandler()
|
RootEditPart |
getRootEditPart()
Returns the RootEditPart. |
List |
getSelectedEditParts()
Returns a list containing the currently selected editparts. |
Map |
getVisualPartMap()
Returns the map for registering visual parts to the EditParts which created them. |
void |
registerAccessibleEditPart(AccessibleEditPart acc)
|
void |
select(EditPart editpart)
Replaces the current selection with the EditPart. |
void |
setContents(EditPart editpart)
Sets the Contents for this Viewer. |
void |
setContents(Object contents)
Creates an EditPart for the specified contents using this viewers Factory. |
void |
setContextMenuProvider(ContextMenuProvider menuProvider)
sets the ContextMenuProvider that will be used when the user invokes the context menu on the Viewer's control. |
void |
setControl(Control control)
Optionally sets the control that the viewer should use. |
void |
setCursor(Cursor c)
Sets the cursor for the viewer's control. |
void |
setEditDomain(EditDomain domain)
Sets the EditDomain for this viewer. |
void |
setEditPartFactory(EditPartFactory factory)
|
void |
setFocus(EditPart part)
|
void |
setKeyHandler(KeyHandler keyHandler)
|
void |
setRootEditPart(RootEditPart root)
Sets the root of this viewer. |
void |
setRouteEventsToEditor(boolean value)
Turns on/off the routing of events directly to the Editor. |
void |
unregisterAccessibleEditPart(AccessibleEditPart acc)
|
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
addSelectionChangedListener, getSelection, removeSelectionChangedListener, setSelection |
| Method Detail |
public void addDragSourceListener(TransferDragSourceListener listener)
public void addDropTargetListener(TransferDropTargetListener listener)
public void appendSelection(EditPart editpart)
public Control createControl(Composite composite)
Control with the default style bits. The control can also be
created externally and then set into the Viewer.setControl(Control)public void deselect(EditPart editpart)
public void deselectAll()
public void dispose()
EditPart.deactivate()public EditPart findObjectAt(Point p)
null or the EditPart at the given mouse location.point - The mouse location
public EditPart findObjectAtExcluding(Point p,
Collection c)
null or the EditPart at the given mouse location,
excluding all EditParts in the Collection
c. If the editpart at the location is part of the exclusion set, the Viewer
should try to search through other EditParts in z-order that also occupy that point.point - The mouse locationc - The collection of editpart that should be excluded from the searchpublic void flush()
public EditPart getContents()
public Control getControl()
public EditDomain getEditDomain()
EditDomain to which the viewer belongspublic EditPartFactory getEditPartFactory()
public Map getEditPartRegistry()
public EditPart getFocusEditPart()
public KeyHandler getKeyHandler()
public RootEditPart getRootEditPart()
setContents(EditPart),
setRootEditPart(RootEditPart)public List getSelectedEditParts()
public Map getVisualPartMap()
public void registerAccessibleEditPart(AccessibleEditPart acc)
public void select(EditPart editpart)
public void setContents(EditPart editpart)
getRootEditPart(),
setRootEditPart(RootEditPart)public void setContents(Object contents)
setEditPartFactory(EditPartFactory)public void setContextMenuProvider(ContextMenuProvider menuProvider)
getControl()public void setControl(Control control)
createControl(Composite)public void setCursor(Cursor c)
getControl()public void setEditDomain(EditDomain domain)
domain - The EditDomainpublic void setEditPartFactory(EditPartFactory factory)
public void setFocus(EditPart part)
public void setKeyHandler(KeyHandler keyHandler)
public void setRootEditPart(RootEditPart root)
setContents(EditPart)public void setRouteEventsToEditor(boolean value)
public void unregisterAccessibleEditPart(AccessibleEditPart acc)
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||