Back to index

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

Command to change a named figure attribute. More...

Inheritance diagram for CH.ifa.draw.standard.ChangeAttributeCommand:
Inheritance graph
[legend]
Collaboration diagram for CH.ifa.draw.standard.ChangeAttributeCommand:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChangeAttributeCommand (String name, String attributeName, Object value, DrawingView view)
 Constructs a change attribute 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 fAttribute
Object fValue

Detailed Description

Command to change a named figure attribute.

Definition at line 15 of file ChangeAttributeCommand.java.


Constructor & Destructor Documentation

CH.ifa.draw.standard.ChangeAttributeCommand.ChangeAttributeCommand ( String  name,
String  attributeName,
Object  value,
DrawingView  view 
) [inline]

Constructs a change attribute command.

Parameters:
namethe command name
attributeNamethe name of the attribute to be changed
valuethe new attribute value
viewthe target view

Definition at line 29 of file ChangeAttributeCommand.java.

                                                           {
        super(name);
        fAttribute = attributeName;
        fValue = value;
        fView = view;
    }

Member Function Documentation

Executes the command.

Implements CH.ifa.draw.util.Command.

Definition at line 37 of file ChangeAttributeCommand.java.

                          {
        FigureEnumeration k = fView.selectionElements();
        while (k.hasMoreElements()) {
            Figure f = k.nextFigure();
            f.setAttribute(fAttribute, fValue);
        }
        fView.checkDamage();
    }

Here is the caller graph for this function:

Tests if the command can be executed.

Reimplemented from CH.ifa.draw.util.Command.

Definition at line 46 of file ChangeAttributeCommand.java.

                                  {
        return fView.selectionCount() > 0;
    }
String CH.ifa.draw.util.Command.name ( ) [inline, inherited]

Gets the command name.

Definition at line 53 of file Command.java.

                         {
        return fName;
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 19 of file ChangeAttributeCommand.java.

Definition at line 20 of file ChangeAttributeCommand.java.

Definition at line 18 of file ChangeAttributeCommand.java.


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