sk.uniba.euromath.editor.textEditor.viewers
Class TextGraphicalViewerImpl

java.lang.Object
  extended by org.eclipse.gef.ui.parts.AbstractEditPartViewer
      extended by org.eclipse.gef.ui.parts.GraphicalViewerImpl
          extended by sk.uniba.euromath.editor.xmlEditor.viewers.XMLGraphicalViewerImpl
              extended by sk.uniba.euromath.editor.textEditor.viewers.TextGraphicalViewerImpl
All Implemented Interfaces:
org.eclipse.gef.EditPartViewer, org.eclipse.gef.GraphicalViewer, ISelectionProvider, IDOMSelectionChangedListener, IDOMSelectionProvider, IXMLGraphicalViewer

public class TextGraphicalViewerImpl
extends XMLGraphicalViewerImpl

Author:
Martin Kollar

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.gef.EditPartViewer
org.eclipse.gef.EditPartViewer.Conditional
 
Field Summary
 
Fields inherited from class sk.uniba.euromath.editor.xmlEditor.viewers.XMLGraphicalViewerImpl
selection
 
Fields inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer
constantSelection, focusPart, selectionListeners
 
Constructor Summary
TextGraphicalViewerImpl(TextEditor editor)
          Contructor.
 
Method Summary
 void deselect(org.eclipse.gef.EditPart editpart)
          Deselects edit part.
 void deselectAll()
          Deselects all selected editparts.
 void select(org.eclipse.gef.EditPart editpart)
          Selecting whole EditPart.
 void select(ITextPieceKeeper keeper, int startIndex, int endIndex)
          Selects text of keeper according to indexes.
 void setSelection(DOMIntervalSet selection)
          Deselects editparts with Ids, that were in previous selection and select editparts that are in DOMIntervalSet
 
Methods inherited from class sk.uniba.euromath.editor.xmlEditor.viewers.XMLGraphicalViewerImpl
addSelectionChangedListener, fireSelectionChanged, getDOMSelection, getIDManager, getXMLAccess, removeSelectionChangedListener, selectionChanged, startSelectionListening, stopSelectionListening
 
Methods inherited from class org.eclipse.gef.ui.parts.GraphicalViewerImpl
createControl, createDefaultRoot, createLightweightSystem, findHandleAt, findObjectAtExcluding, flush, getEventDispatcher, getLayerManager, getLightweightSystem, getRootFigure, handleDispose, handleFocusGained, handleFocusLost, hookControl, hookDropTarget, registerAccessibleEditPart, reveal, setContextMenu, setCursor, setDragSource, setEditDomain, setRootEditPart, setRootFigure, 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, getSelectedEditParts, 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, getSelectedEditParts, 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
 

Constructor Detail

TextGraphicalViewerImpl

public TextGraphicalViewerImpl(TextEditor editor)
Contructor.

Parameters:
editor - text editor that uses this GraphicalViewer
Method Detail

setSelection

public void setSelection(DOMIntervalSet selection)
Deselects editparts with Ids, that were in previous selection and select editparts that are in DOMIntervalSet

Specified by:
setSelection in interface IDOMSelectionProvider
Overrides:
setSelection in class XMLGraphicalViewerImpl
Parameters:
selection - DOMIntervalSet containing DOMInetervals, that have to be selected

select

public void select(org.eclipse.gef.EditPart editpart)
Selecting whole EditPart.

Specified by:
select in interface org.eclipse.gef.EditPartViewer
Overrides:
select in class XMLGraphicalViewerImpl
Parameters:
editpart - EditPart that is going to be selected

select

public void select(ITextPieceKeeper keeper,
                   int startIndex,
                   int endIndex)
Selects text of keeper according to indexes. It means selection is expanded by this interval. Indexes of value -1 are transformed to bounds of rendered text.

Parameters:
keeper - target for selection
startIndex - index in rendered text where start to select from, if has value -1, then is set to 0
endIndex - index of first char not to select in rendered text, if has value -1, then set to one behind keeper's rendered text

deselect

public void deselect(org.eclipse.gef.EditPart editpart)
Deselects edit part.

Specified by:
deselect in interface org.eclipse.gef.EditPartViewer
Overrides:
deselect in class XMLGraphicalViewerImpl
Parameters:
editpart - EditPart that is going to be deselected

deselectAll

public void deselectAll()
Deselects all selected editparts. At the end fires selection change.

Specified by:
deselectAll in interface org.eclipse.gef.EditPartViewer
Overrides:
deselectAll in class org.eclipse.gef.ui.parts.AbstractEditPartViewer


Copyright © 2003-2006 null. All Rights Reserved.