JHotDraw 6.0b1

Class InsertImageCommand

  extended by org.jhotdraw.standard.AbstractCommand
      extended by org.jhotdraw.figures.InsertImageCommand
All Implemented Interfaces:
FigureSelectionListener, Command

public class InsertImageCommand
extends AbstractCommand

Command to insert a named image.

Nested Class Summary
 class InsertImageCommand.UndoActivity
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractCommand
Constructor Summary
InsertImageCommand(java.lang.String name, java.lang.String newImageName, DrawingEditor newDrawingEditor)
          Constructs an insert image command.
Method Summary
protected  Undoable createUndoActivity()
          Factory method for undo activity
 void execute()
          Executes the command.
Methods inherited from class org.jhotdraw.standard.AbstractCommand
addCommandListener, createEventDispatcher, createViewChangeListener, dispose, figureSelectionChanged, getDrawingEditor, getEventDispatcher, getUndoActivity, isExecutable, isExecutableWithView, isViewRequired, name, removeCommandListener, setName, setUndoActivity, view, viewCreated, viewDestroying, viewSelectionChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public InsertImageCommand(java.lang.String name,
                          java.lang.String newImageName,
                          DrawingEditor newDrawingEditor)
Constructs an insert image command.

name - the command name
newImageName - the pathname of the image
newDrawingEditor - the DrawingEditor which manages the views
Method Detail


public void execute()
Description copied from class: AbstractCommand
Executes the command.

Specified by:
execute in interface Command
execute in class AbstractCommand


protected Undoable createUndoActivity()
Factory method for undo activity

JHotDraw 6.0b1