|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectpamScrollSystem.AbstractScrollManager
public abstract class AbstractScrollManager
| Field Summary | |
|---|---|
protected java.util.Vector<AbstractPamScroller> |
pamScrollers
|
private java.util.Vector<ScrollerCoupling> |
scrollerCouplings
|
private static AbstractScrollManager |
singleInstance
|
| Constructor Summary | |
|---|---|
protected |
AbstractScrollManager()
|
| Method Summary | |
|---|---|
void |
addPamScroller(AbstractPamScroller pamScroller)
Add a new scroller to the managed list. |
abstract void |
centreDataAt(PamDataBlock dataBlock,
long menuMouseTime)
Centre all data in all data blocks at the given time |
abstract long |
checkGapPos(AbstractPamScroller abstractPamScroller,
long oldMin,
long oldMax,
long newMin,
long newMax,
int direction)
Check to see whether or not we are scrolling into a data gap. |
abstract long |
checkMaximumTime(long requestedTime)
Check the maximum time requested by a scroll bar doesn't go beyond the end of the data |
abstract long |
checkMinimumTime(long requestedTime)
Check the minimum time requested by a scroll bar doesn't go below the start of the data |
ScrollerCoupling |
coupleScroller(AbstractPamScroller abstractPamScroller,
java.lang.String couplingName)
Couple a scroller to another scroller so that both have exactly the same behaviour, load the same data period, move their scrolls together, etc. |
private ScrollerCoupling |
findCoupling(java.lang.String name,
boolean autoCreate)
Find a scroller coupling with a given name |
static AbstractScrollManager |
getScrollManager()
|
javax.swing.JPopupMenu |
getStandardOptionsMenu(AbstractPamScroller pamSCroller)
|
int |
isInGap(PamDataBlock dataBlock,
long timeMillis)
Work out whether or not a particular time falls in the gap between points in a datamap . |
abstract void |
moveInnerScroller(AbstractPamScroller scroller,
long newValue)
Move the scroll bar component of a scroller. |
abstract void |
moveOuterScroller(AbstractPamScroller scroller,
long newMin,
long newMax)
Move the data load component of a scroller. |
abstract void |
notifyModelChanged(int changeType)
|
abstract void |
reLoad()
Command telling manager to reload it's data. |
void |
removePamScroller(AbstractPamScroller pamScroller)
Remove a pam scroller from the managed list. |
abstract void |
startDataAt(PamDataBlock dataBlock,
long menuMouseTime)
Start all data in all data blocks at the given time |
void |
uncoupleScroller(AbstractPamScroller abstractPamScroller)
Uncouple a scroller. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector<AbstractPamScroller> pamScrollers
private java.util.Vector<ScrollerCoupling> scrollerCouplings
private static AbstractScrollManager singleInstance
| Constructor Detail |
|---|
protected AbstractScrollManager()
| Method Detail |
|---|
public static AbstractScrollManager getScrollManager()
public void addPamScroller(AbstractPamScroller pamScroller)
pamScroller - scroller to addpublic void removePamScroller(AbstractPamScroller pamScroller)
pamScroller - scroller to remove
public abstract void moveInnerScroller(AbstractPamScroller scroller,
long newValue)
scroller - scroller that movednewValue - new value (time in milliseconds).
public abstract void moveOuterScroller(AbstractPamScroller scroller,
long newMin,
long newMax)
scroller - scroller that changednewMin - new data min value in millisnewMax - new data max value in millispublic abstract long checkMaximumTime(long requestedTime)
requestedTime - requested time in millis.
public abstract long checkMinimumTime(long requestedTime)
requestedTimerequested - time in millis.
public abstract void notifyModelChanged(int changeType)
public abstract void centreDataAt(PamDataBlock dataBlock,
long menuMouseTime)
menuMouseTime - time in milliseconds
public abstract void startDataAt(PamDataBlock dataBlock,
long menuMouseTime)
menuMouseTime - time in milliseconds
public ScrollerCoupling coupleScroller(AbstractPamScroller abstractPamScroller,
java.lang.String couplingName)
Scollers are coupled by name so that they don't necessarily need to find references to each other in the code. These names can be anything by measures should be taken to ensure that they are going to be unique, for example by using module names as part of the coupling name.
abstractPamScroller - scroller to couplecouplingName - coupling name
public void uncoupleScroller(AbstractPamScroller abstractPamScroller)
abstractPamScroller - scroller to uncouple
private ScrollerCoupling findCoupling(java.lang.String name,
boolean autoCreate)
name - name of couplingautoCreate - flag to automatically create a coupling if one isn't found.
public abstract void reLoad()
public javax.swing.JPopupMenu getStandardOptionsMenu(AbstractPamScroller pamSCroller)
public int isInGap(PamDataBlock dataBlock,
long timeMillis)
dataBlock - Pamguard data blocktimeMillis - time in milliseconds
public abstract long checkGapPos(AbstractPamScroller abstractPamScroller,
long oldMin,
long oldMax,
long newMin,
long newMax,
int direction)
abstractPamScroller - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||