|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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. |
void |
deselect()
Deselects anything selected. |
org.eclipse.gef.DragTracker |
getDragTracker(org.eclipse.gef.Request request)
|
protected org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
Getter for graphical viewer. |
List |
getModelChildren()
Returns empty list, because can't have children. |
String |
getPreviousText()
Returns text from node before keeper's text. |
ITextPieceSelectionStatus |
getSelectionStatus()
Returns status about which text is selected. |
String |
getText()
Returns text hold by this ITextPieceKeeper which is the same as text displayed by figure of this editpart. |
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. |
String |
getWholeContainerText()
|
String |
getWholeTextToPosition(int index)
Returns text before keeper's text from node + substring of keeper's text to position index. |
protected XMLAccess |
getXmlAccess()
|
void |
performRequest(org.eclipse.gef.Request req)
Finds Understaning policy, gets command from this policy and put it to command stack for execute. |
void |
select()
Selects whole text. |
void |
select(int start,
int end)
Selects text starting at position start and ending at position end - 1. |
void |
setTextContainer(TextPieceContainer textContainer)
Sets text container and text info from that container. |
| Methods inherited from class sk.uniba.euromath.editor.xmlEditor.editParts.XMLEditPart |
|---|
addChildVisual, computeModelChildren, createFigure, getID, getNavigationSiblings, 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, toString, 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 org.eclipse.gef.EditPart |
|---|
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getViewer, hasFocus, installEditPolicy, isActive, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
| 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 selectable| Method Detail |
|---|
public org.eclipse.gef.DragTracker getDragTracker(org.eclipse.gef.Request request)
getDragTracker in interface org.eclipse.gef.EditPartgetDragTracker in class XMLEditPartrequest - can be anything, the result does not depent on request
nullEditPart.getDragTracker(org.eclipse.gef.Request)protected void createEditPolicies()
createEditPolicies in class XMLEditPartpublic List getModelChildren()
getModelChildren in class XMLEditPartprotected 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.EditPartperformRequest in class org.eclipse.gef.editparts.AbstractEditPartreq - Requestpublic String getText()
getText in interface ITextPieceKeeperpublic ITextLocator getTextLocator()
ITextPieceKeeper
getTextLocator in interface ITextPieceKeeperTextAreaFigure that is ITextLocatorITextPieceKeeper.getTextLocator()public ITextPieceInfo getTextPieceInfo()
ITextPieceKeeper
getTextPieceInfo in interface ITextPieceKeeperITextPieceKeeper.getTextPieceInfo()public ITextPieceSelectionStatus getSelectionStatus()
ITextPieceKeeper
getSelectionStatus in interface ITextPieceKeeperITextPieceSelectionStatus#getStatus()public void select()
ITextPieceKeeper
select in interface ITextPieceKeeperITextPieceKeeper.select()
public void select(int start,
int end)
ITextPieceKeeper
select in interface ITextPieceKeeperstart - index of first character in the selectionend - index of first character that is not in the selectionITextPieceKeeper.select(int,
int)public void deselect()
ITextPieceKeeper
deselect in interface ITextPieceKeeperITextPieceKeeper.deselect()protected org.eclipse.gef.GraphicalViewer getGraphicalViewer()
public ITextPieceContainer getTextContainer()
ITextPieceKeeper
getTextContainer in interface ITextPieceKeeperITextPieceKeeper.getTextContainer()public void setTextContainer(TextPieceContainer textContainer)
textContainer - public String getPreviousText()
ITextPieceKeeper
getPreviousText in interface ITextPieceKeeperITextPieceKeeper.getPreviousText()public String getWholeContainerText()
public String getWholeTextToPosition(int index)
ITextPieceKeeper
getWholeTextToPosition in interface ITextPieceKeeperindex - local position in text
ITextPieceKeeper.getWholeTextToPosition(int)protected XMLAccess getXmlAccess()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||