|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectpamScrollSystem.ScrollerCoupling
public class ScrollerCoupling
A class for coupling two or more scrollers.
Coupled scrollers will move together - when one moves, the others move.
| Field Summary | |
|---|---|
protected java.lang.String |
name
|
private boolean |
notificationLock
lock to stop looping of calls to the notifyOthers function. |
private java.util.Vector<AbstractPamScroller> |
scrollers
|
| Constructor Summary | |
|---|---|
ScrollerCoupling(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
addScroller(AbstractPamScroller aScroller)
Add a new scroller to the coupling |
int |
getScrollerCount()
|
void |
notifyOthers(AbstractPamScroller scroller)
Notify other scrollers in the set that a scroller has changed then pass them a reference to the changed scroller so that they can copy information from it. |
boolean |
removeScroller(AbstractPamScroller aScroller)
Remove a scroller form a coupling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
private java.util.Vector<AbstractPamScroller> scrollers
private boolean notificationLock
| Constructor Detail |
|---|
public ScrollerCoupling(java.lang.String name)
| Method Detail |
|---|
public void addScroller(AbstractPamScroller aScroller)
aScroller - public void notifyOthers(AbstractPamScroller scroller)
This function holds a lock since as soon as another scroller is changed, it's likely to call back to this same function and set up an infinite loop. The lock will exit the function if set to avoid this situation.
scroller - scroller which changes.public boolean removeScroller(AbstractPamScroller aScroller)
aScroller -
public int getScrollerCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||