1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.accessibility;
16 import org.eclipse.swt.internal.SWTEventListener;
19 * Classes which implement this interface provide methods
20 * that handle AccessibleValue events.
22 * After creating an instance of a class that implements
23 * this interface it can be added to an accessible using the
24 * <code>addAccessibleValueListener</code> method and removed using
25 * the <code>removeAccessibleValueListener</code> method.
28 * @see AccessibleValueAdapter
29 * @see AccessibleValueEvent
33 public interface AccessibleValueListener extends SWTEventListener {
35 * Returns the value of this object as a number.
37 * @param e an event object containing the following fields:<ul>
38 * <li>[out] value - the number that is the current value of this object</li>
41 public void getCurrentValue(AccessibleValueEvent e);
44 * Sets the value of this object to the given number.
46 * The argument is clipped to the valid interval whose upper and lower
47 * bounds are returned by getMaximumValue and getMinimumValue,
48 * i.e. if it is lower than the minimum value the new value will be the minimum,
49 * and if it is greater than the maximum then the new value will be the maximum.
51 * @param e an event object containing the following fields:<ul>
52 * <li>[in/out] value - on input, the number that will be the new value of this object
53 * <br>- on output, set to null if the value cannot be set</li>
56 public void setCurrentValue(AccessibleValueEvent e);
59 * Returns the maximum value that can be represented by this object.
61 * @param e an event object containing the following fields:<ul>
62 * <li>[out] value - the number that is the maximum value that this object can represent.
63 * If this object has no upper bound then null is returned.</li>
66 public void getMaximumValue(AccessibleValueEvent e);
69 * Returns the minimum value that can be represented by this object.
71 * @param e an event object containing the following fields:<ul>
72 * <li>[out] value - the number that is the minimum value that this object can represent.
73 * If this object has no lower bound then null is returned.</li>
76 public void getMinimumValue(AccessibleValueEvent e);