org.eclipse.swt.widgets.Button.getAccessible()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.eclipse.swt.widgets.Button.getAccessible()方法的一些代码示例,展示了Button.getAccessible()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getAccessible()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:getAccessible

Button.getAccessible介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

backButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {
nextButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

backButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {
nextButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

fButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new GridLayout());
    shell.setText("Accessible Name");

    Button button = new Button(shell, SWT.PUSH);
    button.setText("Button"); // the first button's accessible name is "Button"

    Image image = new Image(display, AccessibleNameExample.class.getResourceAsStream("run.gif"));
    button = new Button(shell, SWT.PUSH);
    button.setImage(image);
    button.getAccessible().addAccessibleListener(new AccessibleAdapter() {
      @Override
      public void getName(AccessibleEvent e) {
        e.result = "Running man"; // the second button's accessible name is "Running man"
      }
    });

    shell.pack();
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) display.sleep();
    }
    image.dispose();
    display.dispose();
  }
}

代码示例来源:origin: org.eclipse.ui.views/log

backButton.setToolTipText(Messages.EventDetailsDialog_previous);
backButton.setImage(SharedImages.getImage(SharedImages.DESC_PREV_EVENT));
backButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  public void getName(AccessibleEvent e) {
    e.result = Messages.EventDetailsDialog_previous;
copyButton.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_COPY));
copyButton.setToolTipText(Messages.EventDetailsDialog_copy);
copyButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  public void getName(AccessibleEvent e) {
    e.result = Messages.EventDetailsDialog_copy;
nextButton.setToolTipText(Messages.EventDetailsDialog_next);
nextButton.setImage(SharedImages.getImage(SharedImages.DESC_NEXT_EVENT));
nextButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  public void getName(AccessibleEvent e) {
    e.result = Messages.EventDetailsDialog_next;
button.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  public void getName(AccessibleEvent e) {
    e.result = Messages.EventDetailsDialog_FilterDialog;

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

checkBox.setData(data);
checkBox.addSelectionListener(getSelectionListener());
checkBox.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

private Button createFeatureButton(Composite parent,
    final AboutBundleGroupData info) {
  if (!buttonManager.add(info)) {
    return null;
  }
  ImageDescriptor desc = info.getFeatureImage();
  Image featureImage = null;
  Button button = new Button(parent, SWT.FLAT | SWT.PUSH);
  button.setData(info);
  featureImage = desc.createImage();
  images.add(featureImage);
  button.setImage(featureImage);
  button.setToolTipText(info.getProviderName());
  button.getAccessible().addAccessibleListener(new AccessibleAdapter(){
    @Override
    public void getName(AccessibleEvent e) {
      e.result = info.getProviderName();
    }
  });
  button.addSelectionListener(widgetSelectedAdapter(event -> {
    AboutBundleGroupData[] groupInfos = buttonManager.getRelatedInfos(info);
    AboutBundleGroupData selection = (AboutBundleGroupData) event.widget.getData();
    AboutFeaturesDialog d = new AboutFeaturesDialog(getShell(), productName, groupInfos, selection);
    d.open();
  }));
  return button;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

checkBox.setData(data);
checkBox.addSelectionListener(getSelectionListener());
checkBox.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

fButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

fButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
  @Override
  public void getName(AccessibleEvent e) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
  @Override
  public void getName (AccessibleEvent e) {
arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
  @Override
  public void getDefaultAction (AccessibleControlEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
  @Override
  public void getName (AccessibleEvent e) {
arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
  @Override
  public void getDefaultAction (AccessibleControlEvent e) {

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
  public void getName (AccessibleEvent e) {
    e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
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$

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
  @Override
  public void getName (AccessibleEvent e) {
arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
  @Override
  public void getDefaultAction (AccessibleControlEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
  @Override
  public void getName (AccessibleEvent e) {
arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
  @Override
  public void getDefaultAction (AccessibleControlEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

overrideButton.setToolTipText("Button ToolTip");
overrideButton.setData("name", "Button");
overrideButton.getAccessible().addAccessibleListener(overrideAccessibleAdapter);
overrideImageButton.setToolTipText("Image Button ToolTip");
overrideImageButton.setData("name", "Image Button");
overrideImageButton.getAccessible().addAccessibleListener(overrideAccessibleAdapter);

相关文章

Button类方法