pamScrollSystem
Class PamScroller

java.lang.Object
  extended by pamScrollSystem.AbstractPamScroller
      extended by pamScrollSystem.PamScroller
All Implemented Interfaces:
java.io.Serializable

public class PamScroller
extends AbstractPamScroller

See Also:
Serialized Form

Nested Class Summary
(package private)  class PamScroller.ScrollListener
           
 
Nested classes/interfaces inherited from class pamScrollSystem.AbstractPamScroller
AbstractPamScroller.MouseWheel, AbstractPamScroller.PageBackAction, AbstractPamScroller.PageForwardAction, AbstractPamScroller.ShowMenuButtonPress
 
Field Summary
private  javax.swing.JPanel controlPanel
          small panel to go in the East or the South to hold additional controls such as the navigation buttons and tools for setting the range.
private  PamLabel endLabel
           
private  javax.swing.JPanel panel
           
private  javax.swing.JScrollBar scrollBar
           
private  PamLabel startLabel
           
private  PamPanel timePanel
           
 
Fields inherited from class pamScrollSystem.AbstractPamScroller
HORIZONTAL, iconFill, iconLine, observers, scrollerData, usedDataBlocks, VERTICAL
 
Constructor Summary
PamScroller(java.lang.String name, int orientation, int stepSizeMillis, long defaultLoadTime, boolean hasMenu)
          Construct a Pamguard scroll bar which contains a main scroll bar bit and buttons for moving forward in large sections of data.
 
Method Summary
 void addControl(javax.swing.JComponent component)
          Add an additional control to the control panel which will sit to the right of or just below the wee buttons used for scroll bar navigation.
 void anotherScrollerMovedInner(long newValue)
          Another managed scroller moved it's position
private  void checkValueRange()
          Called after setvisibleAmount to check that the value is now not higher than the realistic maximum which is
(package private)  void doMouseWheelAction(java.awt.event.MouseWheelEvent mouseWheelEvent)
           
 long getBlockIncrement()
           
 javax.swing.JComponent getComponent()
           
 long getValueMillis()
           
 long getVisibleAmount()
           
 void rangesChanged(long setValue)
          Called when ranges have been changed and tells scroller to go to a particular absolute value.
private  void sayTimes()
           
 void scrollMoved()
           
 void setBlockIncrement(long blockIncrement)
           
 void setShowTimes(boolean showTimes)
           
 void setUnitIncrement(long unitIncrement)
           
 void setVisibleAmount(long visibleAmount)
           
 java.lang.String toString()
           
 void valueSetMillis(long valueMillis)
          Called when a new position has been set
 
Methods inherited from class pamScrollSystem.AbstractPamScroller
addDataBlock, addMouseWheelSource, addObserver, anotherScrollerMovedOuter, coupledScrollerChanged, coupleScroller, destroyScroller, getButtonPanel, getDefaultLoadtime, getMaximumMillis, getMinimumMillis, getNumUsedDataBlocks, getObservers, getPageStep, getRangeMillis, getScrollerCoupling, getScrollManager, getStepSizeMillis, getUsedDataBlock, isDataBlockUsed, menuButtonPress, notifyRangeChange, notifyValueChange, pageBack, pageForward, reLoad, removeDataBlock, removeObserver, setDefaultLoadtime, setPageStep, setRangeMillis, setScrollerCoupling, setStepSizeMillis, setValueMillis, setVisible, showMenuButtonPopup, uncoupleScroller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

panel

private javax.swing.JPanel panel

scrollBar

private javax.swing.JScrollBar scrollBar

timePanel

private PamPanel timePanel

startLabel

private PamLabel startLabel

endLabel

private PamLabel endLabel

controlPanel

private javax.swing.JPanel controlPanel
small panel to go in the East or the South to hold additional controls such as the navigation buttons and tools for setting the range.

Constructor Detail

PamScroller

public PamScroller(java.lang.String name,
                   int orientation,
                   int stepSizeMillis,
                   long defaultLoadTime,
                   boolean hasMenu)
Construct a Pamguard scroll bar which contains a main scroll bar bit and buttons for moving forward in large sections of data.

Parameters:
orientation - orientation of the scroller.
Method Detail

setShowTimes

public void setShowTimes(boolean showTimes)

addControl

public void addControl(javax.swing.JComponent component)
Add an additional control to the control panel which will sit to the right of or just below the wee buttons used for scroll bar navigation.

Parameters:
component -

rangesChanged

public void rangesChanged(long setValue)
Description copied from class: AbstractPamScroller
Called when ranges have been changed and tells scroller to go to a particular absolute value.

Specified by:
rangesChanged in class AbstractPamScroller

scrollMoved

public void scrollMoved()

doMouseWheelAction

void doMouseWheelAction(java.awt.event.MouseWheelEvent mouseWheelEvent)
Specified by:
doMouseWheelAction in class AbstractPamScroller

sayTimes

private void sayTimes()

anotherScrollerMovedInner

public void anotherScrollerMovedInner(long newValue)
Description copied from class: AbstractPamScroller
Another managed scroller moved it's position

Specified by:
anotherScrollerMovedInner in class AbstractPamScroller
Parameters:
newValue - new value in millis

getComponent

public javax.swing.JComponent getComponent()
Specified by:
getComponent in class AbstractPamScroller
Returns:
the Swing component to go into the GUI.

setBlockIncrement

public void setBlockIncrement(long blockIncrement)
Overrides:
setBlockIncrement in class AbstractPamScroller
Parameters:
blockIncrement - the blockIncrement to set in millis

getBlockIncrement

public long getBlockIncrement()

setVisibleAmount

public void setVisibleAmount(long visibleAmount)
Overrides:
setVisibleAmount in class AbstractPamScroller
Parameters:
visibleAmount - the visibleAmount to set in millis

getVisibleAmount

public long getVisibleAmount()
Returns:
The visible amount of the display in milliseconds.

checkValueRange

private void checkValueRange()
Called after setvisibleAmount to check that the value is now not higher than the realistic maximum which is


setUnitIncrement

public void setUnitIncrement(long unitIncrement)
Overrides:
setUnitIncrement in class AbstractPamScroller
Parameters:
unitIncrement - the unitIncrement to set in millis

getValueMillis

public long getValueMillis()
Specified by:
getValueMillis in class AbstractPamScroller
Returns:
the valueMillis

valueSetMillis

public void valueSetMillis(long valueMillis)
Description copied from class: AbstractPamScroller
Called when a new position has been set

Specified by:
valueSetMillis in class AbstractPamScroller
Parameters:
valueMillis - new scroll value in milliseconds

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object