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

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

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

Button.isVisible介绍

暂无

代码示例

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

boolean traverseReturn () {
  if (defaultButton == null || defaultButton.isDisposed ()) return false;
  if (!defaultButton.isVisible () || !defaultButton.isEnabled ()) return false;
  defaultButton.click ();
  return true;
}

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

private static boolean hasSelectionListener( final Text text ) {
 // Emulate SWT (on Windows) where a default button takes precedence over
 // a SelectionListener on a text field when both are on the same shell.
 Button defButton = text.getShell().getDefaultButton();
 // TODO [rst] On GTK, the SelectionListener is also off when the default
 //      button is invisible or disabled. Check with Windows and repair.
 boolean hasDefaultButton = defButton != null && defButton.isVisible();
 return !hasDefaultButton && SelectionEvent.hasListener( text );
}

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

@Override
boolean traverseReturn () {
  if (defaultButton == null || defaultButton.isDisposed ()) return false;
  if (!defaultButton.isVisible () || !defaultButton.isEnabled ()) return false;
  defaultButton.click ();
  return true;
}

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

@Override
boolean traverseReturn () {
  Button button = defaultButton != null ? defaultButton: saveDefault;
  if (button == null || button.isDisposed ()) return false;
  /*
  * Bug in GTK.  When a default button that is disabled is
  * activated using the Enter key, GTK GP's.  The fix is to
  * detect this case and stop GTK from processing the Enter
  * key.
  */
  if (!button.isVisible () || !button.isEnabled ()) return true;
  int /*long*/ shellHandle = _getShell ().topHandle ();
  return OS.gtk_window_activate_default (shellHandle);
}

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

@Override
boolean traverseReturn () {
  Button button = defaultButton != null ? defaultButton: saveDefault;
  if (button == null || button.isDisposed ()) return false;
  /*
  * Bug in GTK.  When a default button that is disabled is
  * activated using the Enter key, GTK GP's.  The fix is to
  * detect this case and stop GTK from processing the Enter
  * key.
  */
  if (!button.isVisible () || !button.isEnabled ()) return true;
  long /*int*/ shellHandle = _getShell ().topHandle ();
  return OS.gtk_window_activate_default (shellHandle);
}

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

@Override
boolean traverseReturn () {
  Button button = defaultButton != null ? defaultButton: saveDefault;
  if (button == null || button.isDisposed ()) return false;
  /*
  * Bug in GTK.  When a default button that is disabled is
  * activated using the Enter key, GTK GP's.  The fix is to
  * detect this case and stop GTK from processing the Enter
  * key.
  */
  if (!button.isVisible () || !button.isEnabled ()) return true;
  int /*long*/ shellHandle = _getShell ().topHandle ();
  return OS.gtk_window_activate_default (shellHandle);
}

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public void updateUI() {
  boolean bTorrentInClipboard = false;
  Clipboard clipboard = new Clipboard(Display.getDefault());
  String sClipText = (String) clipboard.getContents(TextTransfer.getInstance());
  if (sClipText != null)
    bTorrentInClipboard = addTorrentsFromTextList(sClipText, true) > 0;
  if (btnPasteOpen != null && !btnPasteOpen.isDisposed()
      && btnPasteOpen.isVisible() != bTorrentInClipboard) {
    btnPasteOpen.setVisible(bTorrentInClipboard);
    if (bTorrentInClipboard) {
      Utils.setTT(btnPasteOpen,sClipText);
    }
  }
  clipboard.dispose();
}

相关文章

微信公众号

最新文章

更多

Button类方法