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

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

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

Canvas.getStyle介绍

暂无

代码示例

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

@Override
public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.swt

public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

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

@Override
public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

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

@Override
public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

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

public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.swt

public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

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

@Override
public int getStyle () {
  int style = super.getStyle();
  switch (align) {
    case SWT.RIGHT: style |= SWT.RIGHT; break;
    case SWT.CENTER: style |= SWT.CENTER; break;
    case SWT.LEFT: style |= SWT.LEFT; break;
  }
  return style;
}

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

@Override
public int getStyle() {
 int style = super.getStyle();
 switch (align) {
 case SWT.RIGHT:
  style |= SWT.RIGHT;
  break;
 case SWT.CENTER:
  style |= SWT.CENTER;
  break;
 case SWT.LEFT:
  style |= SWT.LEFT;
  break;
 }
 return style;
}

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

/**
   * Sets the state of the "Example" widgets.
   */
  @Override
  void setExampleWidgetState () {
    super.setExampleWidgetState ();
    horizontalButton.setSelection ((canvas.getStyle () & SWT.H_SCROLL) != 0);
    verticalButton.setSelection ((canvas.getStyle () & SWT.V_SCROLL) != 0);
    borderButton.setSelection ((canvas.getStyle () & SWT.BORDER) != 0);
    noBackgroundButton.setSelection ((canvas.getStyle () & SWT.NO_BACKGROUND) != 0);
    noFocusButton.setSelection ((canvas.getStyle () & SWT.NO_FOCUS) != 0);
    noMergePaintsButton.setSelection ((canvas.getStyle () & SWT.NO_MERGE_PAINTS) != 0);
    noRedrawResizeButton.setSelection ((canvas.getStyle () & SWT.NO_REDRAW_RESIZE) != 0);
    doubleBufferedButton.setSelection ((canvas.getStyle () & SWT.DOUBLE_BUFFERED) != 0);
    if (!instance.startup) setCaret ();
  }
}

代码示例来源: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.jface.text

/**
 * Paints the ruler column.
 *
 * @param event the paint event
 */
private void paintControl(PaintEvent event) {
  if (fTextViewer == null)
    return;
  fWasShowingEntireContents= JFaceTextUtil.isShowingEntireContents(fStyledText);
  fLastTopPixel= fStyledText.getTopPixel();
  ILineRange lines= computeDirtyWidgetLines(event);
  GC gc= event.gc;
  paint(gc, lines);
  if ((fCanvas.getStyle() & SWT.NO_BACKGROUND) != 0) {
    // fill empty area below any lines
    int firstEmpty= Math.max(event.y, fStyledText.getLinePixel(fStyledText.getLineCount()));
    int lastEmpty= event.y + event.height;
    if (lastEmpty > firstEmpty) {
      gc.setBackground(getDefaultBackground());
      gc.fillRectangle(0, firstEmpty, getWidth(), lastEmpty - firstEmpty);
    }
  }
}

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

/**
 * Paints the ruler column.
 *
 * @param event the paint event
 */
private void paintControl(PaintEvent event) {
  if (fTextViewer == null)
    return;
  fWasShowingEntireContents= JFaceTextUtil.isShowingEntireContents(fStyledText);
  fLastTopPixel= fStyledText.getTopPixel();
  ILineRange lines= computeDirtyWidgetLines(event);
  GC gc= event.gc;
  paint(gc, lines);
  if ((fCanvas.getStyle() & SWT.NO_BACKGROUND) != 0) {
    // fill empty area below any lines
    int firstEmpty= Math.max(event.y, fStyledText.getLinePixel(fStyledText.getLineCount()));
    int lastEmpty= event.y + event.height;
    if (lastEmpty > firstEmpty) {
      gc.setBackground(getDefaultBackground());
      gc.fillRectangle(0, firstEmpty, getWidth(), lastEmpty - firstEmpty);
    }
  }
}

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

} else if (drawMode == DRAW_NORMAL || drawMode == DRAW_CENTER
    || drawMode == DRAW_ANIMATE) {
  if ((control.getStyle() & SWT.RIGHT) != 0) {
   e.gc.drawImage(imgSrc, size.x - imgSrcBounds.width,
       (size.y - imgSrcBounds.height) / 2);

相关文章

Canvas类方法