Back to index

moin  1.9.0~rc2
Public Member Functions | Private Attributes
CH.ifa.draw.figures.InsertImageCommand Class Reference

Command to insert a named image. More...

Inheritance diagram for CH.ifa.draw.figures.InsertImageCommand:
Inheritance graph
Collaboration diagram for CH.ifa.draw.figures.InsertImageCommand:
Collaboration graph

List of all members.

Public Member Functions

 InsertImageCommand (String name, String image, DrawingView view)
 Constructs an insert image command.
void execute ()
 Executes the command.
boolean isExecutable ()
 Tests if the command can be executed.
String name ()
 Gets the command name.

Private Attributes

DrawingView fView
String fImage

Detailed Description

Command to insert a named image.

Definition at line 17 of file

Constructor & Destructor Documentation

CH.ifa.draw.figures.InsertImageCommand.InsertImageCommand ( String  name,
String  image,
DrawingView  view 
) [inline]

Constructs an insert image command.

namethe command name
imagethe pathname of the image
viewthe target view

Definition at line 28 of file

        fImage = image;
        fView = view;

Member Function Documentation

Executes the command.

Implements CH.ifa.draw.util.Command.

Definition at line 34 of file

        // ugly cast to component, but AWT wants and Component instead of an ImageObserver...
        Image image = Iconkit.instance().registerAndLoadImage((Component)fView, fImage);
        ImageFigure figure = new ImageFigure(image, fImage, fView.lastClick());

Here is the caller graph for this function:

boolean CH.ifa.draw.util.Command.isExecutable ( ) [inline, inherited]
String ( ) [inline, inherited]

Gets the command name.

Definition at line 53 of file

        return fName;

Here is the caller graph for this function:

Member Data Documentation

Definition at line 20 of file

Definition at line 19 of file

The documentation for this class was generated from the following file: