Package pamScrollSystem
Class ViewerScrollerManager
java.lang.Object
pamScrollSystem.AbstractScrollManager
pamScrollSystem.ViewerScrollerManager
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider
- 
Nested Class Summary
Nested classes/interfaces inherited from class pamScrollSystem.AbstractScrollManager
AbstractScrollManager.SpecialDataBlockInfo - 
Field Summary
Fields inherited from class pamScrollSystem.AbstractScrollManager
pamScrollers - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddPamScroller(AbstractPamScroller pamScroller) Add a new scroller to the managed list.voidcentreDataAt(PamDataBlock dataBlock, long menuMouseTime) Centre all data in all data blocks at the given timelongcheckGapPos(AbstractPamScroller scroller, long oldMin, long oldMax, long newMin, long newMax, int direction) Check to see whether or not we are scrolling into a data gap.longcheckMaximumTime(long requestedTime) Check the maximum time requested by a scroll bar doesn't go beyond the end of the datalongcheckMinimumTime(long requestedTime) Check the minimum time requested by a scroll bar doesn't go below the start of the datalonggetNextDataStart(AbstractPamScroller scroller, long timeMillis) longgetPrevDataEnd(AbstractPamScroller scroller, long timeMillis) longgetStandardOptionsMenu(AbstractPamScroller pamScroller) voidloadData(boolean immediateLoad) loads data after a scroller has changed.voidmoveInnerScroller(AbstractPamScroller scroller, long newValue) Move the scroll bar component of a scroller.voidmoveOuterScroller(AbstractPamScroller scroller, long newMin, long newMax) Move the data load component of a scroller.voidnotifyModelChanged(int changeType) voidreLoad()Command telling manager to reload it's data.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidscrollToTime(PamDataBlock dataBlock, long menuMouseTime) Move scroll to given time.voidstartDataAt(PamDataBlock dataBlock, long menuMouseTime, boolean immediateLoad) Start all data in all data blocks at the given timeMethods inherited from class pamScrollSystem.AbstractScrollManager
addToSpecialDatablock, addToSpecialDatablock, coupleScroller, findCoupling, findScroller, getPamScrollers, getScrollManager, getSpecialLoadTimes, isInGap, isInSpecialList, moveAllScrollersTo, removeFromSpecialDatablock, removePamScroller, startDataAt, uncoupleScroller 
- 
Constructor Details
- 
ViewerScrollerManager
public ViewerScrollerManager() 
 - 
 - 
Method Details
- 
addPamScroller
Description copied from class:AbstractScrollManagerAdd a new scroller to the managed list.- Overrides:
 addPamScrollerin classAbstractScrollManager- Parameters:
 pamScroller- scroller to add
 - 
moveInnerScroller
Description copied from class:AbstractScrollManagerMove the scroll bar component of a scroller. This should not cause the reloading of any data, but other scroll bars should be notified of any changes.- Specified by:
 moveInnerScrollerin classAbstractScrollManager- Parameters:
 scroller- scroller that movednewValue- new value (time in milliseconds).
 - 
moveOuterScroller
Description copied from class:AbstractScrollManagerMove the data load component of a scroller. This should cause data to be reloaded and will need to notify all other scrollers incase they also need to shuffle along a bit.- Specified by:
 moveOuterScrollerin classAbstractScrollManager- Parameters:
 scroller- scroller that changednewMin- new data min value in millisnewMax- new data max value in millis
 - 
reLoad
public void reLoad()Description copied from class:AbstractScrollManagerCommand telling manager to reload it's data.- Specified by:
 reLoadin classAbstractScrollManager
 - 
loadData
public void loadData(boolean immediateLoad) loads data after a scroller has changed.- Parameters:
 immediateLoad-
 - 
checkMaximumTime
public long checkMaximumTime(long requestedTime) Description copied from class:AbstractScrollManagerCheck the maximum time requested by a scroll bar doesn't go beyond the end of the data- Specified by:
 checkMaximumTimein classAbstractScrollManager- Parameters:
 requestedTime- requested time in millis.- Returns:
 - the minimum of the requested time and the actual end time of the data
 
 - 
checkMinimumTime
public long checkMinimumTime(long requestedTime) Description copied from class:AbstractScrollManagerCheck the minimum time requested by a scroll bar doesn't go below the start of the data- Specified by:
 checkMinimumTimein classAbstractScrollManager- Returns:
 - the maximum of the requested time and the actual start time of the data
 
 - 
notifyModelChanged
public void notifyModelChanged(int changeType) - Specified by:
 notifyModelChangedin classAbstractScrollManager
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
getUnitName
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- Returns:
 - true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
 
 - 
centreDataAt
Description copied from class:AbstractScrollManagerCentre all data in all data blocks at the given time- Specified by:
 centreDataAtin classAbstractScrollManager- Parameters:
 menuMouseTime- time in milliseconds
 - 
scrollToTime
Description copied from class:AbstractScrollManagerMove scroll to given time. Don't move the outer scroller unless necessary.- Specified by:
 scrollToTimein classAbstractScrollManager- Parameters:
 dataBlock-menuMouseTime-
 - 
startDataAt
Description copied from class:AbstractScrollManagerStart all data in all data blocks at the given time- Specified by:
 startDataAtin classAbstractScrollManager- Parameters:
 dataBlock-menuMouseTime- time in millisecondsimmediateLoad- load data immediately in current thread. Don't re-schedule for later.
 - 
getStandardOptionsMenu
- Overrides:
 getStandardOptionsMenuin classAbstractScrollManager
 - 
checkGapPos
public long checkGapPos(AbstractPamScroller scroller, long oldMin, long oldMax, long newMin, long newMax, int direction) Description copied from class:AbstractScrollManagerCheck to see whether or not we are scrolling into a data gap. Rules exist for stopping / starting / jumping over gaps depending on the current state and the new position of the scroller.- Specified by:
 checkGapPosin classAbstractScrollManager- Parameters:
 scroller- PamScroller that movedoldMin- old minimum timeoldMax- old maximum timenewMin- new minimum timenewMax- new maximum timedirection- direction of scroll +1 = forward, -1 = backward, 0 = plonked down by mouse on datamap.- Returns:
 - new minimum position. Calling function must then work out the new maximum position.
 
 - 
getNextDataStart
 - 
getPrevDataEnd
 
 -