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

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

本文整理了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

public void widgetSelected( SelectionEvent arg0 ) {
  background.dispose();
  backgroundRGB =
   new RGB( ConstUI.COLOR_BACKGROUND_RED, ConstUI.COLOR_BACKGROUND_GREEN, ConstUI.COLOR_BACKGROUND_BLUE );
  background = new Color( display, backgroundRGB );
  wBGColor.setBackground( background );
  wBGColor.redraw();
 }
} );

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

public void widgetSelected( SelectionEvent arg0 ) {
  tabColor.dispose();
  tabColorRGB = new RGB( ConstUI.COLOR_TAB_RED, ConstUI.COLOR_TAB_GREEN, ConstUI.COLOR_TAB_BLUE );
  tabColor = new Color( display, tabColorRGB );
  wTabColor.setBackground( tabColor );
  wTabColor.redraw();
 }
} );

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

public void widgetSelected( SelectionEvent arg0 ) {
  graphColor.dispose();
  graphColorRGB = new RGB( ConstUI.COLOR_GRAPH_RED, ConstUI.COLOR_GRAPH_GREEN, ConstUI.COLOR_GRAPH_BLUE );
  graphColor = new Color( display, graphColorRGB );
  wGrColor.setBackground( graphColor );
  wGrColor.redraw();
 }
} );

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

public void widgetSelected( SelectionEvent arg0 ) {
  ColorDialog cd = new ColorDialog( shell );
  cd.setRGB( props.getGraphColorRGB() );
  RGB newbg = cd.open();
  if ( newbg != null ) {
   graphColorRGB = newbg;
   graphColor.dispose();
   graphColor = new Color( display, graphColorRGB );
   wGrColor.setBackground( graphColor );
   wGrColor.redraw();
  }
 }
} );

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

public void widgetSelected( SelectionEvent arg0 ) {
  ColorDialog cd = new ColorDialog( shell );
  cd.setRGB( props.getBackgroundRGB() );
  RGB newbg = cd.open();
  if ( newbg != null ) {
   backgroundRGB = newbg;
   background.dispose();
   background = new Color( display, backgroundRGB );
   wBGColor.setBackground( background );
   wBGColor.redraw();
  }
 }
} );

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

public void widgetSelected( SelectionEvent arg0 ) {
  ColorDialog cd = new ColorDialog( shell );
  cd.setRGB( props.getTabColorRGB() );
  RGB newbg = cd.open();
  if ( newbg != null ) {
   tabColorRGB = newbg;
   tabColor.dispose();
   tabColor = new Color( display, tabColorRGB );
   wTabColor.setBackground( tabColor );
   wTabColor.redraw();
  }
 }
} );

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

wBGColor.setBackground( background );
FormData fdBGColor = new FormData();
fdBGColor.left = new FormAttachment( middle, 0 );
wGrColor.setBackground( graphColor );
FormData fdGrColor = new FormData();
fdGrColor.left = new FormAttachment( middle, 0 );
wTabColor.setBackground( tabColor );
FormData fdTabColor = new FormData();
fdTabColor.left = new FormAttachment( middle, 0 );

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

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

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

/**
 * Sets the background color of the header.
 */
@Override
public void setBackground(Color bg) {
  super.setBackground(bg);
  internalSetBackground(bg);
}

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

/**
 * Sets the tool foreground color.
 *
 * @param color the new color to use
 */
public void setForegroundColor(Color color) {
  if (activeForegroundColorCanvas != null)
    activeForegroundColorCanvas.setBackground(color);
  toolSettings.commonForegroundColor = color;
  updateToolSettings();
}

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

/**
 * Sets the background color of the header.
 */
@Override
public void setBackground(Color bg) {
  super.setBackground(bg);
  internalSetBackground(bg);
}

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

public void deselect() {
      // hide the popup
//            fHoverManager.disposeInformationControl();

      // deselect
      fSelection= null;

      resetViewerBackground(oldStyles);
      oldStyles= null;

      Display disp= fShell.getDisplay();
      canvas.setCursor(null);
      // TODO: remove shading - for now: set standard background
      canvas.setBackground(disp.getSystemColor(SWT.COLOR_INFO_BACKGROUND));

    }

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

public void deselect() {
      // hide the popup
//            fHoverManager.disposeInformationControl();

      // deselect
      fSelection= null;

      resetViewerBackground(oldStyles);
      oldStyles= null;

      Display disp= fShell.getDisplay();
      canvas.setCursor(null);
      // TODO: remove shading - for now: set standard background
      canvas.setBackground(disp.getSystemColor(SWT.COLOR_INFO_BACKGROUND));

    }

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

public void deselect() {
      // hide the popup
//            fHoverManager.disposeInformationControl();

      // deselect
      fSelection= null;

      resetViewerBackground(oldStyles);
      oldStyles= null;

      Display disp= fShell.getDisplay();
      canvas.setCursor(null);
      // TODO: remove shading - for now: set standard background
      canvas.setBackground(disp.getSystemColor(SWT.COLOR_INFO_BACKGROUND));

    }

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

/**
 * Sets the background color of this column.
 *
 * @param background the background color
 */
public void setBackground(Color background) {
  fBackground= background;
  if (fCanvas != null && !fCanvas.isDisposed())
    fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
}

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

/**
 * Sets the background color of this column.
 *
 * @param background the background color
 */
public void setBackground(Color background) {
  fBackground= background;
  if (fCanvas != null && !fCanvas.isDisposed())
    fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
}

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

@Override
public void setBackground(Color bg) {
  super.setBackground(bg);
  titleLabel.setBackground(bg);
  if (busyLabel != null)
    busyLabel.setBackground(bg);
  if (menuHyperlink != null)
    menuHyperlink.setBackground(bg);
}

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

@Override
public void setBackground(Color bg) {
  super.setBackground(bg);
  titleLabel.setBackground(bg);
  if (busyLabel != null)
    busyLabel.setBackground(bg);
  if (menuHyperlink != null)
    menuHyperlink.setBackground(bg);
}

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

@Override
public void setBackground(Color background) {
  fBackground= background;
  if (fCanvas != null && !fCanvas.isDisposed())
    fCanvas.setBackground(getBackground());
  fRevisionPainter.setBackground(background);
  fDiffPainter.setBackground(background);
}

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

@Override
public void setBackground(Color background) {
  fBackground= background;
  if (fCanvas != null && !fCanvas.isDisposed())
    fCanvas.setBackground(getBackground());
  fRevisionPainter.setBackground(background);
  fDiffPainter.setBackground(background);
}

相关文章

Canvas类方法