composite.setBackgroundMode(SWT.INHERIT_DEFAULT);
/** * Create the parent composite and a form layout that will be used to manage * decorations. */ private Composite createForm(Composite parent) { Composite composite = new Composite(parent, SWT.NO_FOCUS); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=126553 composite.setBackgroundMode(SWT.INHERIT_DEFAULT); composite.setLayout(new FormLayout()); return composite; }
/** * Create the parent composite and a form layout that will be used to manage * decorations. */ private Composite createForm(Composite parent) { Composite composite = new Composite(parent, SWT.NO_FOCUS); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=126553 composite.setBackgroundMode(SWT.INHERIT_DEFAULT); composite.setLayout(new FormLayout()); return composite; }
private void createUIParent() { uiParent = new Composite( shell, SWT.NONE ); uiParent.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI ); uiParent.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false ) ); uiParent.setBackgroundMode( SWT.INHERIT_DEFAULT ); GridLayout layout = new GridLayout( 4, false ); layout.marginHeight = 0; layout.marginWidth = 10; layout.verticalSpacing = 0; uiParent.setLayout( layout ); }
/** * Create the parent composite and a form layout that will be used to manage * decorations. */ private Composite createForm(Composite parent) { Composite composite = new Composite(parent, SWT.NO_FOCUS); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=126553 composite.setBackgroundMode(SWT.INHERIT_DEFAULT); composite.setLayout(new FormLayout()); return composite; }
@Override protected void applyCSSProperty(Control control, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception { if (value.getCssValueType() != CSSValue.CSS_PRIMITIVE_VALUE) { return; } if (control instanceof Composite) { Composite composite = (Composite) control; String stringValue = value.getCssText().toLowerCase(); if ("default".equalsIgnoreCase(stringValue)) { composite.setBackgroundMode(SWT.INHERIT_DEFAULT); } else if ("force".equalsIgnoreCase(stringValue)) { composite.setBackgroundMode(SWT.INHERIT_FORCE); } else if ("none".equalsIgnoreCase(stringValue)) { composite.setBackgroundMode(SWT.INHERIT_NONE); } } }
@Override protected void applyCSSProperty(Control control, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception { if (value.getCssValueType() != CSSValue.CSS_PRIMITIVE_VALUE) { return; } if (control instanceof Composite) { Composite composite = (Composite) control; String stringValue = value.getCssText().toLowerCase(); if ("default".equalsIgnoreCase(stringValue)) { composite.setBackgroundMode(SWT.INHERIT_DEFAULT); } else if ("force".equalsIgnoreCase(stringValue)) { composite.setBackgroundMode(SWT.INHERIT_FORCE); } else if ("none".equalsIgnoreCase(stringValue)) { composite.setBackgroundMode(SWT.INHERIT_NONE); } } }
private void setupIPFilterOption(SWTSkinObjectContainer so) { Composite parent = so.getComposite(); parent.setBackgroundMode( SWT.INHERIT_FORCE ); // win 7 classic theme shows grey background without this parent.setLayout( new GridLayout()); Button button = new Button(parent, SWT.CHECK | SWT.WRAP ); Messages.setLanguageText(button, "MyTorrentsView.menu.ipf_enable"); GridData gd = new GridData(); gd.verticalAlignment = SWT.CENTER; button.setLayoutData(gd); button.setSelection(!torrentOptions.disableIPFilter); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { torrentOptions.disableIPFilter = !((Button) e.widget).getSelection(); } }); }
private void createPreviewArea( Composite parent ) { Composite previewArea = new Composite( parent, SWT.BORDER ); GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, true, 2, 1 ); gridData.minimumWidth = 300; previewArea.setLayoutData( gridData ); previewArea.setLayout( new GridLayout() ); lblPreview = new Label( previewArea, SWT.CENTER ); GridData labelData = new GridData( SWT.FILL, SWT.CENTER, true, true ); lblPreview.setLayoutData( labelData ); lblPreview.setText( RWTMessages.getMessage( "RWT_FontDialogPreviewText" ) ); Color bgColor = getDisplay().getSystemColor( SWT.COLOR_LIST_BACKGROUND ); previewArea.setBackground( bgColor ); previewArea.setBackgroundMode( SWT.INHERIT_DEFAULT ); }
final Composite p = new Composite(parent, SWT.NONE); p.setData(CSS_CLASS_KEY, "container"); p.setBackgroundMode(SWT.INHERIT_DEFAULT); p.setLayout(new GridLayout(2, false)); Label l = new Label(p, SWT.NONE); l.setData(CSS_CLASS_KEY, "h2"); l.setText("This is a headline"); l.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false, 2, 1)); engine.applyStyles(p, true); // Apply the CSS-Instructions of the current active theme
public static void init(ActionContext actionContext){ Action action = World.getInstance().getAction("xworker.swt.widgets.Control/@actions/@init"); action.run(actionContext); Thing self = (Thing) actionContext.get("self"); Composite composite = (Composite) actionContext.get("control"); String backgroundMode = self.getStringBlankAsNull("backgroundMode"); if(backgroundMode != null){ if("INHERIT_NONE".equals(backgroundMode)){ composite.setBackgroundMode(SWT.INHERIT_NONE); }else if("INHERIT_DEFAULT".equals(backgroundMode)){ composite.setBackgroundMode(SWT.INHERIT_DEFAULT); }else if("INHERIT_FORCE".equals(backgroundMode)){ composite.setBackgroundMode(SWT.INHERIT_FORCE); } } }
createOn.setBackgroundMode(SWT.INHERIT_FORCE);
createOn.setBackgroundMode(SWT.INHERIT_FORCE);
createOn.setBackgroundMode(SWT.INHERIT_FORCE); c = createOn;
fContainer.setLayoutData(layoutData); fContainer.addTraverseListener(e -> e.doit = true); fContainer.setBackgroundMode(SWT.INHERIT_DEFAULT);
control.setBackground (null); control.setBackgroundImage (null); if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_NONE);
body.setBackgroundMode(SWT.INHERIT_FORCE);
private HeaderInfo addHeader(String id, String title, AERunnable runnable) { Composite composite = new Composite(topArea, SWT.NONE); HeaderInfo headerInfo = new HeaderInfo(id, runnable, composite); composite.setBackgroundMode(SWT.INHERIT_FORCE); FillLayout fillLayout = new FillLayout(); fillLayout.marginWidth = 6; fillLayout.marginHeight = 2; composite.setLayout(fillLayout); Display d = composite.getDisplay(); composite.setBackground(Colors.getSystemColor(d, SWT.COLOR_LIST_BACKGROUND)); composite.setForeground(Colors.getSystemColor(d, SWT.COLOR_LIST_FOREGROUND)); Label control = new Label(composite, SWT.NONE); Messages.setLanguageText(control, title); control.setData("ID", headerInfo); control.addListener(SWT.MouseEnter, headerListener); control.addListener(SWT.Touch, headerListener); control.addListener(SWT.MouseExit, headerListener); control.addListener(SWT.Paint, headerListener); listHeaders.add(headerInfo); return headerInfo; }
if (!control.isDisposed()) { if (hovering) { if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_NONE); control.setBackgroundImage(null); control.setBackground(getBackground()); } else { if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_DEFAULT); Rectangle bounds = control.getBounds(); int tabHeight = getTabHeight();
if (!control.isDisposed()) { if (hovering) { if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_NONE); control.setBackgroundImage(null); control.setBackground(getBackground()); } else { if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_DEFAULT); Rectangle bounds = control.getBounds(); int tabHeight = getTabHeight();