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

x33g5p2x  于2022-01-23 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(105)

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

Label.getBackground介绍

暂无

代码示例

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

private void ok() {
 notePadMeta = new NotePadMeta();
 if ( wDesc.getText() != null ) {
  notePadMeta.setNote( wDesc.getText() );
 }
 if ( wFontName.getText() != null ) {
  notePadMeta.setFontName( wFontName.getText() );
 }
 notePadMeta.setFontSize( wFontSize.getSelection() );
 notePadMeta.setFontBold( wFontBold.getSelection() );
 notePadMeta.setFontItalic( wFontItalic.getSelection() );
 // font color
 notePadMeta.setFontColorRed( wFontColor.getBackground().getRed() );
 notePadMeta.setFontColorGreen( wFontColor.getBackground().getGreen() );
 notePadMeta.setFontColorBlue( wFontColor.getBackground().getBlue() );
 // background color
 notePadMeta.setBackGroundColorRed( wBackGroundColor.getBackground().getRed() );
 notePadMeta.setBackGroundColorGreen( wBackGroundColor.getBackground().getGreen() );
 notePadMeta.setBackGroundColorBlue( wBackGroundColor.getBackground().getBlue() );
 // border color
 notePadMeta.setBorderColorRed( wBorderColor.getBackground().getRed() );
 notePadMeta.setBorderColorGreen( wBorderColor.getBackground().getGreen() );
 notePadMeta.setBorderColorBlue( wBorderColor.getBackground().getBlue() );
 notePadMeta.setDrawShadow( wDrawShadow.getSelection() );
 dispose();
}

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

public void widgetSelected( SelectionEvent e ) {
  ColorDialog cd = new ColorDialog( shell );
  cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) );
  cd.setRGB( wFontColor.getBackground().getRGB() );
  RGB newColor = cd.open();
  if ( newColor == null ) {
   return;
  }
  fontColor.dispose();
  fontColor = new Color( shell.getDisplay(), newColor );
  wFontColor.setBackground( fontColor );
  refreshTextNote();
 }
} );

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

public void widgetSelected( SelectionEvent e ) {
  ColorDialog cd = new ColorDialog( shell );
  cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) );
  cd.setRGB( wBorderColor.getBackground().getRGB() );
  RGB newColor = cd.open();
  if ( newColor == null ) {
   return;
  }
  borderColor.dispose();
  borderColor = new Color( shell.getDisplay(), newColor );
  wBorderColor.setBackground( borderColor );
 }
} );

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

public void widgetSelected( SelectionEvent e ) {
  ColorDialog cd = new ColorDialog( shell );
  cd.setText( BaseMessages.getString( PKG, "NotePadDialog.Font.Color.Dialog.Label" ) );
  cd.setRGB( wBackGroundColor.getBackground().getRGB() );
  RGB newColor = cd.open();
  if ( newColor == null ) {
   return;
  }
  bgColor.dispose();
  bgColor = new Color( shell.getDisplay(), newColor );
  wBackGroundColor.setBackground( bgColor );
  refreshTextNote();
 }
} );

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

@Override
public void setForegroundColor(Color foreground) {
  fContentComposite.setForeground(foreground);
  if (fStatusLabel != null) {
    setStatusLabelColors(foreground, fStatusLabel.getBackground());
  }
}

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

private Control createMessageArea(Composite composite) {
  // create composite
  // create image
  Image image = getSWTImage(SWT.ICON_INFORMATION);
  if (image != null) {
    imageLabel = new Label(composite, SWT.NULL);
    image.setBackground(imageLabel.getBackground());
    imageLabel.setImage(image);
    imageLabel.setLayoutData(new GridData(
        GridData.HORIZONTAL_ALIGN_CENTER
            | GridData.VERTICAL_ALIGN_BEGINNING));
  }
  // create message
  if (message != null) {
    messageLabel = new Label(composite, SWT.WRAP);
    messageLabel.setText(message);
    GridData data = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.HORIZONTAL_ALIGN_FILL
        | GridData.VERTICAL_ALIGN_BEGINNING);
    data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
    messageLabel.setLayoutData(data);
  }
  return composite;
}

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

private Control createMessageArea(Composite composite) {
  // create composite
  // create image
  Image image = getSWTImage(SWT.ICON_INFORMATION);
  if (image != null) {
    imageLabel = new Label(composite, SWT.NULL);
    image.setBackground(imageLabel.getBackground());
    imageLabel.setImage(image);
    imageLabel.setLayoutData(new GridData(
        GridData.HORIZONTAL_ALIGN_CENTER
            | GridData.VERTICAL_ALIGN_BEGINNING));
  }
  // create message
  if (message != null) {
    messageLabel = new Label(composite, SWT.WRAP);
    messageLabel.setText(message);
    GridData data = new GridData(GridData.GRAB_HORIZONTAL
        | GridData.HORIZONTAL_ALIGN_FILL
        | GridData.VERTICAL_ALIGN_BEGINNING);
    data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
    messageLabel.setLayoutData(data);
  }
  return composite;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui

image.setBackground(label.getBackground());
label.setImage(image);
label.setLayoutData(

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

if (image != null) {
  Label label= new Label(result, SWT.NULL);
  image.setBackground(label.getBackground());
  label.setImage(image);
  label.setLayoutData(new GridData(

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui

if (image != null) {
  Label label = new Label(composite, 0);
  image.setBackground(label.getBackground());
  label.setImage(image);
  label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));

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

if (image != null) {
  Label label = new Label(composite, 0);
  image.setBackground(label.getBackground());
  label.setImage(image);
  label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));

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

if (image != null) {
  Label label= new Label(result, SWT.NULL);
  image.setBackground(label.getBackground());
  label.setImage(image);
  label.setLayoutData(new GridData(

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

if (image != null) {
  Label label= new Label(result, SWT.NULL);
  image.setBackground(label.getBackground());
  label.setImage(image);
  label.setLayoutData(new GridData(

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

if (image != null) {
  imageLabel = new Label(composite, SWT.NULL);
  image.setBackground(imageLabel.getBackground());
  imageLabel.setImage(image);
  imageLabel.setLayoutData(new GridData(

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

image.setBackground(label.getBackground());
label.setImage(image);
label.setLayoutData(new GridData(

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

image.setBackground(label.getBackground());
label.setImage(image);
label.setLayoutData(new GridData(

代码示例来源:origin: BiglySoftware/BiglyBT

flag.setBackground(imageLabel.getBackground());
      try{
        Image img = new Image(imageLabel.getDisplay(), is);
        img.setBackground(imageLabel.getBackground());
        imageLabel.setImage(img);
      }finally{

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

if (image != null) {
  imageLabel = new Label(composite, SWT.NULL);
  image.setBackground(imageLabel.getBackground());
  imageLabel.setImage(image);
  addAccessibleListeners(imageLabel, image);

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

if (image != null) {
  imageLabel = new Label(composite, SWT.NULL);
  image.setBackground(imageLabel.getBackground());
  imageLabel.setImage(image);
  addAccessibleListeners(imageLabel, image);

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

if (image != null) {
  imageLabel = new Label(composite, SWT.NULL);
  image.setBackground(imageLabel.getBackground());
  imageLabel.setImage(image);
  addAccessibleListeners(imageLabel, image);

相关文章