Runtime

org.eclipse.gmf.runtime.diagram.ui.services.layout
Class AbstractLayoutEditPartProvider

java.lang.Object
  extended byorg.eclipse.gmf.runtime.common.core.service.AbstractProvider
      extended byorg.eclipse.gmf.runtime.diagram.ui.services.layout.AbstractLayoutNodeProvider
          extended byorg.eclipse.gmf.runtime.diagram.ui.services.layout.AbstractLayoutEditPartProvider
All Implemented Interfaces:
ILayoutNodeProvider, IProvider
Direct Known Subclasses:
org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider

public abstract class AbstractLayoutEditPartProvider
extends AbstractLayoutNodeProvider


Constructor Summary
AbstractLayoutEditPartProvider()
           
 
Method Summary
abstract  Command layoutEditParts(GraphicalEditPart containerEditPart, IAdaptable layoutHint)
          Layout the objects in this container using the specified layout type.
abstract  Command layoutEditParts(java.util.List selectedObjects, IAdaptable layoutHint)
          Layout this list of selected objects, using the specified layout hint.
 java.lang.Runnable layoutLayoutNodes(java.util.List layoutNodes, boolean offsetFromBoundingBox, IAdaptable layoutHint)
          Layout this map of nodes, using the specified layout hint.
 
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.services.layout.AbstractLayoutNodeProvider
getContainer, getNodeToSizeMap
 
Methods inherited from class org.eclipse.gmf.runtime.common.core.service.AbstractProvider
addProviderChangeListener, fireProviderChange, removeProviderChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider
addProviderChangeListener, provides, removeProviderChangeListener
 

Constructor Detail

AbstractLayoutEditPartProvider

public AbstractLayoutEditPartProvider()
Method Detail

layoutLayoutNodes

public java.lang.Runnable layoutLayoutNodes(java.util.List layoutNodes,
                                            boolean offsetFromBoundingBox,
                                            IAdaptable layoutHint)
Description copied from interface: ILayoutNodeProvider
Layout this map of nodes, using the specified layout hint.

Parameters:
layoutNodes - List of ILayoutNode objects that are to participate in the layout.
offsetFromBoundingBox - boolean indicating whether the Nodes should be laid out relative to the bounding box of the Nodes in the nodesToSizes Map.
layoutHint - IAdaptable hint to the provider to determine the layout kind. IAdaptable will typically adapt to string that can be one of LayoutType.DEFAULT or LayoutType.RADIAL.
Returns:
Runnable that contains the layout changes to be executed.

layoutEditParts

public abstract Command layoutEditParts(GraphicalEditPart containerEditPart,
                                        IAdaptable layoutHint)
Layout the objects in this container using the specified layout type.

Parameters:
containerEditPart - GraphicalEditPart that is the container for the layout operation.
layoutHint - IAdaptable hint to the provider to determine the layout kind.
Returns:
Command that when executed will layout the edit parts in the container

layoutEditParts

public abstract Command layoutEditParts(java.util.List selectedObjects,
                                        IAdaptable layoutHint)
Layout this list of selected objects, using the specified layout hint. The selected objects all reside within the same parent container. Other elements that are part of the container but not specified in the list of objects, are ignored.

Parameters:
selectedObjects - List of EditPart objects that are to be layed out.
layoutHint - IAdaptable hint to the provider to determine the layout kind.
Returns:
Command that when executed will layout the edit parts in the container

Runtime

Guidelines for using Eclipse APIs.

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