|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.gef.editparts.AbstractEditPart org.eclipse.gef.editparts.AbstractGraphicalEditPart sk.uniba.euromath.editor.xmlEditor.editParts.XMLEditPart sk.uniba.euromath.editor.textEditor.editParts.TextEditPart
public class TextEditPart
EditPart that represents one line of text. Has also editing capabilities, but editing does nothing, supposed to be overriden.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
---|
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider |
Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart |
---|
org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator |
Field Summary |
---|
Fields inherited from class sk.uniba.euromath.editor.xmlEditor.editParts.XMLEditPart |
---|
id |
Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
---|
figure, sourceConnections, targetConnections |
Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart |
---|
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG |
Fields inherited from interface org.eclipse.gef.EditPart |
---|
SELECTED, SELECTED_NONE, SELECTED_PRIMARY |
Fields inherited from interface org.eclipse.gef.RequestConstants |
---|
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER |
Constructor Summary | |
---|---|
TextEditPart(ITextLocator figure,
CaretManager cManager,
org.eclipse.gef.GraphicalViewer graphicalViewer,
XMLAccess xmlAccess,
Boolean selectable)
Constructor. |
Method Summary | |
---|---|
protected void |
createEditPolicies()
Installs adition policies - text policies. |
org.eclipse.gef.DragTracker |
getDragTracker(org.eclipse.gef.Request request)
|
protected org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
Getter for graphical viewer. |
ITextPieceKeeper |
getKeeperInDirection(Direction direction,
int gapIndex)
Returns keeper located in direction from this keeper at xCoordinate. |
List |
getModelChildren()
Returns empty list, because can't have children. |
ITextPieceKeeper |
getNextKeeperInDirection(Direction position)
Returns keeper located next in direction to this's. |
ITextPieceSelectionStatus |
getSelectionStatus()
Returns status about which text is selected. |
String |
getText()
Returns rendered keeper's text. |
ITextPieceContainer |
getTextContainer()
Returns ITextPieceContainer where keeper is held. |
ITextLocator |
getTextLocator()
Returns ITextLocator for this keeper. |
ITextPieceInfo |
getTextPieceInfo()
Returns ITextPieceInfo about keeper's text piece. |
protected org.eclipse.gef.EditPolicy |
getUnderstandingPolicy(org.eclipse.gef.Request request)
Returns first policy that understands request. |
protected XMLAccess |
getXmlAccess()
Getter. |
void |
performRequest(org.eclipse.gef.Request req)
Finds Understaning policy, gets command from this policy and put it to command stack for execute. |
void |
setTextContainer(ITextPieceContainer textContainer)
Sets text container and text info from that container. |
void |
showSelection()
Shows(renders) actual selection stored in ITextSelectionStatus. |
String |
toString()
|
Methods inherited from class sk.uniba.euromath.editor.xmlEditor.editParts.XMLEditPart |
---|
addChildVisual, computeModelChildren, createFigure, getID, getTargetEditPart, getXMLEditPartFactory, isSelectable, refreshVisuals, removeChildVisual, setID, setSelectability |
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
---|
activate, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, deactivate, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getAdapter, getContentPane, getFigure, getLayer, getModelSourceConnections, getModelTargetConnections, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals |
Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart |
---|
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getRoot, getSelected, getViewer, hasFocus, installEditPolicy, isActive, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest, unregister, unregisterAccessibility, unregisterModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface sk.uniba.euromath.editor.xmlEditor.IXMLEditPart |
---|
getID |
Methods inherited from interface org.eclipse.gef.GraphicalEditPart |
---|
addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint |
Methods inherited from interface org.eclipse.gef.EditPart |
---|
activate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Constructor Detail |
---|
public TextEditPart(ITextLocator figure, CaretManager cManager, org.eclipse.gef.GraphicalViewer graphicalViewer, XMLAccess xmlAccess, Boolean selectable)
figure
- displaying text piececManager
- CaretManagergraphicalViewer
- graphical viewer referencexmlAccess
- xml access referenceselectable
- flag if is selectableMethod Detail |
---|
public org.eclipse.gef.DragTracker getDragTracker(org.eclipse.gef.Request request)
getDragTracker
in interface org.eclipse.gef.EditPart
getDragTracker
in class XMLEditPart
request
- can be anything, the result does not depent on request
null
EditPart.getDragTracker(org.eclipse.gef.Request)
protected void createEditPolicies()
createEditPolicies
in class XMLEditPart
public List getModelChildren()
getModelChildren
in class XMLEditPart
protected org.eclipse.gef.EditPolicy getUnderstandingPolicy(org.eclipse.gef.Request request)
request
- to understand
public void performRequest(org.eclipse.gef.Request req)
performRequest
in interface org.eclipse.gef.EditPart
performRequest
in class org.eclipse.gef.editparts.AbstractEditPart
req
- Requestpublic ITextLocator getTextLocator()
ITextPieceKeeper
getTextLocator
in interface ITextPieceKeeper
public ITextPieceInfo getTextPieceInfo()
ITextPieceKeeper
getTextPieceInfo
in interface ITextPieceKeeper
public ITextPieceSelectionStatus getSelectionStatus()
ITextPieceKeeper
getSelectionStatus
in interface ITextPieceKeeper
public ITextPieceContainer getTextContainer()
ITextPieceKeeper
getTextContainer
in interface ITextPieceKeeper
public void showSelection()
ITextPieceKeeper
showSelection
in interface ITextPieceKeeper
public String getText()
ITextPieceKeeper
ITextPieceInfo.getRenderedText()
getText
in interface ITextPieceKeeper
public ITextPieceKeeper getNextKeeperInDirection(Direction position)
ITextPieceKeeper
getNextKeeperInDirection
in interface ITextPieceKeeper
position
- one of Direction#LEFT
,
Direction#RIGHT
public ITextPieceKeeper getKeeperInDirection(Direction direction, int gapIndex)
ITextPieceKeeper
getKeeperInDirection
in interface ITextPieceKeeper
direction
- Direction#TOP
, Direction#BOTTOM
gapIndex
- x coordinate of vertical to find closest keeper in
directionpublic String toString()
toString
in class XMLEditPart
public void setTextContainer(ITextPieceContainer textContainer)
setTextContainer
in interface ITextPieceKeeper
textContainer
- protected XMLAccess getXmlAccess()
protected org.eclipse.gef.GraphicalViewer getGraphicalViewer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |