Back to index

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

A Handle to change the font size by direct manipulation. More...

Inheritance diagram for CH.ifa.draw.figures.FontSizeHandle:
Inheritance graph
[legend]
Collaboration diagram for CH.ifa.draw.figures.FontSizeHandle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FontSizeHandle (Figure owner, Locator l)
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 x, int y, int anchorX, int anchorY, DrawingView view)
 Tracks a step of the interaction.
void draw (Graphics g)
 Draws this handle.
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 invokeStep (int dx, int dy, Drawing drawing)
 @ deprecated As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView)
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.

Private Attributes

Font fFont
int fSize

Detailed Description

A Handle to change the font size by direct manipulation.

Definition at line 15 of file FontSizeHandle.java.


Constructor & Destructor Documentation

CH.ifa.draw.figures.FontSizeHandle.FontSizeHandle ( Figure  owner,
Locator  l 
) [inline]

Definition at line 20 of file FontSizeHandle.java.

                                                   {
        super(owner, l);
    }

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

Draws this handle.

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

Definition at line 36 of file FontSizeHandle.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);
    }

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.figures.FontSizeHandle.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 from CH.ifa.draw.standard.AbstractHandle.

Definition at line 24 of file FontSizeHandle.java.

                                                              {
        TextFigure textOwner = (TextFigure) owner();
        fFont = textOwner.getFont();
        fSize = fFont.getSize();
    }

Here is the call graph for this function:

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.figures.FontSizeHandle.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 from CH.ifa.draw.standard.AbstractHandle.

Definition at line 30 of file FontSizeHandle.java.

                                                                                      {
        TextFigure textOwner = (TextFigure) owner();
        int newSize = fSize + y-anchorY;
        textOwner.setFont(new Font(fFont.getName(), fFont.getStyle(), newSize) );
    }

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:

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

Definition at line 17 of file FontSizeHandle.java.

Definition at line 18 of file FontSizeHandle.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: