Mercurial > projects > dwt-addons
comparison dwtx/jface/viewers/IDecoration.d @ 10:b6c35faf97c8
Viewers
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 31 Mar 2008 00:47:19 +0200 |
parents | |
children | 46a6e0e6ccd4 |
comparison
equal
deleted
inserted
replaced
9:6c14e54dfc11 | 10:b6c35faf97c8 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2006 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.jface.viewers.IDecoration; | |
14 | |
15 import dwtx.jface.viewers.IDecorationContext; | |
16 | |
17 import dwt.graphics.Color; | |
18 import dwt.graphics.Font; | |
19 import dwtx.jface.resource.ImageDescriptor; | |
20 | |
21 import dwt.dwthelper.utils; | |
22 | |
23 /** | |
24 * Defines the result of decorating an element. | |
25 * | |
26 * This interface is not meant to be implemented and will be provided to | |
27 * instances of <code>ILightweightLabelDecorator</code>. | |
28 */ | |
29 public interface IDecoration{ | |
30 | |
31 /** | |
32 * Constants for placement of image decorations. | |
33 */ | |
34 public static const int TOP_LEFT = 0; | |
35 | |
36 /** | |
37 * Constant for the top right quadrant. | |
38 */ | |
39 public static const int TOP_RIGHT = 1; | |
40 | |
41 /** | |
42 * Constant for the bottom left quadrant. | |
43 */ | |
44 public static const int BOTTOM_LEFT = 2; | |
45 | |
46 /** | |
47 * Constant for the bottom right quadrant. | |
48 */ | |
49 public static const int BOTTOM_RIGHT = 3; | |
50 | |
51 /** | |
52 * Constant for the underlay. | |
53 */ | |
54 public static const int UNDERLAY = 4; | |
55 | |
56 /** | |
57 * Adds a prefix to the element's label. | |
58 * | |
59 * @param prefix | |
60 * the prefix | |
61 */ | |
62 public void addPrefix(String prefix); | |
63 | |
64 /** | |
65 * Adds a suffix to the element's label. | |
66 * | |
67 * @param suffix | |
68 * the suffix | |
69 */ | |
70 public void addSuffix(String suffix); | |
71 | |
72 /** | |
73 * Adds an overlay to the element's image. | |
74 * | |
75 * @param overlay | |
76 * the overlay image descriptor | |
77 */ | |
78 public void addOverlay(ImageDescriptor overlay); | |
79 | |
80 /** | |
81 * Adds an overlay to the element's image. | |
82 * | |
83 * @param overlay | |
84 * the overlay image descriptor | |
85 * @param quadrant | |
86 * The constant for the quadrant to draw the image on. | |
87 */ | |
88 public void addOverlay(ImageDescriptor overlay, int quadrant); | |
89 | |
90 /** | |
91 * Set the foreground color for this decoration. | |
92 * @param color the color to be set for the foreground | |
93 * | |
94 * @since 3.1 | |
95 */ | |
96 public void setForegroundColor(Color color); | |
97 | |
98 /** | |
99 * Set the background color for this decoration. | |
100 * @param color the color to be set for the background | |
101 * | |
102 * @since 3.1 | |
103 */ | |
104 public void setBackgroundColor(Color color); | |
105 | |
106 /** | |
107 * Set the font for this decoration. | |
108 * @param font the font to use in this decoration | |
109 * | |
110 * @since 3.1 | |
111 */ | |
112 public void setFont(Font font); | |
113 | |
114 /** | |
115 * Return the decoration context in which this decoration | |
116 * will be applied. | |
117 * @return the decoration context | |
118 * | |
119 * @since 3.2 | |
120 */ | |
121 public IDecorationContext getDecorationContext(); | |
122 } |