Back to index

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

A locator that specfies a point that is relative to the bounds of a figure. More...

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

List of all members.

Public Member Functions

 RelativeLocator ()
 RelativeLocator (double relativeX, double relativeY)
Point locate (Figure owner)
void write (StorableOutput dw)
 Stores the arrow tip to a StorableOutput.
void read (StorableInput dr) throws IOException
 Reads the arrow tip from a StorableInput.
Object clone ()
String getMap ()

Static Public Member Functions

static Locator east ()
static Locator north ()
 North.
static Locator west ()
 West.
static Locator northEast ()
 North east.
static Locator northWest ()
 North west.
static Locator south ()
 South.
static Locator southEast ()
 South east.
static Locator southWest ()
 South west.
static Locator center ()
 Center.

Package Attributes

double fRelativeX
double fRelativeY

Private Attributes

int relativeLocatorSerializedDataVersion = 1

Static Private Attributes

static final long serialVersionUID = 2619148876087898602L

Detailed Description

A locator that specfies a point that is relative to the bounds of a figure.

See also:
Locator

Definition at line 18 of file RelativeLocator.java.


Constructor & Destructor Documentation

Definition at line 28 of file RelativeLocator.java.

                             {
        fRelativeX = 0.0;
        fRelativeY = 0.0;
    }

Here is the caller graph for this function:

CH.ifa.draw.standard.RelativeLocator.RelativeLocator ( double  relativeX,
double  relativeY 
) [inline]

Definition at line 33 of file RelativeLocator.java.

                                                               {
        fRelativeX = relativeX;
        fRelativeY = relativeY;
    }

Member Function Documentation

static Locator CH.ifa.draw.standard.RelativeLocator.center ( ) [inline, static]

Center.

Definition at line 114 of file RelativeLocator.java.

                                   {
        return new RelativeLocator(0.5, 0.5);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Object CH.ifa.draw.standard.AbstractLocator.clone ( ) [inline, inherited]

Definition at line 29 of file AbstractLocator.java.

                          {
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
               throw new InternalError();
        }
    }
static Locator CH.ifa.draw.standard.RelativeLocator.east ( ) [inline, static]

Definition at line 58 of file RelativeLocator.java.

                                 {
        return new RelativeLocator(1.0, 0.5);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String CH.ifa.draw.standard.AbstractLocator.getMap ( ) [inline, inherited]

Definition at line 43 of file AbstractLocator.java.

                           {
       return "";
    }
Point CH.ifa.draw.standard.RelativeLocator.locate ( Figure  owner) [inline]

Definition at line 38 of file RelativeLocator.java.

                                      {
        Rectangle r = owner.displayBox();
        return new Point(
            r.x + (int)(r.width*fRelativeX),
            r.y + (int)(r.height*fRelativeY)
        );
    }
static Locator CH.ifa.draw.standard.RelativeLocator.north ( ) [inline, static]

North.

Definition at line 65 of file RelativeLocator.java.

                                  {
        return new RelativeLocator(0.5, 0.0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static Locator CH.ifa.draw.standard.RelativeLocator.northEast ( ) [inline, static]

North east.

Definition at line 79 of file RelativeLocator.java.

                                      {
        return new RelativeLocator(1.0, 0.0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static Locator CH.ifa.draw.standard.RelativeLocator.northWest ( ) [inline, static]

North west.

Definition at line 86 of file RelativeLocator.java.

                                      {
        return new RelativeLocator(0.0, 0.0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void CH.ifa.draw.standard.RelativeLocator.read ( StorableInput  dr) throws IOException [inline]

Reads the arrow tip from a StorableInput.

Reimplemented from CH.ifa.draw.standard.AbstractLocator.

Definition at line 52 of file RelativeLocator.java.

                                                          {
        super.read(dr);
        fRelativeX = dr.readDouble();
        fRelativeY = dr.readDouble();
    }

Here is the caller graph for this function:

static Locator CH.ifa.draw.standard.RelativeLocator.south ( ) [inline, static]

South.

Definition at line 93 of file RelativeLocator.java.

                                  {
        return new RelativeLocator(0.5, 1.0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static Locator CH.ifa.draw.standard.RelativeLocator.southEast ( ) [inline, static]

South east.

Definition at line 100 of file RelativeLocator.java.

                                      {
        return new RelativeLocator(1.0, 1.0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static Locator CH.ifa.draw.standard.RelativeLocator.southWest ( ) [inline, static]

South west.

Definition at line 107 of file RelativeLocator.java.

                                      {
        return new RelativeLocator(0.0, 1.0);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static Locator CH.ifa.draw.standard.RelativeLocator.west ( ) [inline, static]

West.

Definition at line 72 of file RelativeLocator.java.

                                 {
        return new RelativeLocator(0.0, 0.5);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void CH.ifa.draw.standard.RelativeLocator.write ( StorableOutput  dw) [inline]

Stores the arrow tip to a StorableOutput.

Reimplemented from CH.ifa.draw.standard.AbstractLocator.

Definition at line 46 of file RelativeLocator.java.

                                         {
        super.write(dw);
        dw.writeDouble(fRelativeX);
        dw.writeDouble(fRelativeY);
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 25 of file RelativeLocator.java.

Definition at line 26 of file RelativeLocator.java.

Definition at line 23 of file RelativeLocator.java.

final long CH.ifa.draw.standard.RelativeLocator.serialVersionUID = 2619148876087898602L [static, private]

Definition at line 22 of file RelativeLocator.java.


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