## com.bbn.openmap.gui.time
Class TimeSliderSupport

    java.lang.Object
      com.bbn.openmap.gui.time.TimeSliderSupport

All Implemented Interfaces:
  javax.swing.event.ChangeListener, java.util.EventListener, TimeConstants

public class TimeSliderSupport
extends java.lang.Object
implements TimeConstants, javax.swing.event.ChangeListener

Field Summary
`protected long` `endTime`
`protected RealTimeHandler` `rtHandler`
`protected long` `startTime`
`protected javax.swing.JSlider` `timeSlider`

Fields inherited from interface com.bbn.openmap.gui.time.TimeConstants
`TIMER_BACKWARD, TIMER_FORWARD, TIMER_INACTIVE, TIMER_RUNNING_STATUS, TIMER_STEP_BACKWARD, TIMER_STEP_FORWARD, TIMER_STOPPED, TIMER_TIME_STATUS`

Constructor Summary
`TimeSliderSupport(javax.swing.JSlider slider, RealTimeHandler rth, long startingTime, long endingTime)`

Method Summary
`long` `getEndTime()`
`RealTimeHandler` `getHandler()`
`long` `getStartTime()`
`protected long` `getTime()` Get the time reflected by the current setting of the slider.
`void` `setEndTime(long time)`
`void` `setHandler(RealTimeHandler rth)`
`void` `setStartTime(long time)`
`javax.swing.JSlider` `setTimeSlider()`
`void` `setTimeSlider(javax.swing.JSlider jslider)`
`void` `stateChanged(javax.swing.event.ChangeEvent ce)` ChangeListener method, sets the time on the RealTimeHandler based on the current setting on the slider.
`void` `update(long time)` Updates the position of the slider to a place reflective to the startTime and endTime of this support object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### timeSlider

    protected javax.swing.JSlider timeSlider

### rtHandler

    protected RealTimeHandler rtHandler

### startTime

    protected long startTime

### endTime

    protected long endTime

Constructor Detail

### TimeSliderSupport

    public TimeSliderSupport(javax.swing.JSlider slider,
                             RealTimeHandler rth,
                             long startingTime,
                             long endingTime)

Method Detail

### update

    public void update(long time)

  Updates the position of the slider to a place reflective to the startTime and endTime of this support object. Only moves the slider marker if the difference is greater than one.

### stateChanged

    public void stateChanged(javax.swing.event.ChangeEvent ce)

  ChangeListener method, sets the time on the RealTimeHandler based on the current setting on the slider.

  Specified by:
    `stateChanged` in interface `javax.swing.event.ChangeListener`

### getTime

    protected long getTime()

  Get the time reflected by the current setting of the slider. Assumes that the JSlider has been set in this TimeSliderSupport object.

### setTimeSlider

    public void setTimeSlider(javax.swing.JSlider jslider)

### setTimeSlider

    public javax.swing.JSlider setTimeSlider()

### setHandler

    public void setHandler(RealTimeHandler rth)

### getHandler

    public RealTimeHandler getHandler()

### setStartTime

    public void setStartTime(long time)

### getStartTime

    public long getStartTime()

### setEndTime

    public void setEndTime(long time)

### getEndTime

    public long getEndTime()

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details