sk.uniba.euromath.editor.textEditor.commands
Class InsertTextCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by sk.uniba.euromath.editor.textEditor.commands.InsertTextCommand

public class InsertTextCommand
extends org.eclipse.gef.commands.Command

Command to insert text. Only to delete. Use canExecute to test if deletin can be performed.

Author:
Tomáš Studva 1.10.2005

Constructor Summary
InsertTextCommand(ITextPieceKeeper pieceKeeper, int position, String textToInsert, XMLAccess xmlAccess)
          Constructor.
InsertTextCommand(String id, int position, String textToInsert, XMLAccess xmlAccess)
          Constructor.
 
Method Summary
 boolean canExecute()
           
 void execute()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertTextCommand

public InsertTextCommand(ITextPieceKeeper pieceKeeper,
                         int position,
                         String textToInsert,
                         XMLAccess xmlAccess)
Constructor. Target of insertion = piece keeper's text.

Parameters:
pieceKeeper - pieceKeeper holding text where insertion will be done
position - position of insertion in pieceKeeper's text
textToInsert - text to insert
xmlAccess - XMLAccess instance

InsertTextCommand

public InsertTextCommand(String id,
                         int position,
                         String textToInsert,
                         XMLAccess xmlAccess)
Constructor. Target of insertion = textual node's text.

Parameters:
id - of textual node holding text where insertion will be done
position - position of insertion in textual node's text
textToInsert - text to insert
xmlAccess - XMLAccess instance
Method Detail

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


Copyright © 2003-2006 null. All Rights Reserved.