use of org.eclipse.ui.forms.ManagedForm in project yamcs-studio by yamcs.
the class StyleEditor method createPartControl.
@Override
public void createPartControl(Composite parent) {
tk = new FormToolkit(parent.getDisplay());
Composite formWrapper = tk.createComposite(parent);
GridLayout gl = new GridLayout();
formWrapper.setLayout(gl);
form = tk.createScrolledForm(formWrapper);
form.setText("Style Editor");
form.setLayoutData(new GridData(GridData.FILL_BOTH));
gl = new GridLayout();
form.getBody().setLayout(gl);
Section section = tk.createSection(form.getBody(), Section.TITLE_BAR);
section.setText("Colors");
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
StyleDefinition def = loadData(parent.getDisplay());
ManagedForm managedForm = new ManagedForm(tk, form);
resourceManager = new LocalResourceManager(JFaceResources.getResources());
new ThemeColorBlock(def, parent.getDisplay(), resourceManager).createContent(managedForm);
ManagedForm fontsMForm = new ManagedForm(tk, form);
section = tk.createSection(form.getBody(), Section.TITLE_BAR);
section.setText("Fonts");
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
new ThemeColorBlock(def, parent.getDisplay(), resourceManager).createContent(fontsMForm);
}
Aggregations