Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.draw2d.ui.figures
Interface IBorderItemLocator

All Superinterfaces:
Locator

public interface IBorderItemLocator
extends Locator

Controls the location of border items around another figure. An IBorderItemLocator is used in conjunction with org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy for feedback when moving border items and with org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart when refreshing the bounds of the border item figure.


Method Summary
 int getCurrentSideOfParent ()
          Returns the side of the parent figure on which the border item is currently on.
  Rectangle getValidLocation ( Rectangle proposedLocation, IFigure borderItem)
          Returns a suitable location for the border item given a proposed location.
 void setConstraint ( Rectangle constraint)
          Sets the constraint for the location of this border item.
 
Methods inherited from interface org.eclipse.draw2d. Locator
relocate
 

Method Detail

setConstraint

void setConstraint(
Rectangle constraint)
Sets the constraint for the location of this border item.

Parameters:
constraint - the position and optionally size

getValidLocation


Rectangle getValidLocation(
Rectangle proposedLocation,
                           
IFigure borderItem)
Returns a suitable location for the border item given a proposed location. By implementing this method, the feedback shown when the user moves a border item can reflect where the locator will actually place the border item.

For example, if the border item is restricted to being on the border of its parent shape, when the user attempts to move the border item outside the border of the parent shape (the proposed location), the feedback will always show the border item on the border. In this case, this method would return a location on the border close to the proposed location.

Parameters:
proposedLocation - a proposed location and optionally size
borderItem - the border item in question
Returns:
a rectangle containing the valid location

getCurrentSideOfParent

int getCurrentSideOfParent()
Returns the side of the parent figure on which the border item is currently on.

Returns:
the side on which this border item appears as defined in PositionConstants

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire