Back to index

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

A command to toggle the snap to grid behavior. More...

Inheritance diagram for CH.ifa.draw.standard.ToggleGridCommand:
Inheritance graph
Collaboration diagram for CH.ifa.draw.standard.ToggleGridCommand:
Collaboration graph

List of all members.

Public Member Functions

 ToggleGridCommand (String name, DrawingView view, Point grid)
 Constructs a toggle grid 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
Point fGrid

Detailed Description

A command to toggle the snap to grid behavior.

Definition at line 16 of file

Constructor & Destructor Documentation

CH.ifa.draw.standard.ToggleGridCommand.ToggleGridCommand ( String  name,
DrawingView  view,
Point  grid 
) [inline]

Constructs a toggle grid command.

namethe command name
imagethe pathname of the image
gridthe grid size. A grid size of 1,1 turns grid snapping off.

Definition at line 27 of file

        fView = view;
        fGrid = new Point(grid.x, grid.y);

Member Function Documentation

Executes the command.

Implements CH.ifa.draw.util.Command.

Definition at line 33 of file

        PointConstrainer grid = fView.getConstrainer();
        if (grid != null) {
        else {
            fView.setConstrainer(new GridConstrainer(fGrid.x, fGrid.y));

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 19 of file

Definition at line 18 of file

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