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

x33g5p2x  于2022-01-19 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(118)

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

GC.getStyle介绍

[英]Returns the receiver's style information.

Note that the value which is returned by this method may not match the value which was provided to the constructor when the receiver was created. This can occur when the underlying operating system does not support a particular combination of requested styles.
[中]返回接收器的样式信息。
请注意,此方法返回的值可能与创建接收器时提供给构造函数的值不匹配。当底层操作系统不支持所请求样式的特定组合时,可能会发生这种情况。

代码示例

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

int page = startPage;
int pageBottom = clientArea.y + clientArea.height;
int orientation =  gc.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
TextLayout printLayout = null;
if (printOptions.printLineNumbers || printOptions.header != null || printOptions.footer != null) {

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

int page = startPage;
int pageBottom = clientArea.y + clientArea.height;
int orientation =  gc.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
TextLayout printLayout = null;
if (printOptions.printLineNumbers || printOptions.header != null || printOptions.footer != null) {

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

int page = startPage;
int pageBottom = clientArea.y + clientArea.height;
int orientation =  gc.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
TextLayout printLayout = null;
if (printOptions.printLineNumbers || printOptions.header != null || printOptions.footer != null) {

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

int page = startPage;
int pageBottom = clientArea.y + clientArea.height;
int orientation =  gc.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
TextLayout printLayout = null;
if (printOptions.printLineNumbers || printOptions.header != null || printOptions.footer != null) {

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

int page = startPage;
int pageBottom = clientArea.y + clientArea.height;
int orientation =  gc.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
TextLayout printLayout = null;
if (printOptions.printLineNumbers || printOptions.header != null || printOptions.footer != null) {

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

private void repaint(GC gc, int x, int y, int width, int height) {
  Image textBuffer = new Image(getDisplay(), width, height);
  Color bg = getBackground();
  Color fg = getForeground();
  if (!getEnabled()) {
    bg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
    fg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
  }
  GC textGC = new GC(textBuffer, gc.getStyle());
  textGC.setForeground(fg);
  textGC.setBackground(bg);
  textGC.setFont(getFont());
  textGC.fillRectangle(0, 0, width, height);
  Rectangle repaintRegion = new Rectangle(x, y, width, height);
  Paragraph[] paragraphs = model.getParagraphs();
  IHyperlinkSegment selectedLink = getSelectedLink();
  if (getDisplay().getFocusControl() != this)
    selectedLink = null;
  for (Paragraph p : paragraphs) {
    p
        .paint(textGC, repaintRegion, resourceTable, selectedLink,
            selData);
  }
  if (hasFocus && !model.hasFocusSegments())
    textGC.drawFocus(x, y, width, height);
  textGC.dispose();
  gc.drawImage(textBuffer, x, y);
  textBuffer.dispose();
}

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

private void repaint(GC gc, int x, int y, int width, int height) {
  Image textBuffer = new Image(getDisplay(), width, height);
  Color bg = getBackground();
  Color fg = getForeground();
  if (!getEnabled()) {
    bg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
    fg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
  }
  GC textGC = new GC(textBuffer, gc.getStyle());
  textGC.setForeground(fg);
  textGC.setBackground(bg);
  textGC.setFont(getFont());
  textGC.fillRectangle(0, 0, width, height);
  Rectangle repaintRegion = new Rectangle(x, y, width, height);
  Paragraph[] paragraphs = model.getParagraphs();
  IHyperlinkSegment selectedLink = getSelectedLink();
  if (getDisplay().getFocusControl() != this)
    selectedLink = null;
  for (Paragraph p : paragraphs) {
    p
        .paint(textGC, repaintRegion, resourceTable, selectedLink,
            selData);
  }
  if (hasFocus && !model.hasFocusSegments())
    textGC.drawFocus(x, y, width, height);
  textGC.dispose();
  gc.drawImage(textBuffer, x, y);
  textBuffer.dispose();
}

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

image = new Image (display, width, height);
paintGC = gc;
gc = new GC (image, paintGC.getStyle() & SWT.RIGHT_TO_LEFT);
GCData gcData = gc.getGCData ();
gcData.uiState = data.uiState;

相关文章

GC类方法