/*
  * Fix for Bug 60163 Accessibility: New Builder Dialog missing object info
  * for textInput controls
  */
 public void addControlAccessibleListener(Control control, String controlName) {
   // strip mnemonic (&)
   String[] strs = controlName.split("&"); // $NON-NLS-1$
   StringBuffer stripped = new StringBuffer();
   for (String element : strs) {
     stripped.append(element);
   }
   control
       .getAccessible()
       .addAccessibleListener(new ControlAccessibleListener(stripped.toString()));
 }
Exemplo n.º 2
0
 /**
  * Adds an accessibility listener returning the given fixed name.
  *
  * @param control the control to add the accessibility support to
  * @param text the name
  */
 public static void setAccessibilityText(Control control, final String text) {
   control
       .getAccessible()
       .addAccessibleListener(
           new AccessibleAdapter() {
             @Override
             public void getName(AccessibleEvent e) {
               e.result = text;
             }
           });
 }
Exemplo n.º 3
0
 public void addControlAccessibleListener(Control control, String controlName) {
   control.getAccessible().addAccessibleListener(new ControlAccessibleListener(controlName));
 }