Back to index

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

BorderDecorator decorates an arbitrary Figure with a border. More...

List of all members.

Public Member Functions

 BorderDecorator ()
 BorderDecorator (Figure figure)
void draw (Graphics g, boolean showGuides)
 Draws a the figure and decorates it with a border.
Rectangle displayBox ()
 Gets the displaybox including the border.
void figureInvalidated (FigureChangeEvent e)
 Invalidates the figure extended by its border.
Insets connectionInsets ()

Private Member Functions

Point border ()

Private Attributes

int borderDecoratorSerializedDataVersion = 1

Static Private Attributes

static final long serialVersionUID = 1205601808259084917L

Detailed Description

BorderDecorator decorates an arbitrary Figure with a border.

Definition at line 18 of file BorderDecorator.java.


Constructor & Destructor Documentation

Definition at line 26 of file BorderDecorator.java.

{ }

Definition at line 27 of file BorderDecorator.java.

                                          {
        super(figure);
    }

Member Function Documentation

Point CH.ifa.draw.figures.BorderDecorator.border ( ) [inline, private]

Definition at line 31 of file BorderDecorator.java.

                           {
        return new Point(3,3);
    }

Here is the caller graph for this function:

Definition at line 67 of file BorderDecorator.java.

                                     {
        Insets i = super.connectionInsets();
        i.top -= 3;
        i.bottom -= 3;
        i.left -= 3;
        i.right -= 3;
        return i;
    }

Gets the displaybox including the border.

Definition at line 52 of file BorderDecorator.java.

                                  {
        Rectangle r = fComponent.displayBox();
        r.grow(border().x, border().y);
        return r;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void CH.ifa.draw.figures.BorderDecorator.draw ( Graphics  g,
boolean  showGuides 
) [inline]

Draws a the figure and decorates it with a border.

Definition at line 38 of file BorderDecorator.java.

                                                     {
        Rectangle r = displayBox();
        super.draw(g, showGuides);
        g.setColor(Color.white);
        g.drawLine(r.x, r.y, r.x, r.y + r.height);
        g.drawLine(r.x, r.y, r.x + r.width, r.y);
        g.setColor(Color.gray);
        g.drawLine(r.x + r.width, r.y, r.x + r.width, r.y + r.height);
        g.drawLine(r.x , r.y + r.height, r.x + r.width, r.y + r.height);
    }

Here is the call graph for this function:

void CH.ifa.draw.figures.BorderDecorator.figureInvalidated ( FigureChangeEvent  e) [inline]

Invalidates the figure extended by its border.

Definition at line 61 of file BorderDecorator.java.

                                                       {
        Rectangle rect = e.getInvalidatedRectangle();
        rect.grow(border().x, border().y);
        super.figureInvalidated(new FigureChangeEvent(e.getFigure(), rect));
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 24 of file BorderDecorator.java.

final long CH.ifa.draw.figures.BorderDecorator.serialVersionUID = 1205601808259084917L [static, private]

Definition at line 23 of file BorderDecorator.java.


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