de.cau.cs.kieler.core.model.gmf.figures.layout
Class LabelLocator

java.lang.Object
  extended by org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator
      extended by de.cau.cs.kieler.core.model.gmf.figures.layout.LabelLocator
All Implemented Interfaces:
Locator, IBorderItemLocator

public class LabelLocator
extends org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator

A border item locator for entity and port labels.

Rating red

Constructor Summary
LabelLocator(IFigure parent, int side)
          Creates a label locator.
 
Method Summary
 Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem)
          
 void relocate(IFigure borderItem)
          
 void setPortBehavior(boolean theportBehavior)
          Sets whether the locator should handle the parents as ports.
 
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator
calculateNextNonConflictingPosition, findClosestSideOfParent, getAbsoluteToBorder, getBorderItemOffset, getConflictingBorderItemFigure, getConstraint, getCurrentSideOfParent, getParentBorder, getParentFigure, getPreferredLocation, getPreferredLocation, getPreferredSideOfParent, getSize, locateOnBorder, locateOnParent, setBorderItemOffset, setConstraint, setCurrentSideOfParent, setPreferredSideOfParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelLocator

public LabelLocator(IFigure parent,
                    int side)
Creates a label locator.

Parameters:
parent - the parent figure
side - the side
Method Detail

setPortBehavior

public void setPortBehavior(boolean theportBehavior)
Sets whether the locator should handle the parents as ports.

Parameters:
theportBehavior - the port behavior status

relocate

public void relocate(IFigure borderItem)

Specified by:
relocate in interface Locator
Overrides:
relocate in class org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator

getValidLocation

public Rectangle getValidLocation(Rectangle proposedLocation,
                                  IFigure borderItem)

Specified by:
getValidLocation in interface IBorderItemLocator
Overrides:
getValidLocation in class org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator