sk.uniba.euromath.editor.textEditor.commands
Class InsertTextCommand
java.lang.Object
org.eclipse.gef.commands.Command
sk.uniba.euromath.editor.textEditor.commands.InsertTextCommand
public class InsertTextCommand
- extends org.eclipse.gef.commands.Command
Command to insert text and move caret to correct position. Use canExecute to
test if insertion can be performed.
- Author:
- Tomáš Studva 1.10.2005
Methods inherited from class org.eclipse.gef.commands.Command |
canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InsertTextCommand
public InsertTextCommand(ITextPieceKeeper pieceKeeper,
int position,
String textToInsert,
XMLAccess xmlAccess,
CaretManager caretManager)
- Constructor. Target of insertion = piece keeper's text.
- Parameters:
pieceKeeper
- pieceKeeper holding text where insertion will be doneposition
- position of insertion in pieceKeeper's rendered
texttextToInsert
- text to insertxmlAccess
- XMLAccess instance
InsertTextCommand
public InsertTextCommand(String id,
int position,
String textToInsert,
XMLAccess xmlAccess,
CaretManager caretManager)
- Constructor. Target of insertion = textual node's text.
- Parameters:
id
- of textual node holding text where insertion will be
doneposition
- position of insertion in textual node's texttextToInsert
- text to insertxmlAccess
- XMLAccess instance
execute
public void execute()
- Overrides:
execute
in class org.eclipse.gef.commands.Command
canExecute
public boolean canExecute()
- Overrides:
canExecute
in class org.eclipse.gef.commands.Command
undo
public void undo()
- Overrides:
undo
in class org.eclipse.gef.commands.Command
Copyright © 2003-2006 null. All Rights Reserved.