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

x33g5p2x  于2022-01-18 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(177)

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

Canvas.dispose介绍

暂无

代码示例

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

public void dispose() {
    // Dispose the control's resources (we don't have to dispose the
    // 'bacseColor' because it's a system color
    hilightColor.dispose();

    caretControl.dispose();
    end1.dispose();
    end2.dispose();
  }
}

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

/**
 * Dispose the controls owned by the border.
 */
public void dispose() {
  hilightColor.dispose();
  border.dispose();
}

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

public void dispose() {
  if(canvas != null && !canvas.isDisposed()) {
    canvas.dispose();
  }
}

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

/**
 * Dispose the frame
 */
private void dispose() {
  if (canvas != null && !canvas.isDisposed())
    canvas.dispose();
}

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

@Override
  public void dispose() {
    super.dispose();
    image.dispose();
  }
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/**
@Override
public boolean forceFocus() {
  final boolean r = super.forceFocus();
  if(r && 0 != gdkWindow) {
    SWTGTKUtil.focusGDKWindow(gdkWindow);
  }
  return r;
} */
@Override
public void dispose() {
 runInGLThread(disposeOnEDTGLAction);
 super.dispose();
}

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

/**
 * Disposes this ruler column.
 * <p>
 * Subclasses may extend this method.</p>
 * <p>
 * Clients who created this column are responsible to call this method
 * once the column is no longer used.</p>
 */
public void dispose() {
  if (fTextViewer != null) {
    fTextViewer.removeViewportListener(fInternalListener);
    fTextViewer.removeTextListener(fInternalListener);
    fTextViewer= null;
  }
  if (fStyledText != null)
    fStyledText= null;
  if (fCanvas != null) {
    fCanvas.dispose();
    fCanvas= null;
  }
}

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

/**
 * Disposes this ruler column.
 * <p>
 * Subclasses may extend this method.</p>
 * <p>
 * Clients who created this column are responsible to call this method
 * once the column is no longer used.</p>
 */
public void dispose() {
  if (fTextViewer != null) {
    fTextViewer.removeViewportListener(fInternalListener);
    fTextViewer.removeTextListener(fInternalListener);
    fTextViewer= null;
  }
  if (fStyledText != null)
    fStyledText= null;
  if (fCanvas != null) {
    fCanvas.dispose();
    fCanvas= null;
  }
}

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

void recreateCanvas() {
  if (dbItem.getSelection() == ((canvas.getStyle() & SWT.DOUBLE_BUFFERED) != 0)) return;
  Object data = canvas.getLayoutData();
  if (canvas != null) canvas.dispose();
  createCanvas(parent);
  canvas.setLayoutData(data);
  parent.layout(true, true);
}

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

@Override
public void dispose() {
  /*
   * Note: It is valid to attempt to dispose a widget more than once.
   * Added check for this.
   */
  if (!isDisposed()) {
    acc.removeAccessibleControlListener(accControlAdapter);
    acc.removeAccessibleAttributeListener(accAttributeAdapter);
    acc.removeAccessibleEditableTextListener(accEditableTextListener);
    acc.removeAccessibleTextListener(accTextExtendedAdapter);
    acc.removeAccessibleListener(accAdapter);
  }
  super.dispose();
}

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

@Override
public void dispose() {
  /*
   * Note: It is valid to attempt to dispose a widget more than once.
   * Added check for this.
   */
  if (!isDisposed()) {
    acc.removeAccessibleControlListener(accControlAdapter);
    acc.removeAccessibleAttributeListener(accAttributeAdapter);
    acc.removeAccessibleEditableTextListener(accEditableTextListener);
    acc.removeAccessibleTextListener(accTextExtendedAdapter);
    acc.removeAccessibleListener(accAdapter);
  }
  super.dispose();
}

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

@Override
public void dispose() {
  /*
   * Note: It is valid to attempt to dispose a widget more than once.
   * Added check for this.
   */
  if (!isDisposed()) {
    acc.removeAccessibleControlListener(accControlAdapter);
    acc.removeAccessibleAttributeListener(accAttributeAdapter);
    acc.removeAccessibleEditableTextListener(accEditableTextListener);
    acc.removeAccessibleTextListener(accTextExtendedAdapter);
    acc.removeAccessibleListener(accAdapter);
  }
  super.dispose();
}

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

@Override
public void dispose() {
  /*
   * Note: It is valid to attempt to dispose a widget more than once.
   * Added check for this.
   */
  if (!isDisposed()) {
    acc.removeAccessibleControlListener(accControlAdapter);
    acc.removeAccessibleAttributeListener(accAttributeAdapter);
    acc.removeAccessibleEditableTextListener(accEditableTextListener);
    acc.removeAccessibleTextListener(accTextExtendedAdapter);
    acc.removeAccessibleListener(accAdapter);
  }
  super.dispose();
}

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

@Override
public void dispose () {
  if (isDisposed()) return;
  if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
  if (!(this instanceof Shell)) {
    if (!traverseDecorations (true)) {
      Shell shell = getShell ();
      shell.setFocus ();
    }
    setVisible (false);
  }
  super.dispose ();
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/**
 * Destroys this resource:
 * <ul>
 *   <li> Make the NEWT Child invisible </li>
 *   <li> Disconnects the NEWT Child from this Canvas NativeWindow, reparent to NULL </li>
 *   <li> Issues <code>destroy()</code> on the NEWT Child</li>
 *   <li> Remove reference to the NEWT Child</li>
 * </ul>
 * @see Window#destroy()
 */
@Override
public void dispose() {
  if( null != newtChild ) {
    if(DEBUG) {
      System.err.println("NewtCanvasSWT.dispose.0: EDTUtil cur "+newtChild.getScreen().getDisplay().getEDTUtil()+
                ",\n\t"+newtChild);
    }
    configureNewtChild(false);
    newtChild.setVisible(false);
    newtChild.reparentWindow(null, -1, -1, 0 /* hint */);
    newtChild.destroy();
    newtChild = null;
  }
  screen.getDevice().close();
  nativeWindow = null;
  super.dispose();
}

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

public void initShell(){
  if(shell != null && shell.isDisposed() == false){
    canvas.dispose();

相关文章

Canvas类方法