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

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

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

Author:
TV, refactored by Martin Kollar 10.6.2005 Switches the active tool to TextTool

Constructor Summary
SwitchEditModeCommand(ITextPieceKeeper origin, int caretOffset, CaretManager cManager, org.eclipse.gef.EditDomain domain)
           
 
Method Summary
 boolean canExecute()
           
 void execute()
          Swithes tool to TextTool
protected  org.eclipse.gef.Tool getEditingTool()
           
 
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

SwitchEditModeCommand

public SwitchEditModeCommand(ITextPieceKeeper origin,
                             int caretOffset,
                             CaretManager cManager,
                             org.eclipse.gef.EditDomain domain)
Parameters:
origin - EditPart which calls this command
caretOffset - is offset where to activate Caret in origin ITextPieceKeeper
cManager - CaretManager
domain - EditDomain on that new Tool will be instaled
Method Detail

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
Returns:
true if it was created in EditPart implementing ITextPieceKeeper

execute

public void execute()
Swithes tool to TextTool

Overrides:
execute in class org.eclipse.gef.commands.Command

getEditingTool

protected org.eclipse.gef.Tool getEditingTool()


Copyright © 2003-2006 null. All Rights Reserved.