All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.standard.SlotLocator

CH.ifa.draw.standard.AbstractLocator
   |
   +----CH.ifa.draw.standard.SegmentLocator
           |
           +----CH.ifa.draw.standard.SlotLocator

public class SlotLocator
extends SegmentLocator
Basic implementation of a locator for locations at start-left, start-right, middle-left, middle-right, end-left, and end-right of a line segment. The class provides factory methods for creating instances of LabelSlotLocators that perform the computations for each logical position.


Variable Index

 o fSlot

Constructor Index

 o SlotLocator(LabelledConnection, Figure)
Deprecated.
 o SlotLocator(LabelledConnection, Figure, int)
Deprecated.
 o SlotLocator(LabelledConnection, Figure, int, LabelSlotLocator)
Use this to create the locator.

Method Index

 o findLocation(Point, Point)
Find the location.
 o getBeginSlotLocator(LabelledConnection, Figure, boolean)
A Factory method to create a locator for the start of a segment.
 o getCenterSlotLocator(LabelledConnection, Figure, boolean)
A Factory method to create a locator for the center of a segment.
 o getEndSlotLocator(LabelledConnection, Figure, boolean)
A Factory method to create a locator for the end of a segment.
 o getLabelSlot(LabelledConnection, int, Figure)
Deprecated.
 o setSegment(int)
Set the segment of this.
 o updateSegment(PolyLineFigure)
N/A - do nothing.

Variables

 o fSlot
 protected LabelSlotLocator fSlot

Constructors

 o SlotLocator
 public SlotLocator(LabelledConnection conn,
                    Figure attachment)
Note: SlotLocator() is deprecated.

 o SlotLocator
 public SlotLocator(LabelledConnection conn,
                    Figure attachment,
                    int segment)
Note: SlotLocator() is deprecated.

 o SlotLocator
 public SlotLocator(LabelledConnection conn,
                    Figure attachment,
                    int segment,
                    LabelSlotLocator slotLocator)
Use this to create the locator.

Methods

 o updateSegment
 protected void updateSegment(PolyLineFigure pLine)
N/A - do nothing.

Overrides:
updateSegment in class SegmentLocator
 o setSegment
 public void setSegment(int segment)
Set the segment of this.

 o findLocation
 protected Point findLocation(Point p1,
                              Point p2)
Find the location. Find first a point on the line segment and then the displacement for the centroid of the located figure.

Overrides:
findLocation in class SegmentLocator
 o getLabelSlot
 protected LabelSlotLocator getLabelSlot(LabelledConnection conn,
                                         int segment,
                                         Figure attachment)
Note: getLabelSlot() is deprecated.

 o getCenterSlotLocator
 public static LabelSlotLocator getCenterSlotLocator(LabelledConnection connection,
                                                     Figure label,
                                                     boolean above)
A Factory method to create a locator for the center of a segment.

 o getBeginSlotLocator
 public static LabelSlotLocator getBeginSlotLocator(LabelledConnection connection,
                                                    Figure label,
                                                    boolean above)
A Factory method to create a locator for the start of a segment.

 o getEndSlotLocator
 public static LabelSlotLocator getEndSlotLocator(LabelledConnection connection,
                                                  Figure label,
                                                  boolean above)
A Factory method to create a locator for the end of a segment.


All Packages  Class Hierarchy  This Package  Previous  Next  Index