1 /*
2 * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
401 }
402 adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l);
403 }
404
405 /**
406 * Returns an array of all the adjustment listeners
407 * registered on this <code>ScrollPaneAdjustable</code>.
408 *
409 * @return all of this <code>ScrollPaneAdjustable</code>'s
410 * <code>AdjustmentListener</code>s
411 * or an empty array if no adjustment
412 * listeners are currently registered
413 *
414 * @see #addAdjustmentListener
415 * @see #removeAdjustmentListener
416 * @see java.awt.event.AdjustmentListener
417 * @see java.awt.event.AdjustmentEvent
418 * @since 1.4
419 */
420 public synchronized AdjustmentListener[] getAdjustmentListeners() {
421 return (AdjustmentListener[])(AWTEventMulticaster.getListeners(
422 adjustmentListener,
423 AdjustmentListener.class));
424 }
425
426 /**
427 * Returns a string representation of this scrollbar and its values.
428 * @return a string representation of this scrollbar.
429 */
430 public String toString() {
431 return getClass().getName() + "[" + paramString() + "]";
432 }
433
434 /**
435 * Returns a string representing the state of this scrollbar.
436 * This method is intended to be used only for debugging purposes,
437 * and the content and format of the returned string may vary
438 * between implementations. The returned string may be empty but
439 * may not be <code>null</code>.
440 *
441 * @return the parameter string of this scrollbar.
442 */
443 public String paramString() {
|
1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
401 }
402 adjustmentListener = AWTEventMulticaster.remove(adjustmentListener, l);
403 }
404
405 /**
406 * Returns an array of all the adjustment listeners
407 * registered on this <code>ScrollPaneAdjustable</code>.
408 *
409 * @return all of this <code>ScrollPaneAdjustable</code>'s
410 * <code>AdjustmentListener</code>s
411 * or an empty array if no adjustment
412 * listeners are currently registered
413 *
414 * @see #addAdjustmentListener
415 * @see #removeAdjustmentListener
416 * @see java.awt.event.AdjustmentListener
417 * @see java.awt.event.AdjustmentEvent
418 * @since 1.4
419 */
420 public synchronized AdjustmentListener[] getAdjustmentListeners() {
421 return AWTEventMulticaster.getListeners(adjustmentListener,
422 AdjustmentListener.class);
423 }
424
425 /**
426 * Returns a string representation of this scrollbar and its values.
427 * @return a string representation of this scrollbar.
428 */
429 public String toString() {
430 return getClass().getName() + "[" + paramString() + "]";
431 }
432
433 /**
434 * Returns a string representing the state of this scrollbar.
435 * This method is intended to be used only for debugging purposes,
436 * and the content and format of the returned string may vary
437 * between implementations. The returned string may be empty but
438 * may not be <code>null</code>.
439 *
440 * @return the parameter string of this scrollbar.
441 */
442 public String paramString() {
|