use of org.netxms.ui.eclipse.datacollection.widgets.TableConditionsEditor in project netxms by netxms.
the class EditTableThresholdDialog 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);
GridLayout layout = new GridLayout();
layout.verticalSpacing = WidgetHelper.DIALOG_SPACING;
dialogArea.setLayout(layout);
activationEvent = new EventSelector(dialogArea, SWT.NONE);
activationEvent.setLabel(Messages.get().EditTableThresholdDialog_ActivationEvent);
activationEvent.setEventCode(threshold.getActivationEvent());
activationEvent.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deactivationEvent = new EventSelector(dialogArea, SWT.NONE);
deactivationEvent.setLabel(Messages.get().EditTableThresholdDialog_DeactivationEvent);
deactivationEvent.setEventCode(threshold.getDeactivationEvent());
deactivationEvent.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
sampleCount = new LabeledSpinner(dialogArea, SWT.NONE);
sampleCount.setLabel("Sample count");
sampleCount.setRange(1, 100000);
sampleCount.setSelection(threshold.getSampleCount());
new Label(dialogArea, SWT.NONE).setText(Messages.get().EditTableThresholdDialog_Conditions);
conditionsEditor = new TableConditionsEditor(dialogArea, SWT.BORDER, columnCallback);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.widthHint = 700;
gd.heightHint = 400;
conditionsEditor.setLayoutData(gd);
conditionsEditor.setConditions(threshold.getConditions());
return dialogArea;
}
Aggregations