jcreek.cke.command
Class ActivateEntityCommand

java.lang.Object
  extended byjcreek.cke.command.CreekCommand
      extended byjcreek.cke.command.ActivateEntityCommand
All Implemented Interfaces:
javax.swing.undo.UndoableEdit

public class ActivateEntityCommand
extends CreekCommand

Title: JavaCreek Description: A Case Based Reasoning approach developed in Java Copyright: Copyright (c) 1999 Company: Phil Systems

Version:
Author:
Victor Dias

Field Summary
 
Fields inherited from class jcreek.cke.command.CreekCommand
canUndoRedo, document
 
Constructor Summary
ActivateEntityCommand(CreekDocument doc, VisualEntity ve)
          Constructor for this command.
 
Method Summary
 boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
          Try to merge anEdit with this edit.
 void die()
           
 java.lang.String getPresentationName()
          Return the human-readable name for this action.
 java.lang.String getRedoPresentationName()
          Return the human-readable name for redoing this command.
 java.lang.String getUndoPresentationName()
          Return the human-readable name for undoing this command.
 boolean isSignificant()
          Return true if this command is not a side-effect of some other change. activating a Entity is always significant.
 boolean perform()
          Perform the action for the first time.
 void redo()
           
 boolean replaceEdit(javax.swing.undo.UndoableEdit anEdit)
          See if we can be the given edit, thus replacing it in the undo queue.
 void undo()
           
 
Methods inherited from class jcreek.cke.command.CreekCommand
canRedo, canUndo, getDocument, replaced, setDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivateEntityCommand

public ActivateEntityCommand(CreekDocument doc,
                             VisualEntity ve)
Constructor for this command. Saves the entity and document for use with do, undo, and redo operations.

Parameters:
doc - document we're performed on
Method Detail

getUndoPresentationName

public java.lang.String getUndoPresentationName()
Return the human-readable name for undoing this command.

Returns:
human-readable name for undoable form of this command

perform

public boolean perform()
Perform the action for the first time.

Specified by:
perform in class CreekCommand
Returns:
true if command executed, false if error

die

public void die()

isSignificant

public boolean isSignificant()
Return true if this command is not a side-effect of some other change. activating a Entity is always significant.

Returns:
true if change is a side-effect of other changes

redo

public void redo()

undo

public void undo()

addEdit

public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
Try to merge anEdit with this edit.

Parameters:
anEdit - edit to absorb
Returns:
true if anEdit was absorbed

getRedoPresentationName

public java.lang.String getRedoPresentationName()
Return the human-readable name for redoing this command.

Returns:
human-readable name for redoable form of this command

replaceEdit

public boolean replaceEdit(javax.swing.undo.UndoableEdit anEdit)
See if we can be the given edit, thus replacing it in the undo queue.

Parameters:
anEdit - edit command to replace
Returns:
true if anEdit replaced

getPresentationName

public java.lang.String getPresentationName()
Return the human-readable name for this action.

Returns:
human-readable name for this command


Created at IDI, NTNU by the Artificial Intelligence and Learning group