blob: 1a23306e7a58101330cc7fbae6ca12ff7bdc95a7 [file] [log] [blame]
/*******************************************************************************
* <copyright>
*
* Copyright (c) 2013, 2013 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* SAP AG - initial API, implementation and documentation
*
* </copyright>
*
*******************************************************************************/
package org.eclipse.fmc.blockdiagram.editor.algorithm.node;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Shape;
/**
* This is the interface for all nodes with anchors.
*
* @author Heiko Witteborg
*
*/
public interface AnchoredNode extends GraphicsNode {
public static final int DEFAULT_ANCHOR_GAP = 8; // 20;
public static final int DEFAULT_ANCHOR_DIAMETER = 8;
/**
*
* @param container
* @param visible
*/
public void setBoxAnchorsVisible(Shape shape, boolean visible);
/**
*
* @param shape
* @return
*/
public boolean isBoxAnchorsVisible(Shape shape);
/**
*
* @param shape
* @return
*/
public boolean hasUnusedAnchors(Shape shape);
/**
* Resizes the anchor set of the container according to the given
* parameters.
*
* @param container
* @param x
* @param y
* @param width
* @param height
*/
public void resizeBoxAnchorSet(ContainerShape container, int x, int y,
int width, int height);
/**
* Creates an anchor set for the shape.
*
* @param shape
*/
public void createBoxAnchorSet(Shape shape);
/**
* Removes the anchor set for the shape. Only removes anchors which have no
* connection lines.
*
* @param shape
*/
public void removeUnusedBoxAnchors(Shape shape);
}