Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e2d114c131b630cb0378a551340a539ddf56d3ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*****************************************************************************
 * Copyright (c) 2011 CEA LIST.
 *
 *    
 * 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:
 *	Amine EL KOUHEN (CEA LIST/LIFL) - Amine.Elkouhen@cea.fr
 *  Ansgar Radermacher (CEA LIST) - ansgar.radermacher@cea.fr
 * 
 *****************************************************************************/
package org.eclipse.papyrus.infra.services.decoration.util;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.services.decoration.util.Decoration.PreferedPosition;


/**
 * The Interface IPapyrusDecoration use to capture decoration icons (big/small), their position and the
 * associated message.
 * We explicitly prefix the interface with IPapyrus to avoid confusion with the IDecoration
 * interface in JFace.
 */
public interface IPapyrusDecoration {

	/**
	 * Sets the message.
	 * 
	 * @param message
	 *        the new message
	 */
	void setMessage(String message);

	/**
	 * Gets the message.
	 * 
	 * @return the message
	 */
	String getMessage();

	/**
	 * @return the type (corresponding to marker type)
	 */
	public String getType();

	/**
	 * Sets the decoration image for a graphical editor.
	 * 
	 * @param imageDescriptor
	 *        the new decoration image
	 */
	void setDecorationImageForGE(ImageDescriptor imageDescriptor);

	/**
	 * Gets the decoration image for a graphical editor
	 * 
	 * @return the decoration image
	 */
	ImageDescriptor getDecorationImageForGE();

	/**
	 * Sets the decoration image for the model explorer.
	 * 
	 * @param imageDescriptor
	 *        the new decoration image
	 */
	void setDecorationImageForME(ImageDescriptor imageDescriptor);

	/**
	 * Gets the decoration image for the model explorer
	 * 
	 * @return the decoration image
	 */
	ImageDescriptor getDecorationImageForME();


	/**
	 * Sets the position.
	 * 
	 * @param position
	 *        the new position
	 */
	void setPosition(PreferedPosition position);

	/**
	 * Gets the position.
	 * 
	 * @return the position
	 */
	PreferedPosition getPosition();

	/**
	 * @return the decoration position as enumerated by constants in IDecoration from JFace
	 *         (TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, UNDERLAY
	 */
	int getPositionForJFace();

}

Back to the top