1 /*
2 * File: TimeBarMarker.java
3 * Copyright (c) 2004-2007 Peter Kliem (Peter.Kliem@jaret.de)
4 * A commercial license is available, see http://www.jaret.de.
5 *
6 * This program 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 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program 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 this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 package de.jaret.util.ui.timebars;
21
22 import de.jaret.util.date.JaretDate;
23
24 /**
25 * Interface for a vertical marker to be displayed in a TimeBarViewer.
26 *
27 * @author Peter Kliem
28 * @version $Id: TimeBarMarker.java 160 2007-01-02 22:02:40Z olk $
29 */
30 public interface TimeBarMarker {
31 /**
32 * Add a listener to be informed about changes to the marker.
33 *
34 * @param tbml the TimeBarMarkerListener to be added
35 */
36 void addTimeBarMarkerListener(TimeBarMarkerListener tbml);
37
38 /**
39 * Remove a TimeBarMarkerListener for this marker.
40 *
41 * @param tbml TimeBarMArkerListener to be removed
42 */
43 void remTimeBarMarkerListener(TimeBarMarkerListener tbml);
44
45 /**
46 * Retrieve the current time marked by the marker.
47 *
48 * @return Returns the timestamp currently marked.
49 */
50 JaretDate getDate();
51
52 /**
53 * Set the timestamp to be marked.
54 *
55 * @param date The date to be marked by the marker
56 */
57 void setDate(JaretDate date);
58
59 /**
60 * Retrieve the draggable state of the marker.
61 *
62 * @return Return true if the marker is draggable
63 */
64 boolean isDraggable();
65
66 /**
67 * Set whether the marker can be dragged by the user.
68 *
69 * @param draggable if true the marker can be dragged by the user.
70 */
71 void setDraggable(boolean draggable);
72
73 /**
74 * Retrieve the description of the marker.
75 *
76 * @return description to be displayed
77 */
78 String getDescription();
79
80 /**
81 * Retrieve the tooltip text for the marker.
82 *
83 * @return the tooltip text
84 */
85 String getTooltipText();
86
87 }