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(); }
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(); } } );
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 ); } } );
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(); } } );
@Override public void setForegroundColor(Color foreground) { fContentComposite.setForeground(foreground); if (fStatusLabel != null) { setStatusLabelColors(foreground, fStatusLabel.getBackground()); } }
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; }
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; }
image.setBackground(label.getBackground()); label.setImage(image); label.setLayoutData(
if (image != null) { Label label= new Label(result, SWT.NULL); image.setBackground(label.getBackground()); label.setImage(image); label.setLayoutData(new GridData(
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));
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));
if (image != null) { Label label= new Label(result, SWT.NULL); image.setBackground(label.getBackground()); label.setImage(image); label.setLayoutData(new GridData(
if (image != null) { Label label= new Label(result, SWT.NULL); image.setBackground(label.getBackground()); label.setImage(image); label.setLayoutData(new GridData(
if (image != null) { imageLabel = new Label(composite, SWT.NULL); image.setBackground(imageLabel.getBackground()); imageLabel.setImage(image); imageLabel.setLayoutData(new GridData(
image.setBackground(label.getBackground()); label.setImage(image); label.setLayoutData(new GridData(
image.setBackground(label.getBackground()); label.setImage(image); label.setLayoutData(new GridData(
flag.setBackground(imageLabel.getBackground()); try{ Image img = new Image(imageLabel.getDisplay(), is); img.setBackground(imageLabel.getBackground()); imageLabel.setImage(img); }finally{
if (image != null) { imageLabel = new Label(composite, SWT.NULL); image.setBackground(imageLabel.getBackground()); imageLabel.setImage(image); addAccessibleListeners(imageLabel, image);
if (image != null) { imageLabel = new Label(composite, SWT.NULL); image.setBackground(imageLabel.getBackground()); imageLabel.setImage(image); addAccessibleListeners(imageLabel, image);
if (image != null) { imageLabel = new Label(composite, SWT.NULL); image.setBackground(imageLabel.getBackground()); imageLabel.setImage(image); addAccessibleListeners(imageLabel, image);