Back to index

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

A Handle to manipulate the radius of a round corner rectangle. More...

Collaboration diagram for CH.ifa.draw.figures.RadiusHandle:
Collaboration graph

List of all members.

Public Member Functions

 RadiusHandle (RoundRectangleFigure owner)
void invokeStart (int x, int y, DrawingView view)
void invokeStep (int x, int y, int anchorX, int anchorY, DrawingView view)
Point locate ()
void draw (Graphics g)

Private Attributes

Point fRadius
RoundRectangleFigure fOwner

Static Private Attributes

static final int OFFSET = 4

Detailed Description

A Handle to manipulate the radius of a round corner rectangle.

Definition at line 16 of file

Constructor & Destructor Documentation

Definition at line 22 of file

        fOwner = owner;

Member Function Documentation

void CH.ifa.draw.figures.RadiusHandle.draw ( Graphics  g) [inline]

Definition at line 48 of file

        Rectangle r = displayBox();

        g.fillOval(r.x, r.y, r.width, r.height);

        g.drawOval(r.x, r.y, r.width, r.height);
void CH.ifa.draw.figures.RadiusHandle.invokeStart ( int  x,
int  y,
DrawingView  view 
) [inline]

Definition at line 27 of file

        fRadius = fOwner.getArc();
        fRadius.x = fRadius.x/2;
        fRadius.y = fRadius.y/2;

Here is the call graph for this function:

void CH.ifa.draw.figures.RadiusHandle.invokeStep ( int  x,
int  y,
int  anchorX,
int  anchorY,
DrawingView  view 
) [inline]

Definition at line 33 of file

        int dx = x-anchorX;
        int dy = y-anchorY;
        Rectangle r = fOwner.displayBox();
        int rx = Geom.range(0, r.width, 2*(fRadius.x + dx));
        int ry = Geom.range(0, r.height, 2*(fRadius.y + dy));
        fOwner.setArc(rx, ry);

Here is the call graph for this function:

Definition at line 42 of file

        Point radius = fOwner.getArc();
        Rectangle r = fOwner.displayBox();
        return new Point(r.x+radius.x/2+OFFSET, r.y+radius.y/2+OFFSET);

Here is the call graph for this function:

Member Data Documentation

Definition at line 19 of file

Definition at line 18 of file

final int CH.ifa.draw.figures.RadiusHandle.OFFSET = 4 [static, private]

Definition at line 20 of file

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