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

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

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

Shell.getLayout介绍

暂无

代码示例

代码示例来源:origin: org.xworker/xworker_swt

public boolean checkLayout(Shell parent){
  if(parent.getLayout() == null){
    DesignTools.showErrorMessage("lang:d=Composite还未设置布局,请先设置布局。" +
        "&en=Composite has not a layout, please set it first.");
    return false;
  }else{
    return true;
  }
}

代码示例来源:origin: org.eclipse.e4.ui.workbench.addons/swt

Composite getShellClientComposite() {
  if (trimStackTB == null || trimStackTB.isDisposed()) {
    return null;
  }
  Shell theShell = trimStackTB.getShell();
  if (!(theShell.getLayout() instanceof TrimmedPartLayout))
    return null;
  TrimmedPartLayout tpl = (TrimmedPartLayout) theShell.getLayout();
  return tpl.clientArea;
}

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

private Composite getCAComposite() {
  if (trimStackTB == null) {
    return null;
  }
  // Get the shell's client area composite
  Shell theShell = trimStackTB.getShell();
  if (theShell.getLayout() instanceof TrimmedPartLayout) {
    TrimmedPartLayout tpl = (TrimmedPartLayout) theShell.getLayout();
    if (!tpl.clientArea.isDisposed()) {
      return tpl.clientArea;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.e4.ui.workbench.addons/swt

private SideValue getDropSide(DnDInfo info) {
  Shell ds = dndManager.getDragShell();
  if (ds.getLayout() instanceof TrimmedPartLayout) {
    TrimmedPartLayout tpl = (TrimmedPartLayout) ds.getLayout();
    if (tpl.getTrimRect(SWT.TOP).contains(info.cursorPos))
      return SideValue.TOP;
    if (tpl.getTrimRect(SWT.BOTTOM).contains(info.cursorPos))
      return SideValue.BOTTOM;
    if (tpl.getTrimRect(SWT.LEFT).contains(info.cursorPos))
      return SideValue.LEFT;
    if (tpl.getTrimRect(SWT.RIGHT).contains(info.cursorPos))
      return SideValue.RIGHT;
  }
  return null;
}

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

private SideValue getDropSide(DnDInfo info) {
  Shell ds = dndManager.getDragShell();
  if (ds.getLayout() instanceof TrimmedPartLayout) {
    TrimmedPartLayout tpl = (TrimmedPartLayout) ds.getLayout();
    if (tpl.getTrimRect(SWT.TOP).contains(info.cursorPos)) {
      return SideValue.TOP;
    }
    if (tpl.getTrimRect(SWT.BOTTOM).contains(info.cursorPos)) {
      return SideValue.BOTTOM;
    }
    if (tpl.getTrimRect(SWT.LEFT).contains(info.cursorPos)) {
      return SideValue.LEFT;
    }
    if (tpl.getTrimRect(SWT.RIGHT).contains(info.cursorPos)) {
      return SideValue.RIGHT;
    }
  }
  return null;
}

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

throw new IllegalStateException("Tray was already open"); //$NON-NLS-1$
if (!isCompatibleLayout(getShell().getLayout())) {
  throw new UnsupportedOperationException("Trays not supported with custom layouts"); //$NON-NLS-1$

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

throw new IllegalStateException("Tray was already open"); //$NON-NLS-1$
if (!isCompatibleLayout(getShell().getLayout())) {
  throw new UnsupportedOperationException("Trays not supported with custom layouts"); //$NON-NLS-1$

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

throw new IllegalStateException("Tray was already open"); //$NON-NLS-1$
if (!isCompatibleLayout(getShell().getLayout())) {
  throw new UnsupportedOperationException("Trays not supported with custom layouts"); //$NON-NLS-1$

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

TrimmedPartLayout tpl = (TrimmedPartLayout) getShell().getLayout();
disableControl(tpl.clientArea, toEnable);
disableControl(tpl.top, toEnable);

相关文章

微信公众号

最新文章

更多

Shell类方法