Package pamScrollSystem
Class RealTimeScrollManager
java.lang.Object
pamScrollSystem.AbstractScrollManager
pamScrollSystem.RealTimeScrollManager
-
Nested Class Summary
Nested classes/interfaces inherited from class pamScrollSystem.AbstractScrollManager
AbstractScrollManager.SpecialDataBlockInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
centreDataAt
(PamDataBlock dataBlock, long menuMouseTime) Centre all data in all data blocks at the given timelong
checkGapPos
(AbstractPamScroller abstractPamScroller, long oldMin, long oldMax, long newMin, long newMax, int i) Check to see whether or not we are scrolling into a data gap.long
checkMaximumTime
(long requestedTime) Check the maximum time requested by a scroll bar doesn't go beyond the end of the datalong
checkMinimumTime
(long requestedTime) Check the minimum time requested by a scroll bar doesn't go below the start of the datavoid
moveInnerScroller
(AbstractPamScroller scroller, long newValue) Move the scroll bar component of a scroller.void
moveOuterScroller
(AbstractPamScroller scroller, long newMin, long newMax) Move the data load component of a scroller.void
notifyModelChanged
(int changeType) void
reLoad()
Command telling manager to reload it's data.void
startDataAt
(PamDataBlock dataBlock, long menuMouseTime, boolean immediateLoad) Start all data in all data blocks at the given timeMethods inherited from class pamScrollSystem.AbstractScrollManager
addPamScroller, addToSpecialDatablock, addToSpecialDatablock, coupleScroller, findCoupling, findScroller, getPamScrollers, getScrollManager, getSpecialLoadTimes, getStandardOptionsMenu, isInGap, isInSpecialList, moveAllScrollersTo, removeFromSpecialDatablock, removePamScroller, startDataAt, uncoupleScroller
-
Constructor Details
-
RealTimeScrollManager
public RealTimeScrollManager()
-
-
Method Details
-
checkMaximumTime
public long checkMaximumTime(long requestedTime) Description copied from class:AbstractScrollManager
Check the maximum time requested by a scroll bar doesn't go beyond the end of the data- Specified by:
checkMaximumTime
in 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:AbstractScrollManager
Check the minimum time requested by a scroll bar doesn't go below the start of the data- Specified by:
checkMinimumTime
in classAbstractScrollManager
- Returns:
- the maximum of the requested time and the actual start time of the data
-
moveInnerScroller
Description copied from class:AbstractScrollManager
Move 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:
moveInnerScroller
in classAbstractScrollManager
- Parameters:
scroller
- scroller that movednewValue
- new value (time in milliseconds).
-
moveOuterScroller
Description copied from class:AbstractScrollManager
Move 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:
moveOuterScroller
in classAbstractScrollManager
- Parameters:
scroller
- scroller that changednewMin
- new data min value in millisnewMax
- new data max value in millis
-
notifyModelChanged
public void notifyModelChanged(int changeType) - Specified by:
notifyModelChanged
in classAbstractScrollManager
-
startDataAt
Description copied from class:AbstractScrollManager
Start all data in all data blocks at the given time- Specified by:
startDataAt
in classAbstractScrollManager
- Parameters:
menuMouseTime
- time in millisecondsimmediateLoad
- load data immediately in current thread. Don't re-schedule for later.
-
centreDataAt
Description copied from class:AbstractScrollManager
Centre all data in all data blocks at the given time- Specified by:
centreDataAt
in classAbstractScrollManager
- Parameters:
menuMouseTime
- time in milliseconds
-
reLoad
public void reLoad()Description copied from class:AbstractScrollManager
Command telling manager to reload it's data.- Specified by:
reLoad
in classAbstractScrollManager
-
checkGapPos
public long checkGapPos(AbstractPamScroller abstractPamScroller, long oldMin, long oldMax, long newMin, long newMax, int i) Description copied from class:AbstractScrollManager
Check 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:
checkGapPos
in classAbstractScrollManager
- Parameters:
abstractPamScroller
- PamScroller that movedoldMin
- old minimum timeoldMax
- old maximum timenewMin
- new minimum timenewMax
- new maximum timei
- 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.
-