1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package net.sf.xframe.swing.scroll;
22
23 import javax.swing.JComponent;
24
25 /***
26 * Binds horizontal scrollbars of two or more components.
27 *
28 * <p>All added components must have a
29 * <code>getHorizonzalScrollbar()</code> method that returns a
30 * <code>JScrollBar</code> object.</p>
31 *
32 * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
33 */
34 public final class HScrollBinder extends AbstractScrollBinder {
35
36 /***
37 * Contructor.
38 */
39 public HScrollBinder() {
40 super();
41 }
42
43 /***
44 * Adds a horizonal scrollable component to the horizontal scrolling binder.
45 *
46 * <p>The component can be a <code>JScrollPane</code> or any other instance
47 * of a class that has a method
48 * <code>getHorizontalScrollBar()</code>.</p>
49 *
50 * @param component a scroll-enabled component
51 * @see net.sf.xframe.swing.scroll.AbstractScrollBinder#add(javax.swing.JComponent)
52 */
53 public void add(final JComponent component) {
54 add(component, "getHorizontalScrollBar");
55 }
56
57 /***
58 * @see net.sf.xframe.swing.scroll.AbstractScrollBinder#remove(javax.swing.JComponent)
59 */
60 public void remove(final JComponent component) {
61 remove(component, "getHorizontalScrollBar");
62 }
63 }