Package org.eclipse.swt.accessibility

Examples of org.eclipse.swt.accessibility.AccessibleControlAdapter


        e.result = getToolTipText();
      }
     
    });
   
    accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
      public void getChildAtPoint(AccessibleControlEvent e) {
        e.childID = ACC.CHILDID_SELF;
      }
     
      public void getLocation(AccessibleControlEvent e) {
View Full Code Here


      public void getCaretOffset (AccessibleTextEvent e) {
        e.offset = text.getCaretPosition ();
      }
    });

    getAccessible().addAccessibleControlListener (new AccessibleControlAdapter() {
      public void getChildAtPoint (AccessibleControlEvent e) {
        Point testPoint = toControl (e.x, e.y);
        if (getBounds ().contains (testPoint)) {
          e.childID = ACC.CHILDID_SELF;
        }
      }

      public void getLocation (AccessibleControlEvent e) {
        Rectangle location = getBounds ();
        Point pt = toDisplay (location.x, location.y);
        e.x = pt.x;
        e.y = pt.y;
        e.width = location.width;
        e.height = location.height;
      }

      public void getChildCount (AccessibleControlEvent e) {
        e.detail = 0;
      }

      public void getRole (AccessibleControlEvent e) {
        e.detail = ACC.ROLE_COMBOBOX;
      }

      public void getState (AccessibleControlEvent e) {
        e.detail = ACC.STATE_NORMAL;
      }

      public void getValue (AccessibleControlEvent e) {
        e.result = getText ();
      }
    });

    text.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter () {
      public void getRole (AccessibleControlEvent e) {
        e.detail = text.getEditable () ? ACC.ROLE_TEXT : ACC.ROLE_LABEL;
      }
    });

    arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
      public void getDefaultAction (AccessibleControlEvent e) {
        e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
      }
    });
  }
View Full Code Here

      public void getHelp(AccessibleEvent e) {
        e.result = getToolTipText();
      }
    });
    accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
      public void getChildAtPoint(AccessibleControlEvent e) {
        Point pt = toControl(new Point(e.x, e.y));
        e.childID = (getBounds().contains(pt)) ? ACC.CHILDID_SELF
            : ACC.CHILDID_NONE;
      }
View Full Code Here

        }
        e.result = shortcut;
      }
    });
   
    accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
      public void getChildAtPoint(AccessibleControlEvent e) {
        Point testPoint = toControl(e.x, e.y);
        int childID = ACC.CHILDID_NONE;
        for (int i = 0; i < items.length; i++) {
          if (items[i].getBounds().contains(testPoint)) {
View Full Code Here

            public void getCaretOffset(AccessibleTextEvent e) {
                e.offset = text.getCaretPosition();
            }
        });

        getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
            public void getChildAtPoint(AccessibleControlEvent e) {
                Point testPoint = toControl(new Point(e.x, e.y));
                if (getBounds().contains(testPoint)) {
                    e.childID = ACC.CHILDID_SELF;
                }
            }

            public void getLocation(AccessibleControlEvent e) {
                Rectangle location = getBounds();
                Point pt = toDisplay(new Point(location.x, location.y));
                e.x = pt.x;
                e.y = pt.y;
                e.width = location.width;
                e.height = location.height;
            }

            public void getChildCount(AccessibleControlEvent e) {
                e.detail = 0;
            }

            public void getRole(AccessibleControlEvent e) {
                e.detail = ACC.ROLE_COMBOBOX;
            }

            public void getState(AccessibleControlEvent e) {
                e.detail = ACC.STATE_NORMAL;
            }

            public void getValue(AccessibleControlEvent e) {
                e.result = getText();
            }
        });

        text.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
            public void getRole(AccessibleControlEvent e) {
                e.detail = text.getEditable()
                        ? ACC.ROLE_TEXT
                        : ACC.ROLE_LABEL;
            }
        });

        arrow.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
            public void getDefaultAction(AccessibleControlEvent e) {
                e.result = isDropped()
                        ? "Close" : "Open"; //$NON-NLS-1$ //$NON-NLS-2$

            }
