label.setBackground( perfComposite.getBackground() ); label.setFont( GUIResource.getInstance().getFontMedium() ); button.setBackground( perfComposite.getBackground() ); button.setFont( GUIResource.getInstance().getFontMedium() );
wText.getTextWidget().setBackground( composite.getBackground() ); // make it blend in with the rest...
toolbarLeft.setLayoutData( fdToolbarLeft ); toolbarLeft.setCursor( cursorEnabled ); toolbarLeft.setBackground( toolbarLeft.getParent().getBackground() ); toolbarRight.setLayoutData( fdToolbarRight ); toolbarRight.setCursor( cursorEnabled ); toolbarRight.setBackground( toolbarRight.getParent().getBackground() );
@Override public Color getBackgroundSWT() { // TODO Auto-generated method stub return composite.getBackground(); }
protected Color getValidControlBackground(Control control, Color editableBackground, boolean editable) { if (editable) { return editableBackground; } else { return control.getParent().getBackground(); } }
private Label createLabel(Composite parent, String text) { Label label = new Label(parent, SWT.WRAP); label.setText(text); GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); label.setLayoutData(data); label.setBackground(parent.getBackground()); return label; }
protected Color getValidControlBackground(Control control, Color editableBackground, boolean editable) { if (editable) { return editableBackground; } else { return control.getParent().getBackground(); } }
protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(2, false)); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fullFileNameField = new Text(composite, SWT.NONE); fullFileNameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fullFileNameField.setBackground(parent.getBackground()); fullFileNameField.setEditable(false); super.createButtonBar(composite); return composite; }
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); }
public static void setBG(Control composite) { Composite parent = composite.getParent(); if (parent != null) { Color c = parent.getBackground(); if (c != null) { composite.setBackground(c); } } }
protected Table createEmptyTable(Composite composite, int horizontalSpan) { Table table = new Table(composite, SWT.None); GridData gridData = new GridData(); gridData.horizontalSpan = horizontalSpan; gridData.verticalSpan = 1; gridData.widthHint = 1; gridData.heightHint = 1; table.setLayoutData(gridData); table.setBackground (composite.getBackground()); return table; }
public SWTDebugMouseTrackListener(Control control) { this.control = control; defaultColor = control.getParent().getBackground(); remarkColor = new Color(control.getDisplay(), 255, 0, 0); }
@Override protected Control createContents(Composite cell) { Color bg = cell.getBackground(); composite = new Composite(cell, getStyle()); composite.setBackground(bg); composite.setLayout(new ColorCellLayout()); colorLabel = new Label(composite, SWT.LEFT); colorLabel.setBackground(bg); rgbLabel = new Label(composite, SWT.LEFT); rgbLabel.setBackground(bg); rgbLabel.setFont(cell.getFont()); return composite; }
public Composite createPlainComposite(Composite parent, int style) { Composite c = super.createComposite(parent, style); c.setBackground(parent.getBackground()); paintBordersFor(c); return c; }
public NlsTable(Composite parent, NlsTableModel model) { super(parent, SWT.NONE); setBackground(parent.getBackground()); createContent(this); setModel(model); }
private void createFormText(FormToolkit toolkit, Composite parent, String content, int span) { FormText text = toolkit.createFormText(parent, false); text.setText(content, true, false); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = span; gd.widthHint = 400; text.setLayoutData(gd); text.setBackground(parent.getBackground()); text.addHyperlinkListener(this); }
@Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); if (nativeField) return; Color color= enabled ? getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND) : getParent().getBackground(); setBackground(color); if (fClearButton != null) fClearButton.setBackground(color); } };
private void createHeadingLabel(Composite parent, VirtualMachineImpl vm) { Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 2, 2, GridData.FILL_HORIZONTAL); SWTFactory.createLabel(comp, PropertyPageMessages.VMCapabilitiesPropertyPage_1, fHeadingFont, 1); Text text = SWTFactory.createText(comp, SWT.READ_ONLY, 1, vm.name()+" "+vm.version()); //$NON-NLS-1$ text.setBackground(parent.getBackground()); }
/** * Create content of the hover. This is called after * the input has been set. */ protected void deferredCreateContent() { fillToolbar(); createAnnotationInformation(fParent, getAnnotationInfo().annotation); setColorAndFont(fParent, fParent.getForeground(), fParent.getBackground(), JFaceResources.getDialogFont()); ICompletionProposal[] proposals= getAnnotationInfo().getCompletionProposals(); if (proposals.length > 0) createCompletionProposalsControl(fParent, proposals); fParent.layout(true); }
/** * Create content of the hover. This is called after * the input has been set. */ protected void deferredCreateContent() { fillToolbar(); createAnnotationInformation(fParent, getAnnotationInfo().annotation); setColorAndFont(fParent, fParent.getForeground(), fParent.getBackground(), JFaceResources.getDialogFont()); ICompletionProposal[] proposals= getAnnotationInfo().getCompletionProposals(); if (proposals.length > 0) createCompletionProposalsControl(fParent, proposals); fParent.layout(true); }