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

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 RadiusHandle.java.


Constructor & Destructor Documentation

Definition at line 22 of file RadiusHandle.java.

                                                    {
        super(owner);
        fOwner = owner;
    }

Member Function Documentation

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

Definition at line 48 of file RadiusHandle.java.

                                 {
        Rectangle r = displayBox();

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

        g.setColor(Color.black);
        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 RadiusHandle.java.

                                                              {
        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 RadiusHandle.java.

                                                                                      {
        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 RadiusHandle.java.

                          {
        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 RadiusHandle.java.

Definition at line 18 of file RadiusHandle.java.

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

Definition at line 20 of file RadiusHandle.java.


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