View Full Code Here

      e.offset = sel.x;
      e.length = sel.y - sel.x;
    }
  });
 
  getAccessible().addAccessibleControlListener (new AccessibleControlAdapter() {
    public void getChildAtPoint (AccessibleControlEvent e) {
      Point testPoint = toControl (e.x, e.y);
      if (getBounds ().contains (testPoint)) {
        e.childID = ACC.CHILDID_SELF;
      }
    }
   
    public void getLocation (AccessibleControlEvent e) {
      Rectangle location = getBounds ();
      Point pt = getParent().toDisplay (location.x, location.y);
      e.x = pt.x;
      e.y = pt.y;
      e.width = location.width;
      e.height = location.height;
    }
   
    public void getChildCount (AccessibleControlEvent e) {
      e.detail = 0;
    }
   
    public void getRole (AccessibleControlEvent e) {
      e.detail = ACC.ROLE_COMBOBOX;
    }
   
    public void getState (AccessibleControlEvent e) {
      e.detail = ACC.STATE_NORMAL;
    }

    public void getValue (AccessibleControlEvent e) {
      e.result = getText ();
    }
  });

  text.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter () {
    public void getRole (AccessibleControlEvent e) {
      e.detail = text.getEditable () ? ACC.ROLE_TEXT : ACC.ROLE_LABEL;
    }
  });

  arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
    public void getDefaultAction (AccessibleControlEvent e) {
      e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
    }
  });
}
View Full Code Here

          IHyperlinkSegment link = model.getHyperlink(e.childID);
          e.result = link.getText();
        }
      }
    });
    accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
      public void getChildAtPoint(AccessibleControlEvent e) {
        Point pt = toControl(new Point(e.x, e.y));
        IHyperlinkSegment link = model.findHyperlinkAt(pt.x, pt.y);
        if (link != null)
          e.childID = model.indexOf(link);
View Full Code Here

          IHyperlinkSegment link = model.getHyperlink(e.childID);
          e.result = link.getText();
        }
      }
    });
    accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
      public void getChildAtPoint(AccessibleControlEvent e) {
        Point pt = toControl(new Point(e.x, e.y));
        IHyperlinkSegment link = model.findHyperlinkAt(pt.x, pt.y);
        if (link != null)
          e.childID = model.indexOf(link);
View Full Code Here

                            .getText();
                }
            }
        });

        accessible.addAccessibleControlListener(new AccessibleControlAdapter() {

            public void getChildAtPoint(AccessibleControlEvent e) {
                Point pt = toControl(new Point(e.x, e.y));
                e.childID = (getBounds().contains(pt)) ? ACC.CHILDID_SELF
                    : ACC.CHILDID_NONE;
View Full Code Here

                e.offset = sel.x;
                e.length = sel.y - sel.x;
            }
        });

        getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
            public void getChildAtPoint(AccessibleControlEvent e) {
                Point testPoint = toControl(e.x, e.y);
                if (getBounds().contains(testPoint)) {
                    e.childID = ACC.CHILDID_SELF;
                }
            }

            public void getLocation(AccessibleControlEvent e) {
                Rectangle location = getBounds();
                Point pt = getParent().toDisplay(location.x, location.y);
                e.x = pt.x;
                e.y = pt.y;
                e.width = location.width;
                e.height = location.height;
            }

            public void getChildCount(AccessibleControlEvent e) {
                e.detail = 0;
            }

            public void getRole(AccessibleControlEvent e) {
                e.detail = ACC.ROLE_COMBOBOX;
            }

            public void getState(AccessibleControlEvent e) {
                e.detail = ACC.STATE_NORMAL;
            }

            public void getValue(AccessibleControlEvent e) {
                e.result = text.getText();
            }
        });

        text.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
            public void getRole(AccessibleControlEvent e) {
                e.detail = text.getEditable() ? ACC.ROLE_TEXT : ACC.ROLE_LABEL;
            }
        });

        arrow.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
            public void getDefaultAction(AccessibleControlEvent e) {
                e.result = isDropped() ? SWT.getMessage("SWT_Close") : SWT.getMessage("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.accessibility.AccessibleControlAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.