1 /*
2 * Copyright (c) 2003-2008 by Cosylab d. d.
3 *
4 * This file is part of CosyBeans.
5 *
6 * CosyBeans is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * CosyBeans is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with CosyBeans. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package com.cosylab.gui.displayers;
21
22 import com.cosylab.gui.components.util.PopupManageable;
23
24
25 /**
26 * <code>CommonDisplayer</code> defines interface common to multiple and single
27 * displayers. Displayer interface controls GUI component, which displays
28 * single or multiple data sources on screen.
29 *
30 * @author <a href="mailto:igor.kriznar@cosylab.com">Igor Kriznar</a>
31 * @version $Id: CommonDisplayer.java,v 1.10 2008-04-22 12:31:02 jbobnar Exp $
32 *
33 * @since Nov 24, 2003.
34 */
35 public interface CommonDisplayer extends PopupManageable, DataStateProvider
36 {
37
38 /** Property name for min step */
39 /**
40 * Characteristic name for prefered color. With this characteristic gives
41 * data source a hint to Displayer which color should be used to visualize
42 * the source and distingish it from other sources, if they exist.
43 */
44 public static final String C_COLOR = "color";
45 public static final String C_MIN_STEP="minStep";
46 public static final String C_MINIMUM="minimum";
47 public static final String C_MAXIMUM="maximum";
48 public static final String C_FORMAT="format";
49 public static final String C_UNITS="units";
50 public static final String C_DISPLAY_NAME="displayName";
51 public static final String C_BIT_DESCRIPTIONS="bitDescriptions";
52 public static final String C_BIT_MASK="bitMask";
53 public static final String C_CONDITION_WHEN_CLEARED="conditionWhenCleared";
54 public static final String C_CONDITION_WHEN_SET="conditionWhenSet";
55 public static final String C_GRAPH_MAX="graphMax";
56 public static final String C_GRAPH_MIN="graphMin";
57 public static final String C_DESCRIPTION="description";
58 public static final String C_PROPERTY_TYPE="propertyType";
59 public static final String C_POSITION="position";
60 public static final String C_SEQUENCE_LENGTH = "sequenceLength";
61
62 /**
63 * Performs general cleanup of displayer resources. All by displayer issued
64 * object are not valid any more after cleanup. Displayer positions itself
65 * in initial state and DataState is changed to NOT_INITIALIZED state.
66 */
67 public void cleanup();
68
69 /**
70 * Suspends all updates of displayer. Displayer might receive data change
71 * updates, but does not call redraw on GUI components, which is time and
72 * CPU consuming.
73 */
74 public void suspend();
75
76 /**
77 * Resumes updates of GUI component.
78 *
79 * @see #suspend()
80 */
81 public void resume();
82
83 /**
84 * Returns <code>true</code> if GUI updates are suspended.
85 *
86 * @return <code>true</code> if GUI updates are suspended
87 */
88 public boolean isSuspended();
89 }
90
91 /* __oOo__ */