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

x33g5p2x  于2022-01-30 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(151)

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

Scrollable.getShell介绍

暂无

代码示例

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 * 
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control)widget).getShell();
  if (widget instanceof Caret)
    return ((Caret)widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource)widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget)widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu)widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar)widget).getParent().getShell();
            
  return null;	
}

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 *
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control) widget).getShell();
  if (widget instanceof Caret)
    return ((Caret) widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource) widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget) widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu) widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar) widget).getParent().getShell();
  return null;
}

代码示例来源:origin: oyse/yedit

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 * 
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control)widget).getShell();
  if (widget instanceof Caret)
    return ((Caret)widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource)widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget)widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu)widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar)widget).getParent().getShell();
            
  return null;    
}

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent a
 * SWT object that manage a shell, <code>null</code> is returned.
 * 
 * @param widget
 *            the widget
 * 
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control) widget).getShell();
  if (widget instanceof Caret)
    return ((Caret) widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource) widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget) widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu) widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar) widget).getParent().getShell();
  return null;
}

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 * @param widget the widget
 *
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control)widget).getShell();
  if (widget instanceof Caret)
    return ((Caret)widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource)widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget)widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu)widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar)widget).getParent().getShell();
  return null;
}

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 * @param widget the widget
 *
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control)widget).getShell();
  if (widget instanceof Caret)
    return ((Caret)widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource)widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget)widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu)widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar)widget).getParent().getShell();
  return null;
}

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

/**
   * Returns the shell for the given widget. If the widget doesn't represent
   * a SWT object that manage a shell, <code>null</code> is returned.
   *
   * @return the shell for the given widget
   */
  public static Shell getShell(Widget widget) {
    if (widget instanceof Control)
      return ((Control) widget).getShell();
    if (widget instanceof Caret)
      return ((Caret) widget).getParent().getShell();
    if (widget instanceof DragSource)
      return ((DragSource) widget).getControl().getShell();
    if (widget instanceof DropTarget)
      return ((DropTarget) widget).getControl().getShell();
    if (widget instanceof Menu)
      return ((Menu) widget).getParent().getShell();
    if (widget instanceof ScrollBar)
      return ((ScrollBar) widget).getParent().getShell();

    return null;
  }
}

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 *
 * @param widget The widget to get the shell for
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control)widget).getShell();
  if (widget instanceof Caret)
    return ((Caret)widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource)widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget)widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu)widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar)widget).getParent().getShell();
            
  return null;	
}

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

/**
 * Returns the shell for the given widget. If the widget doesn't represent
 * a SWT object that manage a shell, <code>null</code> is returned.
 *
 * @param widget The widget to get the shell for
 * @return the shell for the given widget
 */
public static Shell getShell(Widget widget) {
  if (widget instanceof Control)
    return ((Control)widget).getShell();
  if (widget instanceof Caret)
    return ((Caret)widget).getParent().getShell();
  if (widget instanceof DragSource)
    return ((DragSource)widget).getControl().getShell();
  if (widget instanceof DropTarget)
    return ((DropTarget)widget).getControl().getShell();
  if (widget instanceof Menu)
    return ((Menu)widget).getParent().getShell();
  if (widget instanceof ScrollBar)
    return ((ScrollBar)widget).getParent().getShell();
  return null;
}

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

/**
   * Returns the shell for the given widget. If the widget doesn't represent
   * a SWT object that manage a shell, <code>null</code> is returned.
   *
   * @return the shell for the given widget
   */
  public static Shell getShell(Widget widget) {
    if (widget instanceof Control)
      return ((Control) widget).getShell();
    if (widget instanceof Caret)
      return ((Caret) widget).getParent().getShell();
    if (widget instanceof DragSource)
      return ((DragSource) widget).getControl().getShell();
    if (widget instanceof DropTarget)
      return ((DropTarget) widget).getControl().getShell();
    if (widget instanceof Menu)
      return ((Menu) widget).getParent().getShell();
    if (widget instanceof ScrollBar)
      return ((ScrollBar) widget).getParent().getShell();

    return null;
  }
}

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

void sendSelection () {
  NSWindow window = view.window ();
  if (target == null) parent.getShell().deferFlushing();
  int value = 0;
  if (target != null) {

相关文章

Scrollable类方法