ref #6190 removing svn property place holder in first line of code - java files
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / annotatedlineeditor / ILineDisplayStrategy.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.taxeditor.annotatedlineeditor;
11
12 import org.eclipse.swt.graphics.Font;
13 import org.eclipse.swt.graphics.Image;
14
15 /**
16 * Methods for translating between the object in a line and
17 * its display in the editor.
18 *
19 * @author p.ciardelli
20 * @created 07.07.2009
21 * @version 1.0
22 */
23 public interface ILineDisplayStrategy {
24
25 /** Constant <code>SUPPLEMENTAL_TEXT="supplemental_text"</code> */
26 public static final String SUPPLEMENTAL_TEXT = "supplemental_text";
27
28 /**
29 * <p>getIndent</p>
30 *
31 * @param entity a {@link java.lang.Object} object.
32 * @return a int.
33 */
34 int getIndent(Object entity);
35
36 /**
37 * <p>getIcon</p>
38 *
39 * @param entity a {@link java.lang.Object} object.
40 * @return a {@link org.eclipse.swt.graphics.Image} object.
41 */
42 Image getIcon(Object entity);
43
44 /**
45 * <p>getFont</p>
46 *
47 * @param entity a {@link java.lang.Object} object.
48 * @return a {@link org.eclipse.swt.graphics.Font} object.
49 */
50 Font getFont(Object entity);
51
52 /**
53 * For object's title cache output, mainly
54 *
55 * Note: if object's cache is empty, return "", not null
56 *
57 * @param entity a {@link java.lang.Object} object.
58 * @return a {@link java.lang.String} object.
59 */
60 String getText(Object entity);
61
62 /**
63 * For object's supplemental information such as type, markers, etc.,
64 * usually stored in " [...]".
65 *
66 * @param entity a {@link java.lang.Object} object.
67 * @return a {@link java.lang.String} object.
68 */
69 String getSupplementalText(Object entity);
70
71 /**
72 * <p>getEmptyCacheMessage</p>
73 *
74 * @param entity a {@link java.lang.Object} object.
75 * @return a {@link java.lang.String} object.
76 */
77 String getEmptyCacheMessage(Object entity);
78
79 /**
80 * <p>setText</p>
81 *
82 * @param text a {@link java.lang.String} object.
83 * @param entity a {@link java.lang.Object} object.
84 */
85 void setText(String text, Object entity);
86
87 /**
88 * <p>getHoverText</p>
89 *
90 * @param entity a {@link java.lang.Object} object.
91 * @return a {@link java.lang.String} object.
92 */
93 String getHoverText(Object entity);
94
95 /**
96 * <p>setStatusMessage</p>
97 *
98 * @param text a {@link java.lang.String} object.
99 * @param entity a {@link java.lang.Object} object.
100 */
101 void setStatusMessage(String text, Object entity);
102
103 /**
104 * <p>isEntityCacheEmpty</p>
105 *
106 * @param entity a {@link java.lang.Object} object.
107 * @return a boolean.
108 */
109 boolean isEntityCacheEmpty(Object entity);
110
111 /**
112 * <p>addDisplayListener</p>
113 *
114 * @param entity a {@link java.lang.Object} object.
115 * @param listener a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.EntityListener} object.
116 */
117 void addDisplayListener(Object entity, EntityListener listener);
118 }