org.das2.components
Class DasTimeRangeSelector

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.das2.components.DasTimeRangeSelector
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, TimeRangeSelectionListener

public class DasTimeRangeSelector
extends javax.swing.JPanel
implements TimeRangeSelectionListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.Action nextAction
          Action that is associated with the next button.
protected  javax.swing.Action previousAction
          Action that is associated with the previous button.
protected  javax.swing.Action rangeAction
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DasTimeRangeSelector()
          Creates a new instance of DasTimeRangeSelector
DasTimeRangeSelector(Datum startTime, Datum endTime)
           
DasTimeRangeSelector(DatumRange range)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener to the listener list.
 void addTimeRangeSelectionListener(TimeRangeSelectionListener listener)
          Registers TimeRangeSelectionListener to receive events.
 void enableFavorites(java.lang.String group)
          adds a droplist of recently entered times.
protected  void fireTimeRangeSelected()
           
protected  void fireTimeRangeSelected(TimeRangeSelectionEvent event)
          Notifies all registered listeners about the event.
protected  void fireTimeRangeSelectedNext()
           
protected  void fireTimeRangeSelectedPrevious()
           
 Datum getEndTime()
           
 java.awt.Dimension getMaximumSize()
           
 java.awt.Dimension getMinimumSize()
           
 DatumRange getRange()
           
 Datum getStartTime()
           
 boolean isWithin(Datum s1, Datum s2)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a PropertyChangeListener from the listener list.
 void removeTimeRangeSelectionListener(TimeRangeSelectionListener listener)
          Removes TimeRangeSelectionListener from the list of listeners.
 void setEndTime(Datum s2)
           
 void setRange(DatumRange range)
           
 void setStartTime(Datum s1)
           
 void timeRangeSelected(TimeRangeSelectionEvent e)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

previousAction

protected final javax.swing.Action previousAction
Action that is associated with the previous button. Access is given to subclasses so that other widgets can be associated with this action (Popup menu, etc).


nextAction

protected final javax.swing.Action nextAction
Action that is associated with the next button. Access is given to subclasses so that other widgets can be associated with this action (Popup menu, etc).


rangeAction

protected final javax.swing.Action rangeAction
Constructor Detail

DasTimeRangeSelector

public DasTimeRangeSelector()
Creates a new instance of DasTimeRangeSelector


DasTimeRangeSelector

public DasTimeRangeSelector(Datum startTime,
                            Datum endTime)

DasTimeRangeSelector

public DasTimeRangeSelector(DatumRange range)
Method Detail

enableFavorites

public void enableFavorites(java.lang.String group)
adds a droplist of recently entered times. This should be a spacecraft string, or null.


getStartTime

public Datum getStartTime()

getEndTime

public Datum getEndTime()

getRange

public DatumRange getRange()

setRange

public void setRange(DatumRange range)

setStartTime

public void setStartTime(Datum s1)

setEndTime

public void setEndTime(Datum s2)

isWithin

public boolean isWithin(Datum s1,
                        Datum s2)

timeRangeSelected

public void timeRangeSelected(TimeRangeSelectionEvent e)
Specified by:
timeRangeSelected in interface TimeRangeSelectionListener

addTimeRangeSelectionListener

public void addTimeRangeSelectionListener(TimeRangeSelectionListener listener)
Registers TimeRangeSelectionListener to receive events.

Parameters:
listener - The listener to register.

removeTimeRangeSelectionListener

public void removeTimeRangeSelectionListener(TimeRangeSelectionListener listener)
Removes TimeRangeSelectionListener from the list of listeners.

Parameters:
listener - The listener to remove.

fireTimeRangeSelectedPrevious

protected void fireTimeRangeSelectedPrevious()

fireTimeRangeSelectedNext

protected void fireTimeRangeSelectedNext()

fireTimeRangeSelected

protected void fireTimeRangeSelected()

fireTimeRangeSelected

protected void fireTimeRangeSelected(TimeRangeSelectionEvent event)
Notifies all registered listeners about the event.

Parameters:
event - The event to be fired

getMaximumSize

public java.awt.Dimension getMaximumSize()
Overrides:
getMaximumSize in class javax.swing.JComponent

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list.

Overrides:
addPropertyChangeListener in class java.awt.Container
Parameters:
l - The listener to add.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the listener list.

Overrides:
removePropertyChangeListener in class java.awt.Component
Parameters:
l - The listener to remove.