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

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

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

Canvas.setForeground介绍

暂无

代码示例

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

  1. public void setForeground(Color c) {
  2. super.setForeground(c);
  3. label.setForeground(c);
  4. }

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

  1. @Override
  2. public void setForeground(Color fg) {
  3. super.setForeground(fg);
  4. titleLabel.setForeground(fg);
  5. if (menuHyperlink != null)
  6. menuHyperlink.setForeground(fg);
  7. }

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

  1. /**
  2. * Sets the foreground of all the custom controls in the expandable.
  3. */
  4. @Override
  5. public void setForeground(Color fg) {
  6. super.setForeground(fg);
  7. if (textLabel != null)
  8. textLabel.setForeground(fg);
  9. if (toggle != null)
  10. toggle.setForeground(fg);
  11. }

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

  1. /**
  2. * Sets the foreground color of the header.
  3. */
  4. @Override
  5. public void setForeground(Color fg) {
  6. super.setForeground(fg);
  7. titleRegion.setForeground(fg);
  8. if (messageRegion != null)
  9. messageRegion.setForeground(fg);
  10. }

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

  1. /**
  2. * Sets the foreground color of the header.
  3. */
  4. @Override
  5. public void setForeground(Color fg) {
  6. super.setForeground(fg);
  7. titleRegion.setForeground(fg);
  8. if (messageRegion != null)
  9. messageRegion.setForeground(fg);
  10. }

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

  1. @Override
  2. public void setForeground(Color fg) {
  3. super.setForeground(fg);
  4. titleLabel.setForeground(fg);
  5. if (menuHyperlink != null)
  6. menuHyperlink.setForeground(fg);
  7. }

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

  1. /**
  2. * Sets the foreground of all the custom controls in the expandable.
  3. */
  4. @Override
  5. public void setForeground(Color fg) {
  6. super.setForeground(fg);
  7. if (textLabel != null)
  8. textLabel.setForeground(fg);
  9. if (toggle != null)
  10. toggle.setForeground(fg);
  11. }

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. public void setForeground (Color color) {
  19. foreground = color;
  20. super.setForeground(getForeground());
  21. redraw();
  22. }
  23. /**

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }
  24. /**

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }
  24. /**

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

  1. /**
  2. * Sets the receiver's foreground color to the color specified
  3. * by the argument, or to the default system color for the control
  4. * if the argument is null.
  5. * <p>
  6. * Note: This operation is a hint and may be overridden by the platform.
  7. * </p>
  8. * @param color the new color (or null)
  9. *
  10. * @exception IllegalArgumentException <ul>
  11. * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>
  12. * </ul>
  13. * @exception SWTException <ul>
  14. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  15. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  16. * </ul>
  17. */
  18. @Override
  19. public void setForeground (Color color) {
  20. foreground = color;
  21. super.setForeground(getForeground());
  22. redraw();
  23. }
  24. /**

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

  1. public void setForeground(Color color) {
  2. checkWidget();
  3. foreground = color;
  4. super.setForeground(getForeground());
  5. resetCache(0, content.getLineCount());
  6. setCaretLocation();
  7. super.redraw();
  8. }
  9. /**

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

  1. @Override
  2. public void setForeground(Color color) {
  3. checkWidget();
  4. foreground = color;
  5. super.setForeground(getForeground());
  6. resetCache(0, content.getLineCount());
  7. setCaretLocation();
  8. super.redraw();
  9. }
  10. /**

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

  1. @Override
  2. public void setForeground(Color color) {
  3. checkWidget();
  4. foreground = color;
  5. super.setForeground(getForeground());
  6. resetCache(0, content.getLineCount());
  7. setCaretLocation();
  8. super.redraw();
  9. }
  10. /**

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

  1. @Override
  2. public void setForeground(Color color) {
  3. checkWidget();
  4. foreground = color;
  5. super.setForeground(getForeground());
  6. resetCache(0, content.getLineCount());
  7. setCaretLocation();
  8. super.redraw();
  9. }
  10. /**

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

  1. @Override
  2. public void setForeground(Color color) {
  3. checkWidget();
  4. foreground = color;
  5. super.setForeground(getForeground());
  6. resetCache(0, content.getLineCount());
  7. setCaretLocation();
  8. super.redraw();
  9. }
  10. /**

相关文章

Canvas类方法