use of org.eclipse.ui.forms.widgets.TableWrapLayout in project cubrid-manager by CUBRID.
the class NoticeDashboardPage method createFormContent.
protected void createFormContent(IManagedForm managedForm) {
super.createFormContent(managedForm);
toolkit = managedForm.getToolkit();
form = managedForm.getForm();
toolkit.decorateFormHeading(form.getForm());
String title = client.equals("CMT") ? Messages.titleCUBRIDMigration : client.equals("CQB") ? Messages.titleCUBRIDQuery : Messages.titleCUBRIDManager;
form.setText(title);
form.setFont(new Font(Display.getCurrent(), "Arial", 13, SWT.BOLD));
Composite composite = form.getBody();
TableWrapLayout layout2 = new TableWrapLayout();
layout2.numColumns = 2;
layout2.makeColumnsEqualWidth = true;
composite.setLayout(layout2);
TableWrapLayout layout1 = new TableWrapLayout();
layout1.numColumns = 1;
TableWrapData twd;
left = toolkit.createComposite(composite, SWT.None);
left.setLayout(layout1);
twd = new TableWrapData(TableWrapData.FILL_GRAB);
left.setLayoutData(twd);
layout1 = new TableWrapLayout();
layout1.numColumns = 1;
right = toolkit.createComposite(composite, SWT.None);
right.setLayout(layout1);
twd = new TableWrapData(TableWrapData.FILL_GRAB);
right.setLayoutData(twd);
createContentSections(left, right);
ScheduledExecutorService pool = Executors.newSingleThreadScheduledExecutor();
pool.schedule(new Runnable() {
public void run() {
initData();
Display.getDefault().syncExec(new Runnable() {
public void run() {
setContent();
}
});
}
}, 10, TimeUnit.MILLISECONDS);
pool.shutdown();
}
use of org.eclipse.ui.forms.widgets.TableWrapLayout in project cubrid-manager by CUBRID.
the class NoticeDashboardPage method createSection.
private Section createSection(Composite parent, String title, String category, int sectionStyle) {
Section section = toolkit.createSection(parent, sectionStyle);
section.clientVerticalSpacing = 5;
section.setLayout(new GridLayout());
section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
section.setText(title);
if (category != null) {
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 1;
Composite composite = toolkit.createComposite(section, SWT.None);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
section.setClient(composite);
FormText text = createFormText(composite);
formTexts.put(category, text);
}
sections.add(section);
return section;
}
Aggregations