Search in sources :

Example 1 with DashboardItem

use of org.jkiss.dbeaver.ui.dashboard.control.DashboardItem in project dbeaver by serge-rider.

the class DashboardItemViewDialog method createDialogArea.

@Override
protected Composite createDialogArea(Composite parent) {
    Composite dialogArea = super.createDialogArea(parent);
    Composite chartGroup = UIUtils.createPlaceholder(dialogArea, 1);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 450;
    gd.heightHint = 300;
    chartGroup.setLayoutData(gd);
    chartGroup.setLayout(new FillLayout());
    DashboardListViewer dashboardListViewer = new DashboardListViewer(parentPart.getSite(), sourceItem.getDataSourceContainer(), parentPart.getViewConfiguration());
    dashboardListViewer.setSingleChartMode(true);
    dashboardListViewer.createControl(chartGroup);
    DashboardItem targetItem = new DashboardItem((DashboardList) dashboardListViewer.getDefaultGroup(), sourceItem.getDashboardId());
    targetItem.moveViewFrom(sourceItem, false);
    return dialogArea;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) DashboardItem(org.jkiss.dbeaver.ui.dashboard.control.DashboardItem) FillLayout(org.eclipse.swt.layout.FillLayout) DashboardListViewer(org.jkiss.dbeaver.ui.dashboard.control.DashboardListViewer)

Example 2 with DashboardItem

use of org.jkiss.dbeaver.ui.dashboard.control.DashboardItem in project dbeaver by dbeaver.

the class DashboardItemViewDialog method createDialogArea.

@Override
protected Composite createDialogArea(Composite parent) {
    Composite dialogArea = super.createDialogArea(parent);
    Composite chartGroup = UIUtils.createPlaceholder(dialogArea, 1);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 450;
    gd.heightHint = 300;
    chartGroup.setLayoutData(gd);
    chartGroup.setLayout(new FillLayout());
    DashboardListViewer dashboardListViewer = new DashboardListViewer(parentPart.getSite(), sourceItem.getDataSourceContainer(), parentPart.getViewConfiguration());
    dashboardListViewer.setSingleChartMode(true);
    dashboardListViewer.createControl(chartGroup);
    DashboardItem targetItem = new DashboardItem((DashboardList) dashboardListViewer.getDefaultGroup(), sourceItem.getDashboardId());
    targetItem.moveViewFrom(sourceItem, false);
    return dialogArea;
}
Also used : Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) DashboardItem(org.jkiss.dbeaver.ui.dashboard.control.DashboardItem) FillLayout(org.eclipse.swt.layout.FillLayout) DashboardListViewer(org.jkiss.dbeaver.ui.dashboard.control.DashboardListViewer)

Aggregations

FillLayout (org.eclipse.swt.layout.FillLayout)2 GridData (org.eclipse.swt.layout.GridData)2 Composite (org.eclipse.swt.widgets.Composite)2 DashboardItem (org.jkiss.dbeaver.ui.dashboard.control.DashboardItem)2 DashboardListViewer (org.jkiss.dbeaver.ui.dashboard.control.DashboardListViewer)2