de.jaret.util.ui.timebars
Class AbstractTimeBarMarker

java.lang.Object
  extended by de.jaret.util.ui.timebars.AbstractTimeBarMarker
All Implemented Interfaces:
TimeBarMarker
Direct Known Subclasses:
TimeBarMarkerImpl

public abstract class AbstractTimeBarMarker
extends java.lang.Object
implements TimeBarMarker

Abstract base implementation of a TimeBarMarker.

Version:
$Id: AbstractTimeBarMarker.java 251 2007-02-12 21:09:03Z olk $
Author:
Peter Kliem

Field Summary
protected  boolean _draggable
          attribute storing the draggable state.
protected  java.util.List<TimeBarMarkerListener> _listenerList
          listener list.
 
Constructor Summary
AbstractTimeBarMarker(boolean draggable)
           
 
Method Summary
 void addTimeBarMarkerListener(TimeBarMarkerListener tbml)
          Add a listener to be informed about changes to the marker.
protected  void fireMarkerChanged(de.jaret.util.date.JaretDate oldDate, de.jaret.util.date.JaretDate newDate)
          Inform registered listeners of a date change.
protected  void fireMarkerDescriptionChanged(java.lang.String oldValue, java.lang.String newValue)
          Inform registered listeners of a description change.
 boolean isDraggable()
          Retrieve the draggable state of the marker.
 void remTimeBarMarkerListener(TimeBarMarkerListener tbml)
          Remove a TimeBarMarkerListener for this marker.
 void setDraggable(boolean draggable)
          Set whether the marker can be dragged by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jaret.util.ui.timebars.TimeBarMarker
getDate, getDescription, getTooltipText, setDate
 

Field Detail

_draggable

protected boolean _draggable
attribute storing the draggable state.


_listenerList

protected java.util.List<TimeBarMarkerListener> _listenerList
listener list.

Constructor Detail

AbstractTimeBarMarker

public AbstractTimeBarMarker(boolean draggable)
Parameters:
draggable - true if the marker should be draggable
Method Detail

isDraggable

public boolean isDraggable()
Retrieve the draggable state of the marker.

Specified by:
isDraggable in interface TimeBarMarker
Returns:
Return true if the marker is draggable

setDraggable

public void setDraggable(boolean draggable)
Description copied from interface: TimeBarMarker
Set whether the marker can be dragged by the user.

Specified by:
setDraggable in interface TimeBarMarker
Parameters:
draggable - The draggable to set.

addTimeBarMarkerListener

public void addTimeBarMarkerListener(TimeBarMarkerListener tbml)
Add a listener to be informed about changes to the marker.

Specified by:
addTimeBarMarkerListener in interface TimeBarMarker
Parameters:
tbml - the TimeBarMarkerListener to be added

remTimeBarMarkerListener

public void remTimeBarMarkerListener(TimeBarMarkerListener tbml)
Remove a TimeBarMarkerListener for this marker.

Specified by:
remTimeBarMarkerListener in interface TimeBarMarker
Parameters:
tbml - TimeBarMArkerListener to be removed

fireMarkerChanged

protected void fireMarkerChanged(de.jaret.util.date.JaretDate oldDate,
                                 de.jaret.util.date.JaretDate newDate)
Inform registered listeners of a date change.

Parameters:
oldDate - the last date the amrker was set to
newDate - the new date

fireMarkerDescriptionChanged

protected void fireMarkerDescriptionChanged(java.lang.String oldValue,
                                            java.lang.String newValue)
Inform registered listeners of a description change.

Parameters:
oldValue - the prevoiuos description
newValue - the new value


Copyright © 2012. All Rights Reserved.