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

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

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

Canvas.setBackground介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void widgetSelected( SelectionEvent arg0 ) {
  2. background.dispose();
  3. backgroundRGB =
  4. new RGB( ConstUI.COLOR_BACKGROUND_RED, ConstUI.COLOR_BACKGROUND_GREEN, ConstUI.COLOR_BACKGROUND_BLUE );
  5. background = new Color( display, backgroundRGB );
  6. wBGColor.setBackground( background );
  7. wBGColor.redraw();
  8. }
  9. } );

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void widgetSelected( SelectionEvent arg0 ) {
  2. tabColor.dispose();
  3. tabColorRGB = new RGB( ConstUI.COLOR_TAB_RED, ConstUI.COLOR_TAB_GREEN, ConstUI.COLOR_TAB_BLUE );
  4. tabColor = new Color( display, tabColorRGB );
  5. wTabColor.setBackground( tabColor );
  6. wTabColor.redraw();
  7. }
  8. } );

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void widgetSelected( SelectionEvent arg0 ) {
  2. graphColor.dispose();
  3. graphColorRGB = new RGB( ConstUI.COLOR_GRAPH_RED, ConstUI.COLOR_GRAPH_GREEN, ConstUI.COLOR_GRAPH_BLUE );
  4. graphColor = new Color( display, graphColorRGB );
  5. wGrColor.setBackground( graphColor );
  6. wGrColor.redraw();
  7. }
  8. } );

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void widgetSelected( SelectionEvent arg0 ) {
  2. ColorDialog cd = new ColorDialog( shell );
  3. cd.setRGB( props.getGraphColorRGB() );
  4. RGB newbg = cd.open();
  5. if ( newbg != null ) {
  6. graphColorRGB = newbg;
  7. graphColor.dispose();
  8. graphColor = new Color( display, graphColorRGB );
  9. wGrColor.setBackground( graphColor );
  10. wGrColor.redraw();
  11. }
  12. }
  13. } );

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void widgetSelected( SelectionEvent arg0 ) {
  2. ColorDialog cd = new ColorDialog( shell );
  3. cd.setRGB( props.getBackgroundRGB() );
  4. RGB newbg = cd.open();
  5. if ( newbg != null ) {
  6. backgroundRGB = newbg;
  7. background.dispose();
  8. background = new Color( display, backgroundRGB );
  9. wBGColor.setBackground( background );
  10. wBGColor.redraw();
  11. }
  12. }
  13. } );

代码示例来源:origin: pentaho/pentaho-kettle

  1. public void widgetSelected( SelectionEvent arg0 ) {
  2. ColorDialog cd = new ColorDialog( shell );
  3. cd.setRGB( props.getTabColorRGB() );
  4. RGB newbg = cd.open();
  5. if ( newbg != null ) {
  6. tabColorRGB = newbg;
  7. tabColor.dispose();
  8. tabColor = new Color( display, tabColorRGB );
  9. wTabColor.setBackground( tabColor );
  10. wTabColor.redraw();
  11. }
  12. }
  13. } );

代码示例来源:origin: pentaho/pentaho-kettle

  1. wBGColor.setBackground( background );
  2. FormData fdBGColor = new FormData();
  3. fdBGColor.left = new FormAttachment( middle, 0 );
  4. wGrColor.setBackground( graphColor );
  5. FormData fdGrColor = new FormData();
  6. fdGrColor.left = new FormAttachment( middle, 0 );
  7. wTabColor.setBackground( tabColor );
  8. FormData fdTabColor = new FormData();
  9. fdTabColor.left = new FormAttachment( middle, 0 );

代码示例来源:origin: pentaho/pentaho-kettle

  1. newProps();
  2. canvas.setBackground( GUIResource.getInstance().getColorBackground() );

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

  1. /**
  2. * Sets the background color of the header.
  3. */
  4. @Override
  5. public void setBackground(Color bg) {
  6. super.setBackground(bg);
  7. internalSetBackground(bg);
  8. }

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

  1. /**
  2. * Sets the tool foreground color.
  3. *
  4. * @param color the new color to use
  5. */
  6. public void setForegroundColor(Color color) {
  7. if (activeForegroundColorCanvas != null)
  8. activeForegroundColorCanvas.setBackground(color);
  9. toolSettings.commonForegroundColor = color;
  10. updateToolSettings();
  11. }

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

  1. /**
  2. * Sets the background color of the header.
  3. */
  4. @Override
  5. public void setBackground(Color bg) {
  6. super.setBackground(bg);
  7. internalSetBackground(bg);
  8. }

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

  1. public void deselect() {
  2. // hide the popup
  3. // fHoverManager.disposeInformationControl();
  4. // deselect
  5. fSelection= null;
  6. resetViewerBackground(oldStyles);
  7. oldStyles= null;
  8. Display disp= fShell.getDisplay();
  9. canvas.setCursor(null);
  10. // TODO: remove shading - for now: set standard background
  11. canvas.setBackground(disp.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
  12. }

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

  1. public void deselect() {
  2. // hide the popup
  3. // fHoverManager.disposeInformationControl();
  4. // deselect
  5. fSelection= null;
  6. resetViewerBackground(oldStyles);
  7. oldStyles= null;
  8. Display disp= fShell.getDisplay();
  9. canvas.setCursor(null);
  10. // TODO: remove shading - for now: set standard background
  11. canvas.setBackground(disp.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
  12. }

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

  1. public void deselect() {
  2. // hide the popup
  3. // fHoverManager.disposeInformationControl();
  4. // deselect
  5. fSelection= null;
  6. resetViewerBackground(oldStyles);
  7. oldStyles= null;
  8. Display disp= fShell.getDisplay();
  9. canvas.setCursor(null);
  10. // TODO: remove shading - for now: set standard background
  11. canvas.setBackground(disp.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
  12. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

  1. /**
  2. * Sets the background color of this column.
  3. *
  4. * @param background the background color
  5. */
  6. public void setBackground(Color background) {
  7. fBackground= background;
  8. if (fCanvas != null && !fCanvas.isDisposed())
  9. fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
  10. }

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

  1. /**
  2. * Sets the background color of this column.
  3. *
  4. * @param background the background color
  5. */
  6. public void setBackground(Color background) {
  7. fBackground= background;
  8. if (fCanvas != null && !fCanvas.isDisposed())
  9. fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
  10. }

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

  1. @Override
  2. public void setBackground(Color bg) {
  3. super.setBackground(bg);
  4. titleLabel.setBackground(bg);
  5. if (busyLabel != null)
  6. busyLabel.setBackground(bg);
  7. if (menuHyperlink != null)
  8. menuHyperlink.setBackground(bg);
  9. }

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

  1. @Override
  2. public void setBackground(Color bg) {
  3. super.setBackground(bg);
  4. titleLabel.setBackground(bg);
  5. if (busyLabel != null)
  6. busyLabel.setBackground(bg);
  7. if (menuHyperlink != null)
  8. menuHyperlink.setBackground(bg);
  9. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

  1. @Override
  2. public void setBackground(Color background) {
  3. fBackground= background;
  4. if (fCanvas != null && !fCanvas.isDisposed())
  5. fCanvas.setBackground(getBackground());
  6. fRevisionPainter.setBackground(background);
  7. fDiffPainter.setBackground(background);
  8. }

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

  1. @Override
  2. public void setBackground(Color background) {
  3. fBackground= background;
  4. if (fCanvas != null && !fCanvas.isDisposed())
  5. fCanvas.setBackground(getBackground());
  6. fRevisionPainter.setBackground(background);
  7. fDiffPainter.setBackground(background);
  8. }

相关文章

Canvas类方法