Runtime

## org.eclipse.gmf.runtime.diagram.ui.providers
Class TopDownProvider

    java.lang.Object
      AbstractLayoutEditPartProvider
          org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider
              org.eclipse.gmf.runtime.diagram.ui.providers.TopDownProvider

    public class TopDownProvider

extends org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider

Field Summary

Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider
`layoutDefaultMargin, MAX_EDGE_PADDING, MIN_EDGE_END_POINTS_PADDING, MIN_EDGE_PADDING, minX, minY, mm, NODE_PADDING`

Constructor Summary
`TopDownProvider()`

Method Summary
`protected org.eclipse.gef.commands.Command` `createEdgesChangeBoundsCommands(DirectedGraph g, Point diff)`
`protected org.eclipse.gef.commands.Command` `createNodeChangeBoundCommands(DirectedGraph g, Point diff)`
`protected Rectangle` `getNodeMetrics(Node n)` getNodeMetrics Retrieves the node extend and position from the node object.
`org.eclipse.gef.commands.Command` `layoutEditParts(java.util.List selectedObjects, IAdaptable layoutHint)`
`protected void` `setLayoutDefaultMargin(int newMargin)`
`protected Rectangle` `translateFromGraph(Rectangle rect)` Retrieves the logical extent and position from the given rectangle.
`protected Rectangle` `translateToGraph(Rectangle r)` Retrieves the extent and position from the given logical rectangle in GEF graph coordinates.

Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider

`addAnchorsCommands, build_borderNodes, build_edges, build_graph, build_nodes, buildBorderNodes, buildEdges, buildGraph, buildNodes, canCreateBorderNode, createGraph, createGraphLayout, createSubCommands, getMapMode, getRelevantConnections, initializeEdge, layoutEditParts, layoutTopDown, postProcessGraph, provides, routeThrough, setNodeMetrics, shouldHandleConnectableListItems, supportsBorderNodes, update_diagram`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TopDownProvider

    public TopDownProvider()

Method Detail

### translateToGraph

    protected Rectangle translateToGraph(Rectangle r)

  Description copied from class: `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`
  Retrieves the extent and position from the given logical rectangle in GEF graph coordinates. Defined as abstract to allow subclasses to implement to perform a transformation on the values stored in the node. i.e. support for Left-Right layout as opposed to Top-Down.

  Specified by:
    `translateToGraph` in class `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`
  Returns:
    `Rectangle` in graph coordinates.

### translateFromGraph

    protected Rectangle translateFromGraph(Rectangle rect)

  Description copied from class: `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`
  Retrieves the logical extent and position from the given rectangle. Defined as abstract to allow subclasses to implement to perform a transformation on the values stored in the node. i.e. support for Left-Right layout as opposed to Top-Down.

  Specified by:
    `translateFromGraph` in class `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`
  Parameters:
    `rect` - `Rectangle` that has the values to be translated in graph (pixel) coordinates.
  Returns:
    `Rectangle` in logical coordinates.

### layoutEditParts

    public org.eclipse.gef.commands.Command layoutEditParts(java.util.List selectedObjects,
                                                            IAdaptable layoutHint)

  Overrides:
    `layoutEditParts` in class `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`

### createEdgesChangeBoundsCommands

    protected org.eclipse.gef.commands.Command createEdgesChangeBoundsCommands(DirectedGraph g,
                                                                               Point diff)

  Overrides:
    `createEdgesChangeBoundsCommands` in class `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`

### createNodeChangeBoundCommands

    protected org.eclipse.gef.commands.Command createNodeChangeBoundCommands(DirectedGraph g,
                                                                             Point diff)

  Overrides:
    `createNodeChangeBoundCommands` in class `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`

### getNodeMetrics

    protected Rectangle getNodeMetrics(Node n)

  Description copied from class: `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`
  getNodeMetrics Retrieves the node extend and position from the node object. Defined as abstract to allow subclasses to implement to perform a transformation on the values stored in the node. i.e. support for Left-Right layout as opposed to Top-Down.

  Overrides:
    `getNodeMetrics` in class `org.eclipse.gmf.runtime.diagram.ui.providers.internal.DefaultProvider`
  Parameters:
    `n` - Node that has the metrics values to be retrieved.
  Returns:
    Rectangle that represents the location and extend of the Node.

### setLayoutDefaultMargin

    protected void setLayoutDefaultMargin(int newMargin)

Runtime

Guidelines for using Eclipse APIs.

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