Search in sources :

Example 56 with ScrolledComposite

use of org.eclipse.swt.custom.ScrolledComposite in project translationstudio8 by heartsome.

the class ExportFilterSettingDialog method createDialogArea.

/**
	 * Create contents of the dialog.
	 * @param parent
	 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));
    Composite composite = new Composite(container, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    Label filterNameLabel = new Label(composite, SWT.NONE);
    filterNameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    filterNameLabel.setText(Messages.getString("dialog.ExportFilterSettingDialog.filterNameLabel"));
    filterNameText = new Text(composite, SWT.BORDER);
    filterNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    Composite optionComposite = new Composite(container, SWT.NONE);
    optionComposite.setLayout(new GridLayout(2, false));
    optionComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    isAllCbtn = new Button(optionComposite, SWT.RADIO);
    isAllCbtn.setSize(152, 26);
    isAllCbtn.setText(Messages.getString("dialog.ExportFilterSettingDialog.isAllCbtn"));
    isAllCbtn.setSelection(true);
    isAnyCbtn = new Button(optionComposite, SWT.RADIO);
    isAnyCbtn.setText(Messages.getString("dialog.ExportFilterSettingDialog.isAnyCbtn"));
    ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.V_SCROLL | SWT.BORDER);
    scrolledComposite.setAlwaysShowScrollBars(false);
    scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
    scrolledComposite.setExpandHorizontal(true);
    scrolledComposite.setExpandVertical(true);
    dynaComposite = new Composite(scrolledComposite, SWT.NONE);
    dynaComposite.setBackground(Display.getDefault().getSystemColor((SWT.COLOR_WHITE)));
    scrolledComposite.setContent(dynaComposite);
    scrolledComposite.setMinSize(dynaComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    GridLayout gl_dynaComposite = new GridLayout(1, false);
    dynaComposite.setLayout(gl_dynaComposite);
    ExportFilterComposite exportFilterComponent = new ExportFilterComposite(dynaComposite, SWT.None, ruleType);
    exportFilterComponent.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    exportFilterComponent.setDeleteButtonEnabled(false);
    dynaComposite.setData("currentNumber", 1);
    scrolledComposite.setMinSize(dynaComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    initData();
    return container;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Button(org.eclipse.swt.widgets.Button) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Text(org.eclipse.swt.widgets.Text)

Example 57 with ScrolledComposite

use of org.eclipse.swt.custom.ScrolledComposite in project cubrid-manager by CUBRID.

the class TableSchemaCompareInfoPart method createPartControl.

public void createPartControl(final Composite parent) {
    ScrolledComposite scrolledComp = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
    scrolledComp.setLayout(new FillLayout());
    scrolledComp.setExpandHorizontal(true);
    scrolledComp.setExpandVertical(true);
    topSash = new SashForm(scrolledComp, SWT.VERTICAL);
    topSash.setBackground(ResourceManager.getColor(136, 161, 227));
    {
        GridLayout gridLayout = new GridLayout();
        gridLayout.verticalSpacing = 0;
        gridLayout.marginWidth = 0;
        gridLayout.marginHeight = 0;
        gridLayout.horizontalSpacing = 0;
        topSash.setLayout(gridLayout);
    }
    topSash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    topSash.SASH_WIDTH = 1;
    scrolledComp.setContent(topSash);
    showTopButtons();
    Composite tableComposite = new Composite(topSash, SWT.NONE);
    {
        GridLayout layout = new GridLayout();
        layout.marginHeight = 0;
        tableComposite.setLayout(layout);
        createCommonColumnsOnTable(tableComposite);
    }
    labelComposite = new Composite(tableComposite, SWT.NONE);
    {
        GridLayout labelLayout = new GridLayout(6, false);
        labelComposite.setLayout(labelLayout);
        labelComposite.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 1, 1, -1, 25));
    }
    Label labelRedIcon = new Label(labelComposite, SWT.NONE);
    Image redIcon = CommonUIPlugin.getImage("icons/compare/red_ball.png");
    labelRedIcon.setImage(redIcon);
    Label labelRedIconMsg = new Label(labelComposite, SWT.NONE);
    labelRedIconMsg.setText(Messages.differentSchemaMsg);
    boolean isERwinCompareMode = sourceDB.isVirtual() || targetDB.isVirtual();
    if (!isERwinCompareMode) {
        labelYellowIcon = new Label(labelComposite, SWT.NONE);
        labelYellowIcon.setVisible(false);
        {
            Image yellowIcon = CommonUIPlugin.getImage("icons/compare/yellow_ball.png");
            labelYellowIcon.setImage(yellowIcon);
        }
        labelYellowIconMsg = new Label(labelComposite, SWT.NONE);
        labelYellowIconMsg.setText(Messages.diffferntDataMsg);
        labelYellowIconMsg.setVisible(false);
    }
    Label labelGreenIcon = new Label(labelComposite, SWT.NONE);
    Image greenIcon = CommonUIPlugin.getImage("icons/compare/green_ball.png");
    labelGreenIcon.setImage(greenIcon);
    Label labelGreenIconMsg = new Label(labelComposite, SWT.NONE);
    if (isERwinCompareMode) {
        labelGreenIconMsg.setText(Messages.equalSchemaMsg);
    } else {
        labelGreenIconMsg.setText(Messages.totallyEqualMsg);
    }
    createTabFolder(topSash);
    topSash.setWeights(new int[] { 5, 60, 35 });
    // Virtual database is from a ER-Win xml file.
    if (compareRealDatabase) {
        createDetailColumnsOnTable();
    }
    this.setInputs();
}
Also used : SashForm(org.eclipse.swt.custom.SashForm) 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) FillLayout(org.eclipse.swt.layout.FillLayout) Image(org.eclipse.swt.graphics.Image)

Example 58 with ScrolledComposite

use of org.eclipse.swt.custom.ScrolledComposite in project cubrid-manager by CUBRID.

the class QueryEditorPart method createPartControl.

public void createPartControl(Composite parent) {
    ScrolledComposite scrolledComp = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
    FillLayout flayout = new FillLayout();
    scrolledComp.setLayout(flayout);
    topComposite = new Composite(scrolledComp, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.verticalSpacing = 0;
    gridLayout.marginWidth = 0;
    gridLayout.marginHeight = 0;
    gridLayout.horizontalSpacing = 0;
    topComposite.setLayout(gridLayout);
    topComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    scrolledComp.setContent(topComposite);
    scrolledComp.setExpandHorizontal(true);
    scrolledComp.setExpandVertical(true);
    dragController = new QueryEditorDNDController(this);
    hiddenGridDataForNotice = new GridData(0, 0);
    shownGridDataForNotice = CommonUITool.createGridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING, 1, 1, -1, -1);
    noticeMessageArea = new Label(topComposite, SWT.None);
    noticeMessageArea.setText("");
    noticeMessageArea.setLayoutData(hiddenGridDataForNotice);
    //create tool bar
    createToolBar();
    //create SQL editor tab folder
    createCombinedQueryEditorCTabFolder();
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) MultiDBQueryComposite(com.cubrid.common.ui.query.control.MultiDBQueryComposite) QueryResultComposite(com.cubrid.common.ui.query.control.QueryResultComposite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) SQLEditorComposite(com.cubrid.common.ui.query.control.SQLEditorComposite) CombinedQueryEditorComposite(com.cubrid.common.ui.query.control.CombinedQueryEditorComposite) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) FillLayout(org.eclipse.swt.layout.FillLayout)

Example 59 with ScrolledComposite

use of org.eclipse.swt.custom.ScrolledComposite in project cubrid-manager by CUBRID.

the class MessageDialogWithScrollableMessage method createDialogArea.

@Override
public Control createDialogArea(Composite parent) {
    if (this.message.length() == 0) {
        return super.createDialogArea(parent);
    }
    Composite content = (Composite) super.createDialogArea(parent);
    GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
    ScrolledComposite sc = new ScrolledComposite(content, SWT.H_SCROLL | SWT.V_SCROLL);
    Composite composite = new Composite(sc, SWT.NONE);
    composite.setLayout(new FillLayout(SWT.VERTICAL));
    Label l = new Label(composite, SWT.NONE);
    l.setText(message);
    sc.setLayoutData(data);
    sc.setContent(composite);
    sc.setExpandHorizontal(true);
    sc.setExpandVertical(true);
    sc.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    return parent;
}
Also used : 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) FillLayout(org.eclipse.swt.layout.FillLayout)

Example 60 with ScrolledComposite

use of org.eclipse.swt.custom.ScrolledComposite in project cubrid-manager by CUBRID.

the class DatabaseDashboardViewPart method createPartControl.

/**
	 * Creates the SWT controls for this workbench part.
	 *
	 * @param parent the parent control
	 */
