01: package org.wings.event;
02:
03: import java.util.EventObject;
04:
05: import org.wings.Scrollable;
06:
07: /**
08: * SViewportChangeEvent is used to notify interested parties that the viewport
09: * of a Scrollable (the source) has changed either horizontally or vertically.
10: *
11: * @author Stephan Schuster
12: */
13: public class SViewportChangeEvent extends EventObject {
14:
15: private boolean horizontalChange;
16:
17: /**
18: * Constructs a SViewportChangeEvent object.
19: *
20: * @param source the Scrollable which is the source of the event
21: * @param horizontalChange the direction in of the viewport change
22: */
23: public SViewportChangeEvent(Scrollable source,
24: boolean horizontalChange) {
25: super (source);
26: this .horizontalChange = horizontalChange;
27: }
28:
29: /**
30: * Returns true in case of a vertical change.
31: *
32: * @return true, if the Scrollable's viewport changed horizontally
33: * - false if the Scrollable's viewport changed vertically
34: */
35: public boolean isHorizontalChange() {
36: return horizontalChange;
37: }
38: }
|