All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.swt.accessibility.AccessibleActionListener Maven / Gradle / Ivy

Go to download

SWT is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.

The newest version!
/*******************************************************************************
 * Copyright (c) 2009, 2010 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.accessibility;

import org.eclipse.swt.internal.SWTEventListener;

/**
 * Classes which implement this interface provide methods
 * that handle AccessibleAction events.
 * 

* After creating an instance of a class that implements * this interface it can be added to an accessible using the * addAccessibleActionListener method and removed using * the removeAccessibleActionListener method. *

* * @see AccessibleActionAdapter * @see AccessibleActionEvent * * @since 3.6 */ public interface AccessibleActionListener extends SWTEventListener { /** * Returns the number of accessible actions available in this object. *

* If there are more than one, the first one (index 0) is considered the * "default" action of the object. *

* * @param e an event object containing the following fields:
    *
  • [out] count - the number of actions, or zero if there are no actions
  • *
*/ public void getActionCount(AccessibleActionEvent e); /** * Performs the specified action on the object. * * @param e an event object containing the following fields:
    *
  • [in] index - a 0 based index specifying the action to perform. * If the index lies outside the valid range no action is performed.
  • *
  • [out] result - set to {@link ACC#OK} if the action was performed.
  • *
*/ public void doAction(AccessibleActionEvent e); /** * Returns a description of the specified action. * * @param e an event object containing the following fields:
    *
  • [in] index - a 0 based index specifying which action's description to return
  • *
  • [out] result - a localized string describing the specified action, * or null if the index lies outside the valid range
  • *
*/ public void getDescription(AccessibleActionEvent e); /** * Returns a string representing one or more key bindings, if there * are any, associated with the specified action. *

* The returned string is of the following form: mnemonic;accelerator * for example: "C;CTRL+C" for the Copy item in a typical Edit menu. *

* * @param e an event object containing the following fields:
    *
  • [in] index - a 0 based index specifying which action's key bindings to return
  • *
  • [out] result - a semicolon-delimited string of localized key bindings * (example: "C;CTRL+C"), or null if the index lies outside the valid range
  • *
*/ public void getKeyBinding(AccessibleActionEvent e); /** * Returns the name of the specified action. *

* There is no need to implement this method for single action controls * since that would be redundant with AccessibleControlListener.getDefaultAction. *

* * @param e an event object containing the following fields:
    *
  • [in] index - a 0 based index specifying which action's name to return
  • *
  • [in] localized - a boolean indicating whether or not to return a localized name
  • *
  • [out] result - the name of the specified action, * or null if the index lies outside the valid range
  • *
*/ public void getName(AccessibleActionEvent e); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy