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

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

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

Table.getForeground介绍

暂无

代码示例

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

  1. @Override
  2. public Color getForeground () {
  3. return table.getForeground();
  4. }
  5. @Override

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

  1. @Override
  2. public Color getForeground () {
  3. return table.getForeground();
  4. }
  5. @Override

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

  1. @Override
  2. public Color getForeground () {
  3. return table.getForeground();
  4. }
  5. @Override

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

  1. @Override
  2. public Color getForeground () {
  3. return table.getForeground();
  4. }
  5. @Override

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

  1. public Color getForeground () {
  2. return table.getForeground();
  3. }
  4. public Font getFont () {

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

  1. /**
  2. * Returns the foreground color that the receiver will use to draw.
  3. *
  4. * @return the receiver's foreground color
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 2.0
  12. */
  13. public Color getForeground () {
  14. checkWidget ();
  15. if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
  16. return foreground != null ? foreground : parent.getForeground ();
  17. }

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

  1. Color _getForeground () {
  2. int /*long*/ [] ptr = new int /*long*/ [1];
  3. OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1);
  4. if (ptr [0] == 0) return parent.getForeground ();
  5. GdkColor gdkColor = new GdkColor ();
  6. OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
  7. OS.gdk_color_free (ptr [0]);
  8. return Color.gtk_new (display, gdkColor);
  9. }

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

  1. Color _getForeground () {
  2. long /*int*/ [] ptr = new long /*int*/ [1];
  3. OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1);
  4. if (ptr [0] == 0) return parent.getForeground ();
  5. GdkColor gdkColor = new GdkColor ();
  6. OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
  7. OS.gdk_color_free (ptr [0]);
  8. return Color.gtk_new (display, gdkColor);
  9. }

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

  1. Color _getForeground () {
  2. int /*long*/ [] ptr = new int /*long*/ [1];
  3. OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1);
  4. if (ptr [0] == 0) return parent.getForeground ();
  5. GdkColor gdkColor = new GdkColor ();
  6. OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
  7. OS.gdk_color_free (ptr [0]);
  8. return Color.gtk_new (display, gdkColor);
  9. }

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

  1. /**
  2. * Returns the foreground color that the receiver will use to draw.
  3. *
  4. * @return the receiver's foreground color
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 2.0
  12. */
  13. public Color getForeground () {
  14. checkWidget ();
  15. if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
  16. if (foreground == -1) return parent.getForeground ();
  17. return Color.win32_new (display, foreground);
  18. }

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

  1. /**
  2. * Returns the foreground color that the receiver will use to draw.
  3. *
  4. * @return the receiver's foreground color
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public Color getForeground() {
  12. checkWidget();
  13. if( !parent.checkData( this, parent.indexOf( this ) ) ) {
  14. error( SWT.ERROR_WIDGET_DISPOSED );
  15. }
  16. Color result;
  17. if( foreground == null ) {
  18. result = parent.getForeground();
  19. } else {
  20. result = foreground;
  21. }
  22. return result;
  23. }

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

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

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

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

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

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

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

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

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

  1. boldStyle = new TextStyle(boldFont, null, null);
  2. grayColor = resourceManager.createColor(ColorUtil.blend(table.getBackground().getRGB(),
  3. table.getForeground().getRGB()));
  4. } else {
  5. boldStyle = null;

代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor

  1. table.setLinesVisible(true);
  2. final Color defaultForegroundColor = table.getForeground();

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

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

相关文章

Table类方法