Class RelativeTemporalComponent

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.gvsig.timesupport.swing.impl.components.RelativeTemporalComponent
All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, TemporalComponent

public class RelativeTemporalComponent extends JPanel implements TemporalComponent, PropertyChangeListener
Control to manipulate RelativeInstants / RelativeIntervals
Version:
$Id$
Author:
Pablo Viciano Negre
See Also:
  • Field Details

    • width

      public static int width
    • height

      public static int height
  • Constructor Details

    • RelativeTemporalComponent

      public RelativeTemporalComponent()
  • Method Details

    • getListener

      public TimeAdjustmentListener getListener()
      Specified by:
      getListener in interface TemporalComponent
    • setListener

      public void setListener(TimeAdjustmentListener listener)
      Specified by:
      setListener in interface TemporalComponent
    • setTimes

      public void setTimes(String label, org.gvsig.timesupport.Time init, org.gvsig.timesupport.Time lower, org.gvsig.timesupport.Time upper)
      Initializes the control with the parameter values
      Specified by:
      setTimes in interface TemporalComponent
      Parameters:
      label -
      init - Date initial for the control
      lower - Lower limit
      upper - Upper Limit
    • setTime

      public void setTime(int hours, int minutes, int seconds, int milis)
      Set the hours, minutes and seconds
    • setHours

      public void setHours(int hours)
      Set hours
    • setMinutes

      public void setMinutes(int minutes)
      Set minutes
      Parameters:
      minutes -
    • setSeconds

      public void setSeconds(int seconds)
      Set seconds
      Parameters:
      seconds -
    • setMilis

      public void setMilis(int milis)
      Set milis
      Parameters:
      milis -
    • getHours

      public int getHours()
      Get hours
      Returns:
    • getMinutes

      public int getMinutes()
      Get minutes
      Returns:
    • getSeconds

      public int getSeconds()
      Get seconds
      Returns:
    • getMilis

      public int getMilis()
      Get milis
      Returns:
    • setCurrentInstant

      public void setCurrentInstant(org.gvsig.timesupport.Time time)
      Description copied from interface: TemporalComponent
      Set current instant to all controls
      Specified by:
      setCurrentInstant in interface TemporalComponent
      Parameters:
      time -
    • setStartTime

      public void setStartTime(org.gvsig.timesupport.Time date)
      Description copied from interface: TemporalComponent
      Set start Time to all controls
      Specified by:
      setStartTime in interface TemporalComponent
      Parameters:
      date -
    • setEndTime

      public void setEndTime(org.gvsig.timesupport.Time date)
      Description copied from interface: TemporalComponent
      Set end Time to all controls
      Specified by:
      setEndTime in interface TemporalComponent
      Parameters:
      date -
    • getTime

      public org.gvsig.timesupport.Time getTime()
      Returns the date and time selected by the user
      Specified by:
      getTime in interface TemporalComponent
      Returns:
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Property change listener implementation for editing controls. Update slider position according to control values. It uses a flag to avoid infinite recursive actualization.
      Specified by:
      propertyChange in interface PropertyChangeListener
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface TemporalComponent
      Overrides:
      setEnabled in class JComponent
    • resetLowertTime

      public void resetLowertTime()
      Description copied from interface: TemporalComponent
      Reset lower (start) time with first value
      Specified by:
      resetLowertTime in interface TemporalComponent
    • resetUpperTime

      public void resetUpperTime()
      Description copied from interface: TemporalComponent
      Reset upper (end) time with first value
      Specified by:
      resetUpperTime in interface TemporalComponent
    • resetValues

      public void resetValues()
      Description copied from interface: TemporalComponent
      Reset all value with first values
      Specified by:
      resetValues in interface TemporalComponent