Project

General

Profile

Download (1.96 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.gef;
12

    
13
/**
14
 * The listener interface for receiving Connection events from EditParts that
15
 * serve as connection nodes.
16
 */
17
public interface NodeListener {
18

    
19
	/**
20
	 * Called prior to removing the connection from its source node. The source
21
	 * is not passed, but can still be obtained at this point by calling
22
	 * {@link ConnectionEditPart#getSource connection.getSource()}
23
	 * 
24
	 * @param connection
25
	 *            the connection
26
	 * @param index
27
	 *            the index
28
	 */
29
	void removingSourceConnection(ConnectionEditPart connection, int index);
30

    
31
	/**
32
	 * Called prior to removing the connection from its target node. The target
33
	 * is not passed, but can still be obtained at this point by calling
34
	 * {@link ConnectionEditPart#getTarget connection.getTarget()}
35
	 * 
36
	 * @param connection
37
	 *            the connection
38
	 * @param index
39
	 *            the index
40
	 */
41
	void removingTargetConnection(ConnectionEditPart connection, int index);
42

    
43
	/**
44
	 * Called after the connection has been added to its source node.
45
	 * 
46
	 * @param connection
47
	 *            the connection
48
	 * @param index
49
	 *            the index
50
	 */
51
	void sourceConnectionAdded(ConnectionEditPart connection, int index);
52

    
53
	/**
54
	 * Called after the connection has been added to its target node.
55
	 * 
56
	 * @param connection
57
	 *            the connection
58
	 * @param index
59
	 *            the index
60
	 */
61
	void targetConnectionAdded(ConnectionEditPart connection, int index);
62

    
63
}
(30-30/44)