de.jaret.util.ui.timebars
Class TimeBarViewerSynchronizer

java.lang.Object
  extended by de.jaret.util.ui.timebars.TimeBarViewerSynchronizer
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class TimeBarViewerSynchronizer
extends java.lang.Object
implements java.beans.PropertyChangeListener

A synchronizer for two or more TimeBarViewers.

Version:
$Id: TimeBarViewerSynchronizer.java 863 2009-06-22 20:06:19Z kliem $
Author:
Peter Kliem

Field Summary
protected  boolean _syncRowHeight
          attribute marking that rowheigths should be synced.
protected  boolean _syncStartDate
          attribute marking that start dates should be synced.
protected  boolean _syncTimeScale
          attribute marking that the scales should be synced.
protected  boolean _syncYAxisWidth
          attribute marking that the y axis width should be synced.
protected  java.util.List<TimeBarViewerInterface> _viewers
          List of viewers to be synchronized.
 
Constructor Summary
TimeBarViewerSynchronizer(boolean syncRowHeight, boolean syncStartDate, boolean syncTimeScale)
          Constructs a new Synchronizer.
TimeBarViewerSynchronizer(boolean syncRowHeight, boolean syncStartDate, boolean syncTimeScale, boolean syncYAxisWidth)
          Constructs a new Synchronizer.
 
Method Summary
 void addViewer(TimeBarViewerInterface viewer)
          Add a viewer to the set of synchronized viewers.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Handle property changes from the different viewers.
 void remViewer(TimeBarViewerInterface viewer)
          Remove a viewer from the set of synchronized viewers.
 java.lang.String toString()
          Produce a string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_syncRowHeight

protected boolean _syncRowHeight
attribute marking that rowheigths should be synced.


_syncStartDate

protected boolean _syncStartDate
attribute marking that start dates should be synced.


_syncTimeScale

protected boolean _syncTimeScale
attribute marking that the scales should be synced.


_syncYAxisWidth

protected boolean _syncYAxisWidth
attribute marking that the y axis width should be synced.


_viewers

protected java.util.List<TimeBarViewerInterface> _viewers
List of viewers to be synchronized.

Constructor Detail

TimeBarViewerSynchronizer

public TimeBarViewerSynchronizer(boolean syncRowHeight,
                                 boolean syncStartDate,
                                 boolean syncTimeScale,
                                 boolean syncYAxisWidth)
Constructs a new Synchronizer. It will synchronize the timescale (optional), min/max dates of the scale, optional rowheight, optional startdate, optional y axis width

Parameters:
syncRowHeight - if true, row heights will be synchronized
syncStartDate - if true, the start dates will be synchronized
syncTimeScale - if true the scaling of the time axis will be synchronized
syncYAxisWidth - if true sync the width of the y axis

TimeBarViewerSynchronizer

public TimeBarViewerSynchronizer(boolean syncRowHeight,
                                 boolean syncStartDate,
                                 boolean syncTimeScale)
Constructs a new Synchronizer. It will synchronize the timescale (optional), min/max dates of the scale, optional rowheight, optional startdate

Parameters:
syncRowHeight - if true, row heights will be synchronized
syncStartDate - if true, the start dates will be synchronized
syncTimeScale - if true the scaling of the time axis will be synchronized
Method Detail

addViewer

public void addViewer(TimeBarViewerInterface viewer)
Add a viewer to the set of synchronized viewers.

Parameters:
viewer - the viewer to be added

remViewer

public void remViewer(TimeBarViewerInterface viewer)
Remove a viewer from the set of synchronized viewers.

Parameters:
viewer - the viewer to be removed

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Handle property changes from the different viewers.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
evt - propertyChange event

toString

public java.lang.String toString()
Produce a string representation.

Overrides:
toString in class java.lang.Object
Returns:
simple string representation


Copyright © 2012. All Rights Reserved.