Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes | Protected Attributes
CH.ifa.draw.standard.NullHandle Class Reference

A handle that doesn't change the owned figure. More...

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

List of all members.

Public Member Functions

 NullHandle (Figure owner, Locator locator)
void draw (Graphics g)
 Draws the NullHandle.
Point locate ()
 Locates the handle on the figure by forwarding the request to its figure.
void invokeStart (int x, int y, Drawing drawing)
 @ deprecated As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction.
void invokeStart (int x, int y, DrawingView view)
 @ deprecated As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction.
void invokeStep (int dx, int dy, Drawing drawing)
 @ deprecated As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView)
void invokeStep (int x, int y, int anchorX, int anchorY, DrawingView view)
 Tracks a step of the interaction.
void invokeEnd (int x, int y, int anchorX, int anchorY, DrawingView view)
 Tracks the end of the interaction.
void invokeEnd (int dx, int dy, Drawing drawing)
Figure owner ()
 Gets the handle's owner.
Rectangle displayBox ()
 Gets the display box of the handle.
boolean containsPoint (int x, int y)
 Tests if a point is contained in the handle.

Static Public Attributes

static final int HANDLESIZE = 8
 The standard size of a handle.

Protected Attributes

Locator fLocator
 The handle's locator.

Detailed Description

A handle that doesn't change the owned figure.

Its only purpose is to show feedback that a figure is selected.


Design Patterns

 o

NullObject
NullObject enables to treat handles that don't do anything in the same way as other handles.

Definition at line 22 of file NullHandle.java.


Constructor & Destructor Documentation

CH.ifa.draw.standard.NullHandle.NullHandle ( Figure  owner,
Locator  locator 
) [inline]

Definition at line 29 of file NullHandle.java.

                                                     {
        super(owner, locator);
    }

Member Function Documentation

boolean CH.ifa.draw.standard.AbstractHandle.containsPoint ( int  x,
int  y 
) [inline, inherited]

Tests if a point is contained in the handle.

Definition at line 124 of file AbstractHandle.java.

                                               {
        return displayBox().contains(x, y);
    }

Here is the call graph for this function:

Rectangle CH.ifa.draw.standard.AbstractHandle.displayBox ( ) [inline, inherited]

Gets the display box of the handle.

Definition at line 112 of file AbstractHandle.java.

                                  {
        Point p = locate();
        return new Rectangle(
                p.x - HANDLESIZE / 2,
                p.y - HANDLESIZE / 2,
                HANDLESIZE,
                HANDLESIZE);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void CH.ifa.draw.standard.NullHandle.draw ( Graphics  g) [inline]

Draws the NullHandle.

NullHandles are drawn as a red framed rectangle.

Reimplemented from CH.ifa.draw.standard.AbstractHandle.

Reimplemented in CH.ifa.draw.figures.GroupHandle.

Definition at line 37 of file NullHandle.java.

                                 {
        Rectangle r = displayBox();

        g.setColor(Color.black);
        g.drawRect(r.x, r.y, r.width, r.height);
    }

Here is the call graph for this function:

void CH.ifa.draw.standard.AbstractHandle.invokeEnd ( int  x,
int  y,
int  anchorX,
int  anchorY,
DrawingView  view 
) [inline, inherited]

Tracks the end of the interaction.

Parameters:
xthe current x position
ythe current y position
anchorXthe x position where the interaction started
anchorYthe y position where the interaction started

Reimplemented in CH.ifa.draw.standard.ChangeConnectionHandle, and CH.ifa.draw.standard.ConnectionHandle.

Definition at line 90 of file AbstractHandle.java.

                                                                                    {
        invokeEnd(x-anchorX, y-anchorY, view.drawing());
    }
void CH.ifa.draw.standard.AbstractHandle.invokeEnd ( int  dx,
int  dy,
Drawing  drawing 
) [inline, inherited]
Deprecated:
As of version 4.1, use invokeEnd(x, y, anchorX, anchorY, drawingView).

Tracks the end of the interaction.

Definition at line 100 of file AbstractHandle.java.

{ }
void CH.ifa.draw.standard.AbstractHandle.invokeStart ( int  x,
int  y,
Drawing  drawing 
) [inline, inherited]

@ deprecated As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction.

The default implementation does nothing.

Parameters:
xthe x position where the interaction started
ythe y position where the interaction started

Definition at line 47 of file AbstractHandle.java.

{ }

Here is the caller graph for this function:

void CH.ifa.draw.standard.AbstractHandle.invokeStart ( int  x,
int  y,
DrawingView  view 
) [inline, inherited]

@ deprecated As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction.

The default implementation does nothing.

Parameters:
xthe x position where the interaction started
ythe y position where the interaction started
viewthe handles container

Reimplemented in CH.ifa.draw.standard.ChangeConnectionHandle, CH.ifa.draw.standard.ConnectionHandle, CH.ifa.draw.figures.PolyLineHandle, and CH.ifa.draw.figures.FontSizeHandle.

Definition at line 58 of file AbstractHandle.java.

                                                              {
        invokeStart(x, y, view.drawing());
    }

Here is the call graph for this function:

void CH.ifa.draw.standard.AbstractHandle.invokeStep ( int  dx,
int  dy,
Drawing  drawing 
) [inline, inherited]

@ deprecated As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView)

Tracks a step of the interaction.

Parameters:
dxx delta of this step
dyy delta of this step

Definition at line 70 of file AbstractHandle.java.

{ }

Here is the caller graph for this function:

void CH.ifa.draw.standard.AbstractHandle.invokeStep ( int  x,
int  y,
int  anchorX,
int  anchorY,
DrawingView  view 
) [inline, inherited]

Tracks a step of the interaction.

Parameters:
xthe current x position
ythe current y position
anchorXthe x position where the interaction started
anchorYthe y position where the interaction started

Reimplemented in CH.ifa.draw.standard.WestHandle, CH.ifa.draw.standard.SouthWestHandle, CH.ifa.draw.standard.SouthHandle, CH.ifa.draw.standard.SouthEastHandle, CH.ifa.draw.standard.NorthWestHandle, CH.ifa.draw.standard.NorthHandle, CH.ifa.draw.standard.EastHandle, CH.ifa.draw.standard.NorthEastHandle, CH.ifa.draw.standard.ChangeConnectionHandle, CH.ifa.draw.standard.ConnectionHandle, CH.ifa.draw.figures.PolyLineHandle, and CH.ifa.draw.figures.FontSizeHandle.

Definition at line 79 of file AbstractHandle.java.

                                                                                      {
        invokeStep(x-anchorX, y-anchorY, view.drawing());
    }

Here is the call graph for this function:

Point CH.ifa.draw.standard.LocatorHandle.locate ( ) [inline, virtual, inherited]

Locates the handle on the figure by forwarding the request to its figure.

Implements CH.ifa.draw.standard.AbstractHandle.

Definition at line 34 of file LocatorHandle.java.

                          {
        return fLocator.locate(owner());
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Figure CH.ifa.draw.standard.AbstractHandle.owner ( ) [inline, inherited]

Gets the handle's owner.

Definition at line 105 of file AbstractHandle.java.

                          {
        return fOwner;
    }

Here is the caller graph for this function:


Member Data Documentation

The handle's locator.

Reimplemented from CH.ifa.draw.standard.LocatorHandle.

Definition at line 27 of file NullHandle.java.

final int CH.ifa.draw.standard.AbstractHandle.HANDLESIZE = 8 [static, inherited]

The standard size of a handle.

Definition at line 23 of file AbstractHandle.java.


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