sk.uniba.euromath.editor.textEditor
Class TextEditPartFactory

java.lang.Object
  extended by sk.uniba.euromath.editor.xmlEditor.XMLEditPartFactory
      extended by sk.uniba.euromath.editor.textEditor.TextEditPartFactory
All Implemented Interfaces:
org.eclipse.gef.EditPartFactory

public class TextEditPartFactory
extends XMLEditPartFactory

Author:
Martin Kollar 28.9.2005

Field Summary
protected  CaretManager caretManager
          Manager that cares about Caret
 
Constructor Summary
TextEditPartFactory(XMLAccess xmlAccess, CaretManager cManager, org.eclipse.gef.GraphicalViewer graphicalViewer)
          Constructor.
 
Method Summary
 void clearIdContainersMap()
          Clears the map.
 org.eclipse.gef.EditPart createEditPart(org.eclipse.gef.EditPart context, Object model)
          Creates TextEditPart for ITextLocator, sets container for it and updates visual info or call super for another model.
protected  TextEditPart createTextEditPart(ITextLocator figure)
          Creates edit part expected for ITextLocator figure.
 org.eclipse.gef.GraphicalViewer getGraphicalViewer()
           
 Map<String,List<ITextPieceContainer>> getIdContainersMap()
          Maps id of node to all created containers fot that node.
 IDManager getIdManager()
          Returns id manager.
protected  XMLAccess getXmlAccess()
           
 
Methods inherited from class sk.uniba.euromath.editor.xmlEditor.XMLEditPartFactory
getVisualInfo, updateVisualInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caretManager

protected final CaretManager caretManager
Manager that cares about Caret

Constructor Detail

TextEditPartFactory

public TextEditPartFactory(XMLAccess xmlAccess,
                           CaretManager cManager,
                           org.eclipse.gef.GraphicalViewer graphicalViewer)
Constructor.

Parameters:
xmlAccess - xml access instance
cManager - CaretManager
graphicalViewer - graphical viewer reference
Method Detail

getIdManager

public IDManager getIdManager()
Returns id manager.

Returns:
manager of node's ids

getXmlAccess

protected XMLAccess getXmlAccess()
Returns:
Returns the xmlAccess.

createTextEditPart

protected TextEditPart createTextEditPart(ITextLocator figure)
Creates edit part expected for ITextLocator figure. This implementation creates TextEditPart. If is expected another edit part extended from TextEditPart, override.

Parameters:
figure - ITextLocator figure
Returns:
edit part for figure

createEditPart

public org.eclipse.gef.EditPart createEditPart(org.eclipse.gef.EditPart context,
                                               Object model)
Creates TextEditPart for ITextLocator, sets container for it and updates visual info or call super for another model.

Specified by:
createEditPart in interface org.eclipse.gef.EditPartFactory
Overrides:
createEditPart in class XMLEditPartFactory
Parameters:
context - parent EditPart
model - figure for which editPart should be created

getGraphicalViewer

public org.eclipse.gef.GraphicalViewer getGraphicalViewer()
Returns:
Returns the graphicalViewer.

getIdContainersMap

public Map<String,List<ITextPieceContainer>> getIdContainersMap()
Maps id of node to all created containers fot that node. More containers are present for one id, if XSLT duplicates nodes.

Returns:
map:

clearIdContainersMap

public void clearIdContainersMap()
Clears the map.



Copyright © 2003-2006 null. All Rights Reserved.