public void createPartControl(Composite parent) {
    final ScrolledComposite scrolledComp = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
    composite = new Composite(scrolledComp, SWT.RESIZE);
    GridLayout layout = new GridLayout(1, false);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    chartComp = new Composite(composite, SWT.RESIZE);
    GridLayout chartCompLayout = new GridLayout(1, true);
    chartComp.setLayout(chartCompLayout);
    chartComp.setLayoutData(new GridData(GridData.FILL_BOTH));
    loadCpuChart(chartComp);
    loadMemoryChart(chartComp);
    loadCountChart(chartComp);
    loadDelayChart(chartComp);
    loadDatabaseChart(chartComp);
    sysInfoComp = new Composite(composite, SWT.RESIZE);
    GridLayout sysInfoCompLayout = new GridLayout();
    sysInfoComp.setLayout(sysInfoCompLayout);
    sysInfoComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    loadSystemInfoComposite(sysInfoComp);
    scrolledComp.setContent(composite);
    scrolledComp.setExpandHorizontal(true);
    scrolledComp.setExpandVertical(true);
    scrolledComp.setMinHeight(800);
    scrolledComp.setMinWidth(545);
    makeActions();
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) HistoryComposite(com.cubrid.cubridmanager.ui.monitoring.editor.internal.HistoryComposite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) GridData(org.eclipse.swt.layout.GridData) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite)

Aggregations

ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)89 Composite (org.eclipse.swt.widgets.Composite)67 GridData (org.eclipse.swt.layout.GridData)55 GridLayout (org.eclipse.swt.layout.GridLayout)51 Label (org.eclipse.swt.widgets.Label)39 Point (org.eclipse.swt.graphics.Point)27 Button (org.eclipse.swt.widgets.Button)21 Text (org.eclipse.swt.widgets.Text)20 FillLayout (org.eclipse.swt.layout.FillLayout)19 SelectionEvent (org.eclipse.swt.events.SelectionEvent)18 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)14 Control (org.eclipse.swt.widgets.Control)13 Group (org.eclipse.swt.widgets.Group)13 ControlEvent (org.eclipse.swt.events.ControlEvent)10 Rectangle (org.eclipse.swt.graphics.Rectangle)9 HistoryComposite (com.cubrid.cubridmanager.ui.monitoring.editor.internal.HistoryComposite)8 ArrayList (java.util.ArrayList)7 Combo (org.eclipse.swt.widgets.Combo)7 Image (org.eclipse.swt.graphics.Image)6 FormAttachment (org.eclipse.swt.layout.FormAttachment)6