Back to index

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

AbstractHandle provides defaulf implementation for the Handle interface. More...

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

List of all members.

Public Member Functions

 AbstractHandle (Figure owner)
 Initializes the owner of the figure.
abstract Point locate ()
 Locates the handle on the 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.
void draw (Graphics g)
 Draws this handle.

Static Public Attributes

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

Private Attributes

Figure fOwner

Detailed Description

AbstractHandle provides defaulf implementation for the Handle interface.

See also:
Figure
Handle

Definition at line 18 of file AbstractHandle.java.


Constructor & Destructor Documentation

Initializes the owner of the figure.

Definition at line 29 of file AbstractHandle.java.

                                        {
        fOwner = owner;
    }

Here is the call graph for this function:


Member Function Documentation

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

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:

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.AbstractHandle.draw ( Graphics  g) [inline]

Draws this handle.

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

Definition at line 131 of file AbstractHandle.java.

                                 {
        Rectangle r = displayBox();

        g.setColor(Color.white);
        g.fillRect(r.x, r.y, r.width, r.height);

        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]

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]
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]

@ 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]

@ 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]

@ 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]

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:

abstract Point CH.ifa.draw.standard.AbstractHandle.locate ( ) [pure virtual]

Locates the handle on the figure.

The handle is drawn centered around the returned point.

Implemented in CH.ifa.draw.standard.ChangeConnectionEndHandle, CH.ifa.draw.standard.ChangeConnectionStartHandle, and CH.ifa.draw.standard.LocatorHandle.

Here is the caller graph for this function:

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

Definition at line 24 of file AbstractHandle.java.

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: