Search in sources :

Example 1 with DashboardViewType

use of org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType in project dbeaver by serge-rider.

the class DashboardChartComposite method fillContextMenu.

@Override
protected void fillContextMenu(IMenuManager manager) {
    if (!isSingleChartMode()) {
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_VIEW_DASHBOARD));
        manager.add(new Separator());
    }
    super.fillContextMenu(manager);
    if (!UIUtils.isInDialog(this)) {
        manager.add(new Separator());
        MenuManager viewMenu = new MenuManager(UIDashboardMessages.dashboard_chart_composite_menu_manager_text);
        List<DashboardViewType> viewTypes = DashboardRegistry.getInstance().getSupportedViewTypes(dashboardContainer.getDashboardDataType());
        for (DashboardViewType viewType : viewTypes) {
            Action changeViewAction = new Action(viewType.getTitle(), Action.AS_RADIO_BUTTON) {

                @Override
                public boolean isChecked() {
                    return dashboardContainer.getDashboardViewType() == viewType;
                }

                @Override
                public void runWithEvent(Event event) {
                    ((DashboardItem) dashboardContainer).getDashboardConfig().setViewType(viewType);
                    dashboardContainer.getGroup().getView().getViewConfiguration().saveSettings();
                    dashboardContainer.updateDashboardView();
                }
            };
            if (viewType.getIcon() != null) {
                changeViewAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(viewType.getIcon()));
            }
            viewMenu.add(changeViewAction);
        }
        manager.add(viewMenu);
    }
    if (!isSingleChartMode()) {
        manager.add(new Separator());
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_ADD_DASHBOARD));
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_REMOVE_DASHBOARD));
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_RESET_DASHBOARD));
    }
}
Also used : Action(org.eclipse.jface.action.Action) DashboardViewType(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) Event(org.eclipse.swt.widgets.Event) MouseEvent(org.eclipse.swt.events.MouseEvent) Separator(org.eclipse.jface.action.Separator)

Example 2 with DashboardViewType

use of org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType in project dbeaver by serge-rider.

the class DashboardItemConfigDialog method createDialogArea.

@Override
protected Composite createDialogArea(Composite parent) {
    Composite composite = super.createDialogArea(parent);
    {
        Group infoGroup = UIUtils.createControlGroup(composite, UIDashboardMessages.dialog_dashboard_item_config_dashboardinfo, 4, GridData.FILL_HORIZONTAL, 0);
        // UIUtils.createLabelText(infoGroup, "ID", dashboardConfig.getDashboardDescriptor().getId(), SWT.BORDER | SWT.READ_ONLY);
        UIUtils.createLabelText(infoGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardinfo_labels_name, dashboardConfig.getDashboardDescriptor().getName(), SWT.BORDER | SWT.READ_ONLY).setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false, 3, 1));
        UIUtils.createControlLabel(infoGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardinfo_labels_description).setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
        Text descriptionText = new Text(infoGroup, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
        descriptionText.setText(CommonUtils.notEmpty(dashboardConfig.getDescription()));
        descriptionText.addModifyListener(e -> {
            dashboardConfig.setDescription(descriptionText.getText());
        });
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.widthHint = 200;
        gd.heightHint = 50;
        descriptionText.setLayoutData(gd);
        if (SHOW_QUERIES_BUTTON) {
            Composite btnGroup = UIUtils.createComposite(infoGroup, 1);
            btnGroup.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false, 4, 1));
            Button queriesButton = new Button(btnGroup, SWT.PUSH);
            queriesButton.setText(UIDashboardMessages.dialog_dashboard_item_config_buttons_sqlqueries);
            queriesButton.setImage(DBeaverIcons.getImage(UIIcon.SQL_SCRIPT));
            queriesButton.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, true, false));
            queriesButton.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    StringBuilder sql = new StringBuilder();
                    for (DashboardDescriptor.QueryMapping query : dashboardConfig.getDashboardDescriptor().getQueries()) {
                        sql.append(query.getQueryText()).append(";\n");
                    }
                    UIServiceSQL serviceSQL = DBWorkbench.getService(UIServiceSQL.class);
                    if (serviceSQL != null) {
                        serviceSQL.openSQLViewer(DBUtils.getDefaultContext(dashboardContainer.getDataSourceContainer().getDataSource(), true), UIDashboardMessages.dialog_dashboard_item_config_buttons_sqlqueries_dash, UIIcon.SQL_SCRIPT, sql.toString(), false, false);
                    }
                }
            });
            queriesButton.setEnabled(dashboardContainer.getDataSourceContainer().isConnected());
        }
    }
    {
        Group updateGroup = UIUtils.createControlGroup(composite, UIDashboardMessages.dialog_dashboard_item_config_dashboardupdate, 2, GridData.FILL_HORIZONTAL, 0);
        Text updatePeriodText = UIUtils.createLabelText(updateGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardupdate_labels_updateperiod, String.valueOf(dashboardConfig.getUpdatePeriod()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
        updatePeriodText.addModifyListener(e -> {
            dashboardConfig.setUpdatePeriod(CommonUtils.toLong(updatePeriodText.getText(), dashboardConfig.getUpdatePeriod()));
        });
        Text maxItemsText = UIUtils.createLabelText(updateGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardupdate_labels_maxitems, String.valueOf(dashboardConfig.getMaxItems()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
        maxItemsText.addModifyListener(e -> {
            dashboardConfig.setMaxItems(CommonUtils.toInt(maxItemsText.getText(), dashboardConfig.getMaxItems()));
        });
    /*
            Text maxAgeText = UIUtils.createLabelText(updateGroup, "Maximum age (ISO-8601)", DashboardUtils.formatDuration(dashboardConfig.getMaxAge()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
            maxAgeText.addModifyListener(e -> {
                dashboardConfig.setMaxAge(DashboardUtils.parseDuration(maxAgeText.getText(), dashboardConfig.getMaxAge()));
            });
*/
    }
    {
        Group viewGroup = UIUtils.createControlGroup(composite, UIDashboardMessages.dialog_dashboard_item_config_dashboardview, 2, GridData.FILL_HORIZONTAL, 0);
        Combo typeCombo = UIUtils.createLabelCombo(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_combos_view, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_combos_view_tooltip, SWT.BORDER | SWT.READ_ONLY);
        typeCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        {
            List<DashboardViewType> viewTypes = DashboardRegistry.getInstance().getSupportedViewTypes(dashboardConfig.getDashboardDescriptor().getDataType());
            for (DashboardViewType viewType : viewTypes) {
                typeCombo.add(viewType.getTitle());
            }
            typeCombo.setText(dashboardConfig.getViewType().getTitle());
            typeCombo.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    dashboardConfig.setViewType(viewTypes.get(typeCombo.getSelectionIndex()));
                }
            });
        }
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_legend, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_legend_tooltip, dashboardConfig.isLegendVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setLegendVisible(((Button) e.widget).getSelection());
            }
        });
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_grid, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_grid_tooltip, dashboardConfig.isGridVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setGridVisible(((Button) e.widget).getSelection());
            }
        });
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_domainaxis, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_domainaxis_tooltip, dashboardConfig.isDomainTicksVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setDomainTicksVisible(((Button) e.widget).getSelection());
            }
        });
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_rangeaxis, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_rangeaxis_tooltip, dashboardConfig.isDomainTicksVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setRangeTicksVisible(((Button) e.widget).getSelection());
            }
        });
    /*
            Text widthRatioText = UIUtils.createLabelText(viewGroup, "Width ratio", String.valueOf(dashboardConfig.getWidthRatio()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
            widthRatioText.addModifyListener(e -> {
                dashboardConfig.setWidthRatio((float) CommonUtils.toDouble(widthRatioText.getText(), dashboardConfig.getWidthRatio()));
            });
*/
    }
    return parent;
}
Also used : DBWorkbench(org.jkiss.dbeaver.runtime.DBWorkbench) DashboardContainer(org.jkiss.dbeaver.ui.dashboard.model.DashboardContainer) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DashboardRegistry(org.jkiss.dbeaver.ui.dashboard.registry.DashboardRegistry) CommonUtils(org.jkiss.utils.CommonUtils) DashboardItemViewConfiguration(org.jkiss.dbeaver.ui.dashboard.model.DashboardItemViewConfiguration) UIDashboardMessages(org.jkiss.dbeaver.ui.dashboard.internal.UIDashboardMessages) NLS(org.eclipse.osgi.util.NLS) DBUtils(org.jkiss.dbeaver.model.DBUtils) org.eclipse.swt.widgets(org.eclipse.swt.widgets) IDialogConstants(org.eclipse.jface.dialogs.IDialogConstants) IDialogSettings(org.eclipse.jface.dialogs.IDialogSettings) UIServiceSQL(org.jkiss.dbeaver.runtime.ui.UIServiceSQL) DashboardViewConfiguration(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewConfiguration) BaseDialog(org.jkiss.dbeaver.ui.dialogs.BaseDialog) List(java.util.List) DBeaverIcons(org.jkiss.dbeaver.ui.DBeaverIcons) UIUtils(org.jkiss.dbeaver.ui.UIUtils) DashboardDescriptor(org.jkiss.dbeaver.ui.dashboard.registry.DashboardDescriptor) SWT(org.eclipse.swt.SWT) UIIcon(org.jkiss.dbeaver.ui.UIIcon) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) DashboardViewType(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType) DashboardViewType(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DashboardDescriptor(org.jkiss.dbeaver.ui.dashboard.registry.DashboardDescriptor) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) UIServiceSQL(org.jkiss.dbeaver.runtime.ui.UIServiceSQL)

Example 3 with DashboardViewType

use of org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType in project dbeaver by dbeaver.

the class DashboardChartComposite method fillContextMenu.

@Override
protected void fillContextMenu(IMenuManager manager) {
    if (!isSingleChartMode()) {
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_VIEW_DASHBOARD));
        manager.add(new Separator());
    }
    super.fillContextMenu(manager);
    if (!UIUtils.isInDialog(this)) {
        manager.add(new Separator());
        MenuManager viewMenu = new MenuManager(UIDashboardMessages.dashboard_chart_composite_menu_manager_text);
        List<DashboardViewType> viewTypes = DashboardRegistry.getInstance().getSupportedViewTypes(dashboardContainer.getDashboardDataType());
        for (DashboardViewType viewType : viewTypes) {
            Action changeViewAction = new Action(viewType.getTitle(), Action.AS_RADIO_BUTTON) {

                @Override
                public boolean isChecked() {
                    return dashboardContainer.getDashboardViewType() == viewType;
                }

                @Override
                public void runWithEvent(Event event) {
                    ((DashboardItem) dashboardContainer).getDashboardConfig().setViewType(viewType);
                    dashboardContainer.getGroup().getView().getViewConfiguration().saveSettings();
                    dashboardContainer.updateDashboardView();
                }
            };
            if (viewType.getIcon() != null) {
                changeViewAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(viewType.getIcon()));
            }
            viewMenu.add(changeViewAction);
        }
        manager.add(viewMenu);
    }
    if (!isSingleChartMode()) {
        manager.add(new Separator());
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_ADD_DASHBOARD));
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_REMOVE_DASHBOARD));
        manager.add(ActionUtils.makeCommandContribution(UIUtils.getActiveWorkbenchWindow(), DashboardConstants.CMD_RESET_DASHBOARD));
    }
}
Also used : Action(org.eclipse.jface.action.Action) DashboardViewType(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) Event(org.eclipse.swt.widgets.Event) MouseEvent(org.eclipse.swt.events.MouseEvent) Separator(org.eclipse.jface.action.Separator)

Example 4 with DashboardViewType

use of org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType in project dbeaver by dbeaver.

the class DashboardItemConfigDialog method createDialogArea.

