1
|
/*******************************************************************************
|
2
|
* Copyright (c) 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
|
|
12
|
package org.eclipse.draw2d;
|
13
|
|
14
|
import org.eclipse.swt.graphics.Image;
|
15
|
|
16
|
/**
|
17
|
* Interface for image figures
|
18
|
*
|
19
|
* <P>
|
20
|
* WARNING: This interface is not intended to be implemented by clients. Extend
|
21
|
* {@link AbstractImageFigure} instead.
|
22
|
*
|
23
|
* @noimplement
|
24
|
* @since 3.6
|
25
|
*/
|
26
|
public interface IImageFigure extends IFigure {
|
27
|
|
28
|
/**
|
29
|
* Returns the SWT Image contained by the figure
|
30
|
*
|
31
|
* @return the Image contained by the figure
|
32
|
* @since 3.6
|
33
|
*/
|
34
|
public Image getImage();
|
35
|
|
36
|
/**
|
37
|
* Attaches <code>ImageChangedListener</code> to the figure
|
38
|
*
|
39
|
* @param listener
|
40
|
* @since 3.6
|
41
|
*/
|
42
|
public void addImageChangedListener(ImageChangedListener listener);
|
43
|
|
44
|
/**
|
45
|
* Detaches <code>ImageChangedListener</code> from the figure
|
46
|
*
|
47
|
* @param listener
|
48
|
* @since 3.6
|
49
|
*/
|
50
|
public void removeImageChangedListener(ImageChangedListener listener);
|
51
|
|
52
|
/**
|
53
|
* Listener to the image figure to track changes to the containede SWT Image
|
54
|
*
|
55
|
* @since 3.6
|
56
|
*/
|
57
|
public interface ImageChangedListener {
|
58
|
|
59
|
/**
|
60
|
* Notifies about a change to SWT Image contained by the
|
61
|
* <code>IIMageFigure</code>
|
62
|
*
|
63
|
* @since 3.6
|
64
|
*/
|
65
|
public void imageChanged();
|
66
|
|
67
|
}
|
68
|
|
69
|
}
|