Search in sources :

Example 61 with ScrolledComposite

use of org.eclipse.swt.custom.ScrolledComposite in project bndtools by bndtools.

the class ErrorDialog method createDialogArea.

@Override
protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);
    Composite c2 = new Composite(composite, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 5;
    gridLayout.marginWidth = 0;
    gridLayout.marginHeight = 10;
    c2.setLayout(gridLayout);
    c2.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    Label label = new Label(c2, SWT.NONE);
    label.setText(Messages.project);
    Text projName = new Text(c2, SWT.BORDER);
    projName.setEditable(false);
    projName.setText(name);
    ScrolledComposite scrolled = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL);
    gridLayout = new GridLayout();
    gridLayout.numColumns = 1;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 5;
    gridLayout.marginWidth = 10;
    gridLayout.marginHeight = 10;
    scrolled.setLayout(gridLayout);
    GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
    scrolled.setLayoutData(gridData);
    errorList.createControl(scrolled);
    scrolled.setExpandHorizontal(true);
    scrolled.setExpandVertical(true);
    scrolled.setContent(errorList.getControl());
    // scrolled.setMinSize(500, 500);
    scrolled.layout(true);
    return composite;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Text(org.eclipse.swt.widgets.Text)

Aggregations

ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)61 GridData (org.eclipse.swt.layout.GridData)45 Composite (org.eclipse.swt.widgets.Composite)44 GridLayout (org.eclipse.swt.layout.GridLayout)40 Label (org.eclipse.swt.widgets.Label)27 FillLayout (org.eclipse.swt.layout.FillLayout)16 SelectionEvent (org.eclipse.swt.events.SelectionEvent)15 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)13 Point (org.eclipse.swt.graphics.Point)12 Button (org.eclipse.swt.widgets.Button)12 Text (org.eclipse.swt.widgets.Text)12 Control (org.eclipse.swt.widgets.Control)10 ControlEvent (org.eclipse.swt.events.ControlEvent)9 Group (org.eclipse.swt.widgets.Group)9 HistoryComposite (com.cubrid.cubridmanager.ui.monitoring.editor.internal.HistoryComposite)8 Rectangle (org.eclipse.swt.graphics.Rectangle)7 ArrayList (java.util.ArrayList)5 ControlListener (org.eclipse.swt.events.ControlListener)5 FormAttachment (org.eclipse.swt.layout.FormAttachment)5 FormData (org.eclipse.swt.layout.FormData)5