@Override
protected Composite createDialogArea(Composite parent) {
    Composite composite = super.createDialogArea(parent);
    {
        Group infoGroup = UIUtils.createControlGroup(composite, UIDashboardMessages.dialog_dashboard_item_config_dashboardinfo, 4, GridData.FILL_HORIZONTAL, 0);
        // UIUtils.createLabelText(infoGroup, "ID", dashboardConfig.getDashboardDescriptor().getId(), SWT.BORDER | SWT.READ_ONLY);
        UIUtils.createLabelText(infoGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardinfo_labels_name, dashboardConfig.getDashboardDescriptor().getName(), SWT.BORDER | SWT.READ_ONLY).setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false, 3, 1));
        UIUtils.createControlLabel(infoGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardinfo_labels_description).setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
        Text descriptionText = new Text(infoGroup, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
        descriptionText.setText(CommonUtils.notEmpty(dashboardConfig.getDescription()));
        descriptionText.addModifyListener(e -> {
            dashboardConfig.setDescription(descriptionText.getText());
        });
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.widthHint = 200;
        gd.heightHint = 50;
        descriptionText.setLayoutData(gd);
        if (SHOW_QUERIES_BUTTON) {
            Composite btnGroup = UIUtils.createComposite(infoGroup, 1);
            btnGroup.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false, 4, 1));
            Button queriesButton = new Button(btnGroup, SWT.PUSH);
            queriesButton.setText(UIDashboardMessages.dialog_dashboard_item_config_buttons_sqlqueries);
            queriesButton.setImage(DBeaverIcons.getImage(UIIcon.SQL_SCRIPT));
            queriesButton.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, true, false));
            queriesButton.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    StringBuilder sql = new StringBuilder();
                    for (DashboardDescriptor.QueryMapping query : dashboardConfig.getDashboardDescriptor().getQueries()) {
                        sql.append(query.getQueryText()).append(";\n");
                    }
                    UIServiceSQL serviceSQL = DBWorkbench.getService(UIServiceSQL.class);
                    if (serviceSQL != null) {
                        serviceSQL.openSQLViewer(DBUtils.getDefaultContext(dashboardContainer.getDataSourceContainer().getDataSource(), true), UIDashboardMessages.dialog_dashboard_item_config_buttons_sqlqueries_dash, UIIcon.SQL_SCRIPT, sql.toString(), false, false);
                    }
                }
            });
            queriesButton.setEnabled(dashboardContainer.getDataSourceContainer().isConnected());
        }
    }
    {
        Group updateGroup = UIUtils.createControlGroup(composite, UIDashboardMessages.dialog_dashboard_item_config_dashboardupdate, 2, GridData.FILL_HORIZONTAL, 0);
        Text updatePeriodText = UIUtils.createLabelText(updateGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardupdate_labels_updateperiod, String.valueOf(dashboardConfig.getUpdatePeriod()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
        updatePeriodText.addModifyListener(e -> {
            dashboardConfig.setUpdatePeriod(CommonUtils.toLong(updatePeriodText.getText(), dashboardConfig.getUpdatePeriod()));
        });
        Text maxItemsText = UIUtils.createLabelText(updateGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardupdate_labels_maxitems, String.valueOf(dashboardConfig.getMaxItems()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
        maxItemsText.addModifyListener(e -> {
            dashboardConfig.setMaxItems(CommonUtils.toInt(maxItemsText.getText(), dashboardConfig.getMaxItems()));
        });
    /*
            Text maxAgeText = UIUtils.createLabelText(updateGroup, "Maximum age (ISO-8601)", DashboardUtils.formatDuration(dashboardConfig.getMaxAge()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
            maxAgeText.addModifyListener(e -> {
                dashboardConfig.setMaxAge(DashboardUtils.parseDuration(maxAgeText.getText(), dashboardConfig.getMaxAge()));
            });
*/
    }
    {
        Group viewGroup = UIUtils.createControlGroup(composite, UIDashboardMessages.dialog_dashboard_item_config_dashboardview, 2, GridData.FILL_HORIZONTAL, 0);
        Combo typeCombo = UIUtils.createLabelCombo(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_combos_view, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_combos_view_tooltip, SWT.BORDER | SWT.READ_ONLY);
        typeCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        {
            List<DashboardViewType> viewTypes = DashboardRegistry.getInstance().getSupportedViewTypes(dashboardConfig.getDashboardDescriptor().getDataType());
            for (DashboardViewType viewType : viewTypes) {
                typeCombo.add(viewType.getTitle());
            }
            typeCombo.setText(dashboardConfig.getViewType().getTitle());
            typeCombo.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    dashboardConfig.setViewType(viewTypes.get(typeCombo.getSelectionIndex()));
                }
            });
        }
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_legend, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_legend_tooltip, dashboardConfig.isLegendVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setLegendVisible(((Button) e.widget).getSelection());
            }
        });
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_grid, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_grid_tooltip, dashboardConfig.isGridVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setGridVisible(((Button) e.widget).getSelection());
            }
        });
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_domainaxis, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_domainaxis_tooltip, dashboardConfig.isDomainTicksVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setDomainTicksVisible(((Button) e.widget).getSelection());
            }
        });
        UIUtils.createCheckbox(viewGroup, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_rangeaxis, UIDashboardMessages.dialog_dashboard_item_config_dashboardview_checkboxes_rangeaxis_tooltip, dashboardConfig.isDomainTicksVisible(), 2).addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                dashboardConfig.setRangeTicksVisible(((Button) e.widget).getSelection());
            }
        });
    /*
            Text widthRatioText = UIUtils.createLabelText(viewGroup, "Width ratio", String.valueOf(dashboardConfig.getWidthRatio()), SWT.BORDER, new GridData(GridData.FILL_HORIZONTAL));
            widthRatioText.addModifyListener(e -> {
                dashboardConfig.setWidthRatio((float) CommonUtils.toDouble(widthRatioText.getText(), dashboardConfig.getWidthRatio()));
            });
*/
    }
    return parent;
}
Also used : DBWorkbench(org.jkiss.dbeaver.runtime.DBWorkbench) DashboardContainer(org.jkiss.dbeaver.ui.dashboard.model.DashboardContainer) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DashboardRegistry(org.jkiss.dbeaver.ui.dashboard.registry.DashboardRegistry) CommonUtils(org.jkiss.utils.CommonUtils) DashboardItemViewConfiguration(org.jkiss.dbeaver.ui.dashboard.model.DashboardItemViewConfiguration) UIDashboardMessages(org.jkiss.dbeaver.ui.dashboard.internal.UIDashboardMessages) NLS(org.eclipse.osgi.util.NLS) DBUtils(org.jkiss.dbeaver.model.DBUtils) org.eclipse.swt.widgets(org.eclipse.swt.widgets) IDialogConstants(org.eclipse.jface.dialogs.IDialogConstants) IDialogSettings(org.eclipse.jface.dialogs.IDialogSettings) UIServiceSQL(org.jkiss.dbeaver.runtime.ui.UIServiceSQL) DashboardViewConfiguration(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewConfiguration) BaseDialog(org.jkiss.dbeaver.ui.dialogs.BaseDialog) List(java.util.List) DBeaverIcons(org.jkiss.dbeaver.ui.DBeaverIcons) UIUtils(org.jkiss.dbeaver.ui.UIUtils) DashboardDescriptor(org.jkiss.dbeaver.ui.dashboard.registry.DashboardDescriptor) SWT(org.eclipse.swt.SWT) UIIcon(org.jkiss.dbeaver.ui.UIIcon) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) DashboardViewType(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType) DashboardViewType(org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DashboardDescriptor(org.jkiss.dbeaver.ui.dashboard.registry.DashboardDescriptor) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) UIServiceSQL(org.jkiss.dbeaver.runtime.ui.UIServiceSQL)

Aggregations

DashboardViewType (org.jkiss.dbeaver.ui.dashboard.model.DashboardViewType)4 List (java.util.List)2 Action (org.eclipse.jface.action.Action)2 IMenuManager (org.eclipse.jface.action.IMenuManager)2 MenuManager (org.eclipse.jface.action.MenuManager)2 Separator (org.eclipse.jface.action.Separator)2 IDialogConstants (org.eclipse.jface.dialogs.IDialogConstants)2 IDialogSettings (org.eclipse.jface.dialogs.IDialogSettings)2 NLS (org.eclipse.osgi.util.NLS)2 SWT (org.eclipse.swt.SWT)2 MouseEvent (org.eclipse.swt.events.MouseEvent)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 GridData (org.eclipse.swt.layout.GridData)2 org.eclipse.swt.widgets (org.eclipse.swt.widgets)2 Event (org.eclipse.swt.widgets.Event)2 DBUtils (org.jkiss.dbeaver.model.DBUtils)2 DBWorkbench (org.jkiss.dbeaver.runtime.DBWorkbench)2 UIServiceSQL (org.jkiss.dbeaver.runtime.ui.UIServiceSQL)2 DBeaverIcons (org.jkiss.dbeaver.ui.DBeaverIcons)2