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

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      com.bbn.openmap.gui.OMComponentPanel
                          com.bbn.openmap.gui.time.TimerControlButtonPanel

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, java.awt.image.ImageObserver, LightMapHandlerChild, java.awt.MenuContainer, java.beans.PropertyChangeListener, PropertyConsumer, java.io.Serializable, TimeConstants

public class TimerControlButtonPanel
extends OMComponentPanel
implements java.beans.PropertyChangeListener, java.awt.event.ActionListener, TimeConstants

The TimerControlButtonPanel provides control for starting and stopping a clock contained in a RealTimeHandler. This class also has provisions for having the clock run the reverse direction, and for stepping the clock forward and backward one interval.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected javax.swing.JButton` `backwardButton`
`protected javax.swing.ImageIcon` `backwardIcon`
`static java.lang.String` `BackwardIconProperty`
`protected java.lang.String` `backwardIconURL`
`protected javax.swing.ImageIcon` `backwardStepIcon`
`static java.lang.String` `BackwardStepIconProperty`
`protected java.lang.String` `backwardStepIconURL`
`protected java.lang.String` `DefaultBackwardIconURL`
`protected java.lang.String` `DefaultBackwardStepIconURL`
`protected java.lang.String` `DefaultForwardIconURL`
`protected java.lang.String` `DefaultForwardStepIconURL`
`protected java.lang.String` `DefaultPauseIconURL`
`protected javax.swing.JButton` `forwardButton`
`protected javax.swing.ImageIcon` `forwardIcon`
`static java.lang.String` `ForwardIconProperty`
`protected java.lang.String` `forwardIconURL`
`protected javax.swing.ImageIcon` `forwardStepIcon`
`static java.lang.String` `ForwardStepIconProperty`
`protected java.lang.String` `forwardStepIconURL`
`protected javax.swing.ImageIcon` `pauseIcon`
`static java.lang.String` `PauseIconProperty`
`protected java.lang.String` `pauseIconURL`
`protected RealTimeHandler` `timeHandler`

Fields inherited from class com.bbn.openmap.gui.OMComponentPanel
`beanContextChildSupport, i18n, propertyPrefix, windowSupport`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, 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 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`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`TimerControlButtonPanel(RealTimeHandler rth)`

Method Summary
`void` `actionPerformed(java.awt.event.ActionEvent ae)` ActionListener Interface Method listens to the timer, in case something else starts it, we can update the gui.
`RealTimeHandler` `getTimeHandler()`
`void` `initGUI()` Set the ImageIcons to whatever is set on the URL variables.
`void` `propertyChange(java.beans.PropertyChangeEvent pce)` PropertyChangeListener Interface Method used to find out when the timer has been stopped and started.
`void` `setTimeHandler(RealTimeHandler rth)`
`protected void` `update(java.lang.String newStatus)`

Methods inherited from class com.bbn.openmap.gui.OMComponentPanel
`addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, fireVetoableChange, getBeanContext, getProperties, getPropertyInfo, getPropertyPrefix, getWindowSupport, removeVetoableChangeListener, setBeanContext, setProperties, setProperties, setPropertyPrefix, setWindowSupport`

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

Methods inherited from class javax.swing.JComponent

`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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`

Methods inherited from interface java.beans.beancontext.BeanContextChild
`addPropertyChangeListener, removePropertyChangeListener`

Field Detail

### backwardStepIcon

    protected javax.swing.ImageIcon backwardStepIcon

### backwardIcon

    protected javax.swing.ImageIcon backwardIcon

### forwardIcon

    protected javax.swing.ImageIcon forwardIcon

### forwardStepIcon

    protected javax.swing.ImageIcon forwardStepIcon

### pauseIcon

    protected javax.swing.ImageIcon pauseIcon

### DefaultBackwardStepIconURL

    protected java.lang.String DefaultBackwardStepIconURL

### DefaultBackwardIconURL

    protected java.lang.String DefaultBackwardIconURL

### DefaultForwardIconURL

    protected java.lang.String DefaultForwardIconURL

### DefaultForwardStepIconURL

    protected java.lang.String DefaultForwardStepIconURL

### DefaultPauseIconURL

    protected java.lang.String DefaultPauseIconURL

### backwardStepIconURL

    protected java.lang.String backwardStepIconURL

### backwardIconURL

    protected java.lang.String backwardIconURL

### forwardIconURL

    protected java.lang.String forwardIconURL

### forwardStepIconURL

    protected java.lang.String forwardStepIconURL

### pauseIconURL

    protected java.lang.String pauseIconURL

### timeHandler

    protected RealTimeHandler timeHandler

### forwardButton

    protected javax.swing.JButton forwardButton

### backwardButton

    protected javax.swing.JButton backwardButton

### BackwardStepIconProperty

    public static final java.lang.String BackwardStepIconProperty

See Also:
  Constant Field Values

### BackwardIconProperty

    public static final java.lang.String BackwardIconProperty

See Also:
  Constant Field Values

### ForwardStepIconProperty

    public static final java.lang.String ForwardStepIconProperty

See Also:
  Constant Field Values

### ForwardIconProperty

    public static final java.lang.String ForwardIconProperty

See Also:
  Constant Field Values

### PauseIconProperty

    public static final java.lang.String PauseIconProperty

See Also:
  Constant Field Values

Constructor Detail

### TimerControlButtonPanel

    public TimerControlButtonPanel(RealTimeHandler rth)

Method Detail

### setTimeHandler

    public void setTimeHandler(RealTimeHandler rth)

### getTimeHandler

    public RealTimeHandler getTimeHandler()

### initGUI

    public void initGUI()

  Set the ImageIcons to whatever is set on the URL variables. Sets the running icon to be the pressed icon, and makes the stopped and inactive icons.

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent pce)

  PropertyChangeListener Interface Method used to find out when the timer has been stopped and started. Is expecting that the property name and value are the actual string objects defined in the TimeConstants interface. It does ==, not equals().

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

### update

    protected void update(java.lang.String newStatus)

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent ae)

  ActionListener Interface Method listens to the timer, in case something else starts it, we can update the gui. Also listens to this button, to start and stop the given timer.

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

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