private void refreshTextNote() { int swt = SWT.NORMAL; if ( wFontBold.getSelection() ) { swt = SWT.BOLD; } if ( wFontItalic.getSelection() ) { swt = swt | SWT.ITALIC; } // dispose of old font only after setting it on wDesc Font oldFont = font; font = new Font( shell.getDisplay(), wFontName.getText(), wFontSize.getSelection(), swt ); wDesc.setFont( font ); if ( oldFont != null && !oldFont.isDisposed() ) { oldFont.dispose(); } for ( Control control : wDesc.getChildren() ) { control.setBackground( bgColor ); } wFontColor.setBackground( fontColor ); wBackGroundColor.setBackground( bgColor ); 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( 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(); } } );
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(); } } );
imageLabel.setBackground( display.getSystemColor( SWT.COLOR_INFO_BACKGROUND ) ); FormData fdImageLabel = new FormData(); fdImageLabel.left = new FormAttachment( 0, 0 ); titleLabel.setBackground( display.getSystemColor( SWT.COLOR_INFO_BACKGROUND ) ); titleLabel.setFont( GUIResource.getInstance().getFontBold() ); FormData fdTitleLabel = new FormData(); line.setBackground( display.getSystemColor( SWT.COLOR_INFO_BACKGROUND ) ); FormData fdLine = new FormData(); fdLine.left = new FormAttachment( imageLabel, 5 ); messageLabel.setBackground( display.getSystemColor( SWT.COLOR_INFO_BACKGROUND ) ); FormData fdMessageLabel = new FormData(); fdMessageLabel.left = new FormAttachment( imageLabel, 20 );
label.setBackground( perfComposite.getBackground() ); label.setFont( GUIResource.getInstance().getFontMedium() );
wFontColor.setBackground( fontColor ); wBackGroundColor.setBackground( bgColor ); wBorderColor.setBackground( borderColor );
wResultsLabel.setBackground( GUIResource.getInstance().getColorWhite() ); wResultsLabel.setText( BaseMessages.getString( PKG, "JobLog.ResultsPanel.NameLabel" ) ); FormData fdResultsLabel = new FormData();
wResultsLabel.setBackground( GUIResource.getInstance().getColorWhite() ); wResultsLabel.setText( BaseMessages.getString( PKG, "TransLog.ResultsPanel.NameLabel" ) ); FormData fdResultsLabel = new FormData();
sep3.setBackground( GUIResource.getInstance().getColorWhite() ); FormData fdSep3 = new FormData(); fdSep3.left = new FormAttachment( 0, 0 ); sep4.setBackground( GUIResource.getInstance().getColorWhite() ); FormData fdSep4 = new FormData(); fdSep4.left = new FormAttachment( 0, 0 );
/** * Sets the background for this PagingControl. * the background color is also set for the labels */ public void setBackground(Color color) { super.setBackground(color); info.setBackground(color); pageSizeL.setBackground(color); } }
private Label createDescriptionLabel(Composite parent, String text) { Label description = new Label(parent, SWT.WRAP); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; description.setLayoutData(data); description.setText(text); description.setBackground(getBackgroundColor(parent)); return description; }
private Label createLabel(Composite parent, String text) { Label label = new Label(parent, SWT.NONE); GridData data= new GridData(GridData.FILL_HORIZONTAL); label.setLayoutData(data); if (text != null) label.setText(text); label.setBackground(fBackgroundColor); label.setForeground(fForegroundColor); return label; }
protected Label createDescriptionLabel(Composite parent, String text) { Label description = new Label(parent, SWT.WRAP); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; data.widthHint = 100; description.setLayoutData(data); description.setText(text); description.setBackground(getBackgroundColor()); return description; }
private Label createLabel(Composite parent, String text) { Label label = new Label(parent, SWT.NONE); if (text != null) label.setText(text); label.setBackground(fBackgroundColor); label.setForeground(fForegroundColor); return label; }
private Label createTitleLabel(Composite parent, String text) { Label label = new Label(parent, SWT.NONE); if (text != null) label.setText(text); label.setBackground(fBackgroundColor); label.setForeground(fForegroundColor); label.setFont(JFaceResources.getHeaderFont()); fHeaderLabels.add(label); return label; }
@Override public void run() { statusLabel.setBackground(getColor(systemColor)); composite.redraw(); } });
private Label createBanner(Composite parent, String text) { Label label = new Label(parent, SWT.NONE); if (text != null) label.setText(text); label.setBackground(fBackgroundColor); label.setForeground(fForegroundColor); label.setFont(JFaceResources.getBannerFont()); return label; } }
/** * Set the colors of the message area. * * @param color * The color to be use in the message area. */ private void setMessageColors(Color color) { messageText.setBackground(color); messageComposite.setBackground(color); messageImageLabel.setBackground(color); }
private void addStatusLabel(int newSide) { statusLabel = new Label(composite, BORDER | LEFT); statusLabel.setLayoutData(getRowData(newSide)); statusLabel.setForeground(getColor(COLOR_WHITE)); statusLabel.setText(statusString); statusLabel.setBackground(getColor(backgroundColor)); }