|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.gef.ui.parts.AbstractEditPartViewer org.eclipse.gef.ui.parts.GraphicalViewerImpl org.eclipse.gef.ui.parts.ScrollingGraphicalViewer sk.uniba.euromath.editor.textEditor.viewers.ScrollingTextGraphicalViewer
public class ScrollingTextGraphicalViewer
Overrides selection funcionality of ScrollingGraphicalViewer. Selection is represented by DOMIntervalSet.
Converts DOMIntervals from DOMIntervalSet to EditParts and start offset and end offset in this EditParts
Call @see #commitSelection() when selecting ends (mouse up, button up), this fires selection to
selectionChangedListeners
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.gef.EditPartViewer |
---|
org.eclipse.gef.EditPartViewer.Conditional |
Field Summary | |
---|---|
protected List<IDOMSelectionChangedListener> |
selectionChangedListeners
|
Fields inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer |
---|
constantSelection, focusPart, selection, selectionListeners |
Constructor Summary | |
---|---|
ScrollingTextGraphicalViewer(XMLEditor editor)
|
Method Summary | |
---|---|
void |
addSelectionChangedListener(IDOMSelectionChangedListener listener)
Adds a listener for selection changes in this selection provider. |
void |
commitSelection()
This tells to DOMSelectionChangeListeners(probably only TextEditor), about new selection. |
void |
deselect(org.eclipse.gef.EditPart editpart)
Deselecting whole EditPart. |
void |
deselectAll()
Deselects all selected editparts. |
protected void |
fireSelectionChanged()
This is called when selecting ends (mouse up or button up) |
sk.baka.ikslibs.interval.DOMIntervalSet |
getDOMSelection()
Returns copy of the current selection of provider. |
List |
getSelectedEditParts()
|
void |
removeSelectionChangedListener(IDOMSelectionChangedListener listener)
Removes the given selection change listener from this selection provider. |
void |
select(org.eclipse.gef.EditPart editpart)
Selecting whole EditPart. |
protected void |
select(ITextPieceKeeper keeper,
int start,
int end)
|
void |
selectionChanged(DOMSelectionChangedEvent event)
Effect is same as using setSelection |
void |
setSelection(sk.baka.ikslibs.interval.DOMIntervalSet selection)
Deselects editparts with Ids, that were in previous selection and select editparts that are in DOMIntervalSet |
void |
showSelection(sk.baka.ikslibs.interval.DOMIntervalSet selection)
Shows selection, but actual selection doesn't changes. |
Methods inherited from class org.eclipse.gef.ui.parts.ScrollingGraphicalViewer |
---|
createControl, getFigureCanvas, reveal, setRootFigure |
Methods inherited from class org.eclipse.gef.ui.parts.GraphicalViewerImpl |
---|
createDefaultRoot, createLightweightSystem, findHandleAt, findObjectAtExcluding, flush, getEventDispatcher, getLayerManager, getLightweightSystem, getRootFigure, handleDispose, handleFocusGained, handleFocusLost, hookControl, hookDropTarget, registerAccessibleEditPart, setContextMenu, setCursor, setDragSource, setEditDomain, setRootEditPart, setRouteEventsToEditDomain, unhookControl, unregisterAccessibleEditPart |
Methods inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer |
---|
addDragSourceListener, addDragSourceListener, addDropTargetListener, addDropTargetListener, addPropertyChangeListener, addSelectionChangedListener, appendSelection, findObjectAt, findObjectAtExcluding, getContents, getContextMenu, getControl, getDelegatingDragAdapter, getDelegatingDropAdapter, getDragSource, getDropTarget, getEditDomain, getEditPartFactory, getEditPartRegistry, getFocusEditPart, getKeyHandler, getProperty, getRootEditPart, getSelection, getSelectionManager, getVisualPartMap, hookDragSource, init, primGetSelectedEditParts, refreshDragSourceAdapter, refreshDropTargetAdapter, removeDragSourceListener, removeDragSourceListener, removeDropTargetListener, removeDropTargetListener, removePropertyChangeListener, removeSelectionChangedListener, setContents, setContents, setControl, setDropTarget, setEditPartFactory, setFocus, setKeyHandler, setProperty, setSelection, setSelectionManager |
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.GraphicalViewer |
---|
findHandleAt |
Methods inherited from interface org.eclipse.gef.EditPartViewer |
---|
addDragSourceListener, addDragSourceListener, addDropTargetListener, addDropTargetListener, addPropertyChangeListener, appendSelection, createControl, findObjectAt, findObjectAtExcluding, findObjectAtExcluding, flush, getContents, getContextMenu, getControl, getEditDomain, getEditPartFactory, getEditPartRegistry, getFocusEditPart, getKeyHandler, getProperty, getRootEditPart, getSelection, getSelectionManager, getVisualPartMap, registerAccessibleEditPart, removeDragSourceListener, removeDragSourceListener, removeDropTargetListener, removeDropTargetListener, removePropertyChangeListener, reveal, setContents, setContents, setContextMenu, setControl, setCursor, setEditDomain, setEditPartFactory, setFocus, setKeyHandler, setProperty, setRootEditPart, setRouteEventsToEditDomain, setSelectionManager, unregisterAccessibleEditPart |
Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
---|
addSelectionChangedListener, removeSelectionChangedListener, setSelection |
Field Detail |
---|
protected List<IDOMSelectionChangedListener> selectionChangedListeners
Constructor Detail |
---|
public ScrollingTextGraphicalViewer(XMLEditor editor)
editor
- Editor that uses this viewer to view its stateMethod Detail |
---|
public void addSelectionChangedListener(IDOMSelectionChangedListener listener)
IDOMSelectionProvider
addSelectionChangedListener
in interface IDOMSelectionProvider
listener
- new listener to be add from selectionChangedListenerspublic void removeSelectionChangedListener(IDOMSelectionChangedListener listener)
IDOMSelectionProvider
removeSelectionChangedListener
in interface IDOMSelectionProvider
listener
- listener to be removed from selectionChangedListenerspublic void showSelection(sk.baka.ikslibs.interval.DOMIntervalSet selection)
IXMLGraphicalViewer
showSelection
in interface IXMLGraphicalViewer
selection
- the selection to showpublic void setSelection(sk.baka.ikslibs.interval.DOMIntervalSet selection)
setSelection
in interface IDOMSelectionProvider
selection
- DOMIntervalSet containing DOMInetervals, that have to be selectedpublic void selectionChanged(DOMSelectionChangedEvent event)
selectionChanged
in interface IDOMSelectionChangedListener
event
- DOMSelectionChangedEvent that contains source of new selction, that should be
some XMLEditor and DOMIntervalSet as selectionprotected void fireSelectionChanged()
fireSelectionChanged
in class org.eclipse.gef.ui.parts.AbstractEditPartViewer
protected void select(ITextPieceKeeper keeper, int start, int end)
public void select(org.eclipse.gef.EditPart editpart)
editpart
is ITextPieceKeeper then visualization is left on
select
in interface org.eclipse.gef.EditPartViewer
select
in class org.eclipse.gef.ui.parts.AbstractEditPartViewer
editpart
- EditPart that is going to be selectedIf editpart
is not ITextPieceKeeper then visualization is left on this editpart.
,
EditPart#setSelected(EditPart.SELECTED)
public void deselect(org.eclipse.gef.EditPart editpart)
editpart
is ITextPieceKeeper then visualization is left on
deselect
in interface org.eclipse.gef.EditPartViewer
deselect
in class org.eclipse.gef.ui.parts.AbstractEditPartViewer
editpart
- EditPart that is going to be deselectedIf editpart
is not ITextPieceKeeper then visualization is left on this editpart.
,
EditPart#setSelected(EditPart.SELECTED_NONE)
public void deselectAll()
deselectAll
in interface org.eclipse.gef.EditPartViewer
deselectAll
in class org.eclipse.gef.ui.parts.AbstractEditPartViewer
public void commitSelection()
public List getSelectedEditParts()
getSelectedEditParts
in interface org.eclipse.gef.EditPartViewer
getSelectedEditParts
in class org.eclipse.gef.ui.parts.AbstractEditPartViewer
public sk.baka.ikslibs.interval.DOMIntervalSet getDOMSelection()
IDOMSelectionProvider
getDOMSelection
in interface IDOMSelectionProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |