995 if (l == null) {
996 return;
997 }
998 adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l);
999 }
1000
1001 /**
1002 * Returns an array of all the adjustment listeners
1003 * registered on this scrollbar.
1004 *
1005 * @return all of this scrollbar's <code>AdjustmentListener</code>s
1006 * or an empty array if no adjustment
1007 * listeners are currently registered
1008 * @see #addAdjustmentListener
1009 * @see #removeAdjustmentListener
1010 * @see java.awt.event.AdjustmentEvent
1011 * @see java.awt.event.AdjustmentListener
1012 * @since 1.4
1013 */
1014 public synchronized AdjustmentListener[] getAdjustmentListeners() {
1015 return (AdjustmentListener[])(getListeners(AdjustmentListener.class));
1016 }
1017
1018 /**
1019 * Returns an array of all the objects currently registered
1020 * as <code><em>Foo</em>Listener</code>s
1021 * upon this <code>Scrollbar</code>.
1022 * <code><em>Foo</em>Listener</code>s are registered using the
1023 * <code>add<em>Foo</em>Listener</code> method.
1024 * <p>
1025 * You can specify the <code>listenerType</code> argument
1026 * with a class literal, such as
1027 * <code><em>Foo</em>Listener.class</code>.
1028 * For example, you can query a
1029 * <code>Scrollbar</code> <code>c</code>
1030 * for its mouse listeners with the following code:
1031 *
1032 * <pre>MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class));</pre>
1033 *
1034 * If no such listeners exist, this method returns an empty array.
1035 *
|
995 if (l == null) {
996 return;
997 }
998 adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l);
999 }
1000
1001 /**
1002 * Returns an array of all the adjustment listeners
1003 * registered on this scrollbar.
1004 *
1005 * @return all of this scrollbar's <code>AdjustmentListener</code>s
1006 * or an empty array if no adjustment
1007 * listeners are currently registered
1008 * @see #addAdjustmentListener
1009 * @see #removeAdjustmentListener
1010 * @see java.awt.event.AdjustmentEvent
1011 * @see java.awt.event.AdjustmentListener
1012 * @since 1.4
1013 */
1014 public synchronized AdjustmentListener[] getAdjustmentListeners() {
1015 return getListeners(AdjustmentListener.class);
1016 }
1017
1018 /**
1019 * Returns an array of all the objects currently registered
1020 * as <code><em>Foo</em>Listener</code>s
1021 * upon this <code>Scrollbar</code>.
1022 * <code><em>Foo</em>Listener</code>s are registered using the
1023 * <code>add<em>Foo</em>Listener</code> method.
1024 * <p>
1025 * You can specify the <code>listenerType</code> argument
1026 * with a class literal, such as
1027 * <code><em>Foo</em>Listener.class</code>.
1028 * For example, you can query a
1029 * <code>Scrollbar</code> <code>c</code>
1030 * for its mouse listeners with the following code:
1031 *
1032 * <pre>MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class));</pre>
1033 *
1034 * If no such listeners exist, this method returns an empty array.
1035 *
|