wDesc.setText( exMsgFunction.apply( text.toString() ) ); wDesc.setBackground( gray ); fdDesc = new FormData(); fdDesc.left = new FormAttachment( 0, 0 );
boolean ismatch = m.matches(); if ( ismatch ) { control.setBackground( guiresource.getColorGreen() ); } else { control.setBackground( guiresource.getColorRed() );
wJobFilename.setLayoutData( fdJobFilename ); wJobFilename.setEditable( false ); wJobFilename.setBackground( GUIResource.getInstance().getColorLightGray() );
wTransFilename.setLayoutData( fdTransFilename ); wTransFilename.setEditable( false ); wTransFilename.setBackground( GUIResource.getInstance().getColorLightGray() );
wText.getTextWidget().setBackground( composite.getBackground() ); // make it blend in with the rest...
/** * @param color * @see org.eclipse.swt.widgets.Control#setBackground(org.eclipse.swt.graphics.Color) */ public void setBackground(Color color) { m_text.setBackground(color); }
/** * @param parent * @param style * @return a text field which is read-only but can be selected */ public static Text createSelectableLabel(Composite parent, int style) { // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=71765 Text text = new Text(parent, style | SWT.READ_ONLY); text.setBackground(text.getDisplay().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND)); return text; }
/** * 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); }
/** * Fixes https://bugs.eclipse.org/71765 by setting the background * color to {@code SWT.COLOR_WIDGET_BACKGROUND}. * <p> * Should be applied to all SWT.READ_ONLY Texts in dialogs (or at least those which don't have an SWT.BORDER). * Search regex: {@code new Text\([^,]+,[^\)]+SWT\.READ_ONLY} * * @param textField the text field */ public static void fixReadonlyTextBackground(Text textField) { textField.setBackground(textField.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); }
private void createDescriptionText(Composite composite) { descriptionText = new Text(composite, SWT.WRAP | SWT.V_SCROLL | SWT.BORDER); descriptionText.setFont(composite.getFont()); descriptionText.setBackground(composite.getBackground()); GridData descriptionTextGridData = new GridData( GridData.FILL_HORIZONTAL); descriptionTextGridData.heightHint = convertHeightInCharsToPixels(3); descriptionText.setLayoutData(descriptionTextGridData); }
/** * Creates the text widget for reporting errors */ protected void createErrorText(Composite parent) { fErrorText= new Text(parent, SWT.READ_ONLY); fErrorText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL)); fErrorText.setBackground(fErrorText.getDisplay() .getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); fErrorText.setFont(parent.getFont()); }
public XMLCatalogEntryDetailsView(Composite parent) { Color color = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); detailsText = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); GridData data = new GridData(GridData.FILL_BOTH); data.heightHint = 85; detailsText.setLayoutData(data); verticalScroll = detailsText.getVerticalBar(); // verticalScroll.setVisible(false); horizontalScroll = detailsText.getHorizontalBar(); detailsText.setEditable(false); detailsText.setBackground(color); }
public void setBackground (Color color) { super.setBackground(color); background = color; if (text != null) text.setBackground(color); if (list != null) list.setBackground(color); if (arrow != null) arrow.setBackground(color); } /**
@Override protected void addCustomFooterControls(Composite parent) { Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.SelectLaunchersDialog_5, 1, 1, GridData.FILL_BOTH); this.description = SWTFactory.createText(group, SWT.WRAP | SWT.READ_ONLY, 1, GridData.FILL_BOTH); this.description.setBackground(group.getBackground()); }
@Override public void setBackground (Color color) { super.setBackground(color); background = color; if (text != null) text.setBackground(color); if (list != null) list.setBackground(color); if (arrow != null) arrow.setBackground(color); } /**
@Override public void setBackground (Color color) { super.setBackground(color); background = color; if (text != null) text.setBackground(color); if (list != null) list.setBackground(color); if (arrow != null) arrow.setBackground(color); } /**
private void setBackgroundColor(Color background) { fTableViewer.getTable().setBackground(background); fFilterText.setBackground(background); fComposite.setBackground(background); }
@Override protected void addCustomFooterControls(Composite parent) { super.addCustomFooterControls(parent); Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_2, 1, 1, GridData.FILL_BOTH); GridData gd = (GridData) group.getLayoutData(); gd.heightHint = 100; fDescriptionText = SWTFactory.createText(group, SWT.WRAP | SWT.READ_ONLY, 1, GridData.FILL_HORIZONTAL); fDescriptionText.setBackground(group.getBackground()); }
/** * @see org.eclipse.ui.IWorkbenchPart#createPartControl(Composite) */ @Override public void createPartControl(Composite parent) { fText = new Text(parent,SWT.MULTI|SWT.READ_ONLY|SWT.WRAP); fText.setForeground(JFaceColors.getErrorText(fText.getDisplay())); fText.setBackground(fText.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); if (getEditorInput() != null) { setInput(getEditorInput()); } }
@Override public void setBackground(Color backgroundColor) { super.setBackground(backgroundColor); dateText.setBackground(backgroundColor); if ((getStyle() & SWT.FLAT) != 0) { pickButton.setBackground(backgroundColor); clearControl.setBackground(backgroundColor); } else { pickButton.setBackground(null); clearControl.setBackground(null); } }