Project

General

Profile

Download (2.9 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.draw2d;
12

    
13
import org.eclipse.draw2d.geometry.PointList;
14

    
15
/**
16
 * A Connection is a figure that connects two objects.
17
 */
18
public interface Connection extends IFigure {
19

    
20
	/**
21
	 * The connection router property. Used to signify that the ConnectionRouter
22
	 * has changed.
23
	 */
24
	String PROPERTY_CONNECTION_ROUTER = "connectionRouter"; //$NON-NLS-1$
25
	/**
26
	 * The points property. Used to signify the points in the Connection have
27
	 * changed.
28
	 */
29
	String PROPERTY_POINTS = "points"; //$NON-NLS-1$
30

    
31
	/**
32
	 * Returns the ConnectionRouter used to route this Connection. Does not
33
	 * return null.
34
	 * 
35
	 * @return The ConnectionRouter for this Connection
36
	 */
37
	ConnectionRouter getConnectionRouter();
38

    
39
	/**
40
	 * Sets the ConnectionRouter for this Connection.
41
	 * 
42
	 * @param router
43
	 *            The ConnectionRouter to set for this Connection
44
	 */
45
	void setConnectionRouter(ConnectionRouter router);
46

    
47
	/**
48
	 * Returns the ConnectionAnchor at the <b>source</b> end of this Connection.
49
	 * 
50
	 * @return The ConnectionAnchor at the <b>source</b> end of this Connection
51
	 */
52
	ConnectionAnchor getSourceAnchor();
53

    
54
	/**
55
	 * Returns the ConnectionAnchor at the <b>target</b> end of this Connection.
56
	 * 
57
	 * @return The ConnectionAnchor at the <b>target</b> end of this Connection
58
	 */
59
	ConnectionAnchor getTargetAnchor();
60

    
61
	/**
62
	 * Returns the routing constraint. May be <code>null</code>.
63
	 * 
64
	 * @return The routing constraint
65
	 */
66
	Object getRoutingConstraint();
67

    
68
	/**
69
	 * Sets the routing constraint used by the router.
70
	 * 
71
	 * @param cons
72
	 *            The routing constraint
73
	 */
74
	void setRoutingConstraint(Object cons);
75

    
76
	/**
77
	 * Sets the ConnectionAnchor to be used at the <i>source</i> end of this
78
	 * Connection.
79
	 * 
80
	 * @param anchor
81
	 *            The source anchor
82
	 */
83
	void setSourceAnchor(ConnectionAnchor anchor);
84

    
85
	/**
86
	 * Sets the ConnectionAnchor to be used at the <i>target</i> end of this
87
	 * Connection.
88
	 * 
89
	 * @param anchor
90
	 *            The target anchor
91
	 */
92
	void setTargetAnchor(ConnectionAnchor anchor);
93

    
94
	/**
95
	 * Returns the PointList containing the Points that make up this Connection.
96
	 * This may be returned by reference.
97
	 * 
98
	 * @return The points for this Connection
99
	 */
100
	PointList getPoints();
101

    
102
	/**
103
	 * Sets the PointList containing the Points that make up this Connection.
104
	 * 
105
	 * @param list
106
	 *            The points for this Connection
107
	 */
108
	void setPoints(PointList list);
109

    
110
}
(42-42/171)