Search in sources :

Example 1 with DCISummaryTableColumnSelector

use of org.netxms.ui.eclipse.dashboard.widgets.DCISummaryTableColumnSelector in project netxms by netxms.

the class DCISummaryTableSortColumnSelectionDialog method createDialogArea.

/* (non-Javadoc)
    * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
    */
@Override
protected Control createDialogArea(Composite parent) {
    Composite dialogArea = (Composite) super.createDialogArea(parent);
    final NXCSession session = (NXCSession) ConsoleSharedData.getSession();
    new ConsoleJob("Get summary table configuration by id", null, Activator.PLUGIN_ID, null) {

        @Override
        protected void runInternal(IProgressMonitor monitor) throws Exception {
            sourceSummaryTable = session.getDciSummaryTable(summaryTableId);
            runInUIThread(new Runnable() {

                @Override
                public void run() {
                    refresh();
                }
            });
        }

        @Override
        protected String getErrorMessage() {
            return "Unable to get summary table configuration";
        }
    }.start();
    GridLayout layout = new GridLayout();
    dialogArea.setLayout(layout);
    selector = new DCISummaryTableColumnSelector(dialogArea, SWT.NONE, AbstractSelector.SHOW_CLEAR_BUTTON, sortingColumn, null, sourceSummaryTable);
    selector.setLabel("Filter column name");
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 520;
    selector.setLayoutData(gd);
    descSorting = new Button(dialogArea, SWT.CHECK);
    gd = new GridData();
    // gd.horizontalAlignment = SWT.FILL;
    // gd.grabExcessHorizontalSpace = true;
    descSorting.setText("Use descending sorting");
    descSorting.setLayoutData(gd);
    descSorting.setSelection(isDescSorting);
    return dialogArea;
}
Also used : IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) GridLayout(org.eclipse.swt.layout.GridLayout) NXCSession(org.netxms.client.NXCSession) DCISummaryTableColumnSelector(org.netxms.ui.eclipse.dashboard.widgets.DCISummaryTableColumnSelector) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) GridData(org.eclipse.swt.layout.GridData) ConsoleJob(org.netxms.ui.eclipse.jobs.ConsoleJob)

Aggregations

IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Button (org.eclipse.swt.widgets.Button)1 Composite (org.eclipse.swt.widgets.Composite)1 NXCSession (org.netxms.client.NXCSession)1 DCISummaryTableColumnSelector (org.netxms.ui.eclipse.dashboard.widgets.DCISummaryTableColumnSelector)1 ConsoleJob (org.netxms.ui.eclipse.jobs.ConsoleJob)1