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

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

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

Table.getBackground介绍

暂无

代码示例

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

public Color getBackground () {
  // This method must be overridden otherwise, in a TableTree in which the first
  // item has no sub items, a grey (Widget background colour) square will appear in
  // the first column of the first item.
  // It is not possible in the constructor to set the background of the TableTree
  // to be the same as the background of the Table because this interferes with 
  // the TableTree adapting to changes in the System color settings.
  return table.getBackground();
}
public Rectangle getClientArea () {

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

@Override
public Color getBackground () {
  // This method must be overridden otherwise, in a TableTree in which the first
  // item has no sub items, a grey (Widget background colour) square will appear in
  // the first column of the first item.
  // It is not possible in the constructor to set the background of the TableTree
  // to be the same as the background of the Table because this interferes with
  // the TableTree adapting to changes in the System color settings.
  return table.getBackground();
}
@Override

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

@Override
public Color getBackground () {
  // This method must be overridden otherwise, in a TableTree in which the first
  // item has no sub items, a grey (Widget background colour) square will appear in
  // the first column of the first item.
  // It is not possible in the constructor to set the background of the TableTree
  // to be the same as the background of the Table because this interferes with
  // the TableTree adapting to changes in the System color settings.
  return table.getBackground();
}
@Override

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

@Override
public Color getBackground () {
  // This method must be overridden otherwise, in a TableTree in which the first
  // item has no sub items, a grey (Widget background colour) square will appear in
  // the first column of the first item.
  // It is not possible in the constructor to set the background of the TableTree
  // to be the same as the background of the Table because this interferes with
  // the TableTree adapting to changes in the System color settings.
  return table.getBackground();
}
@Override

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

@Override
public Color getBackground () {
  // This method must be overridden otherwise, in a TableTree in which the first
  // item has no sub items, a grey (Widget background colour) square will appear in
  // the first column of the first item.
  // It is not possible in the constructor to set the background of the TableTree
  // to be the same as the background of the Table because this interferes with
  // the TableTree adapting to changes in the System color settings.
  return table.getBackground();
}
@Override

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

/**
 * Creates a label which will display the key binding to expand
 * the search results.
 *
 * @param parent parent composite with {@link GridLayout}
 * @return the created label
 */
public Label createInfoLabel(Composite parent) {
  infoLabel = new Label(parent, SWT.NONE);
  infoLabel.setFont(parent.getFont());
  infoLabel.setForeground(grayColor);
  infoLabel.setBackground(table.getBackground());
  GridData gd = new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalAlignment = SWT.RIGHT;
  gd.grabExcessHorizontalSpace = false;
  infoLabel.setLayoutData(gd);
  updateInfoLabel();
  return infoLabel;
}

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

/**
 * Returns the receiver's background color.
 *
 * @return the background color
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 * 
 * @since 2.0
 */
public Color getBackground () {
  checkWidget ();
  if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
  return background != null ? background : parent.getBackground ();
}

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

Color _getBackground () {
  long /*int*/ [] ptr = new long /*int*/ [1];
  OS.gtk_tree_model_get (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1);
  if (ptr [0] == 0) return parent.getBackground ();
  GdkColor gdkColor = new GdkColor ();
  OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
  OS.gdk_color_free (ptr [0]);
  return Color.gtk_new (display, gdkColor);
}

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

Color _getBackground () {
  int /*long*/ [] ptr = new int /*long*/ [1];
  OS.gtk_tree_model_get (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1);
  if (ptr [0] == 0) return parent.getBackground ();
  GdkColor gdkColor = new GdkColor ();
  OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
  OS.gdk_color_free (ptr [0]);
  return Color.gtk_new (display, gdkColor);
}

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

Color _getBackground () {
  int /*long*/ [] ptr = new int /*long*/ [1];
  OS.gtk_tree_model_get (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1);
  if (ptr [0] == 0) return parent.getBackground ();
  GdkColor gdkColor = new GdkColor ();
  OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
  OS.gdk_color_free (ptr [0]);
  return Color.gtk_new (display, gdkColor);
}

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

/**
 * Returns the receiver's background color.
 *
 * @return the background color
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 *
 * @since 2.0
 */
public Color getBackground () {
  checkWidget ();
  if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
  if (background == -1) return parent.getBackground ();
  return Color.win32_new (display, background);
}

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

/**
 * Returns the receiver's background color.
 *
 * @return the background color
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public Color getBackground() {
 checkWidget ();
 // TODO [rst] Replace with local index field access
 if( !parent.checkData( this, parent.indexOf( this ) ) ) {
  error( SWT.ERROR_WIDGET_DISPOSED );
 }
 Color result;
 if( background == null ) {
  result = parent.getBackground();
 } else {
  result = background;
 }
 return result;
}

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

private Color computeDashLineColor() {
  Color fg= fTable.getForeground();
  int fGray= (int)(0.3*fg.getRed() + 0.59*fg.getGreen() + 0.11*fg.getBlue());
  Color bg= fTable.getBackground();
  int bGray= (int)(0.3*bg.getRed() + 0.59*bg.getGreen() + 0.11*bg.getBlue());
  int gray= (int)((fGray + bGray) * 0.66);
  return new Color(fDisplay, gray, gray, gray);
}

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

private Color computeDashLineColor() {
  Color fg= fTable.getForeground();
  int fGray= (int)(0.3*fg.getRed() + 0.59*fg.getGreen() + 0.11*fg.getBlue());
  Color bg= fTable.getBackground();
  int bGray= (int)(0.3*bg.getRed() + 0.59*bg.getGreen() + 0.11*bg.getBlue());
  int gray= (int)((fGray + bGray) * 0.66);
  return new Color(fDisplay, gray, gray, gray);
}

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

private Color computeDashLineColor() {
  Color fg= fTable.getForeground();
  int fGray= (int)(0.3*fg.getRed() + 0.59*fg.getGreen() + 0.11*fg.getBlue());
  Color bg= fTable.getBackground();
  int bGray= (int)(0.3*bg.getRed() + 0.59*bg.getGreen() + 0.11*bg.getBlue());
  int gray= (int)((fGray + bGray) * 0.66);
  return new Color(fDisplay, gray, gray, gray);
}

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

private Color computeDashLineColor() {
  Color fg= fTable.getForeground();
  int fGray= (int)(0.3*fg.getRed() + 0.59*fg.getGreen() + 0.11*fg.getBlue());
  Color bg= fTable.getBackground();
  int bGray= (int)(0.3*bg.getRed() + 0.59*bg.getGreen() + 0.11*bg.getBlue());
  int gray= (int)((fGray + bGray) * 0.66);
  return new Color(fDisplay, gray, gray, gray);
}

代码示例来源:origin: com.diffplug.durian/durian-swt

this.setBackground(table.getBackground());
rowHeight = table.getItemHeight();
itemCount = table.getItemCount();

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

IWorkbenchPreferenceConstants.USE_COLORED_LABELS)) {
  boldStyle = new TextStyle(boldFont, null, null);
  grayColor = resourceManager.createColor(ColorUtil.blend(table.getBackground().getRGB(),
      table.getForeground().getRGB()));
} else {

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

Color bg = rawTable.getBackground();
RGB dimmedForegroundRgb = ColorUtil.blend(fg.getRGB(), bg.getRGB(), 60);

相关文章

Table类方法