Search in sources :

Example 46 with LabeledText

use of org.netxms.ui.eclipse.widgets.LabeledText in project netxms by netxms.

the class AddUsmCredDialog 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.marginWidth = WidgetHelper.DIALOG_WIDTH_MARGIN;
    layout.marginHeight = WidgetHelper.DIALOG_HEIGHT_MARGIN;
    layout.verticalSpacing = WidgetHelper.DIALOG_SPACING;
    layout.horizontalSpacing = WidgetHelper.DIALOG_SPACING;
    layout.numColumns = 2;
    layout.makeColumnsEqualWidth = true;
    dialogArea.setLayout(layout);
    name = new LabeledText(dialogArea, SWT.NONE);
    name.setLabel(Messages.get().AddUsmCredDialog_UserName);
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 2;
    name.setLayoutData(gd);
    authMethod = WidgetHelper.createLabeledCombo(dialogArea, SWT.READ_ONLY, Messages.get().AddUsmCredDialog_Auth, WidgetHelper.DEFAULT_LAYOUT_DATA);
    authMethod.add(Messages.get().AddUsmCredDialog_AuthTypeNone);
    authMethod.add(Messages.get().AddUsmCredDialog_AuthTypeMD5);
    authMethod.add(Messages.get().AddUsmCredDialog_AuthTypeSHA1);
    authMethod.select(2);
    privMethod = WidgetHelper.createLabeledCombo(dialogArea, SWT.READ_ONLY, Messages.get().AddUsmCredDialog_Encryption, WidgetHelper.DEFAULT_LAYOUT_DATA);
    privMethod.add(Messages.get().AddUsmCredDialog_EncTypeNone);
    privMethod.add(Messages.get().AddUsmCredDialog_EncTypeDES);
    privMethod.add(Messages.get().AddUsmCredDialog_EncTypeAES);
    privMethod.select(2);
    authPasswd = new LabeledText(dialogArea, SWT.NONE);
    authPasswd.setLabel(Messages.get().AddUsmCredDialog_AuthPasswd);
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    authPasswd.setLayoutData(gd);
    privPasswd = new LabeledText(dialogArea, SWT.NONE);
    privPasswd.setLabel(Messages.get().AddUsmCredDialog_EncPasswd);
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    privPasswd.setLayoutData(gd);
    return dialogArea;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) LabeledText(org.netxms.ui.eclipse.widgets.LabeledText) GridData(org.eclipse.swt.layout.GridData)

Example 47 with LabeledText

use of org.netxms.ui.eclipse.widgets.LabeledText in project netxms by netxms.

the class CreateNodeLinkDialog 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.OUTER_SPACING;
    layout.marginHeight = WidgetHelper.DIALOG_HEIGHT_MARGIN;
    layout.marginWidth = WidgetHelper.DIALOG_WIDTH_MARGIN;
    dialogArea.setLayout(layout);
    nameField = new LabeledText(dialogArea, SWT.NONE);
    nameField.setLabel(Messages.get().CreateNodeLinkDialog_Name);
    nameField.getTextControl().setTextLimit(255);
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.widthHint = 300;
    nameField.setLayoutData(gd);
    nodeField = new ObjectSelector(dialogArea, SWT.NONE, false);
    nodeField.setLabel(Messages.get().CreateNodeLinkDialog_Node);
    nodeField.setObjectClass(Node.class);
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    nodeField.setLayoutData(gd);
    return dialogArea;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) ObjectSelector(org.netxms.ui.eclipse.objectbrowser.widgets.ObjectSelector) Composite(org.eclipse.swt.widgets.Composite) LabeledText(org.netxms.ui.eclipse.widgets.LabeledText) GridData(org.eclipse.swt.layout.GridData)

Example 48 with LabeledText

use of org.netxms.ui.eclipse.widgets.LabeledText in project netxms by netxms.

the class LogMacroEditDialog 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.marginWidth = WidgetHelper.DIALOG_WIDTH_MARGIN;
    layout.marginHeight = WidgetHelper.DIALOG_HEIGHT_MARGIN;
    layout.verticalSpacing = WidgetHelper.DIALOG_SPACING;
    dialogArea.setLayout(layout);
    textName = new LabeledText(dialogArea, SWT.NONE);
    textName.setLabel(Messages.get().LogMacroEditDialog_Name);
    textName.getTextControl().setTextLimit(63);
    if (name != null) {
        textName.setText(name);
        textName.getTextControl().setEditable(false);
    }
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.widthHint = 300;
    textName.setLayoutData(gd);
    textValue = new LabeledText(dialogArea, SWT.NONE);
    textValue.setLabel(Messages.get().LogMacroEditDialog_Value);
    textValue.getTextControl().setTextLimit(255);
    if (value != null)
        textValue.setText(value);
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    textValue.setLayoutData(gd);
    if (name != null)
        textValue.setFocus();
    return dialogArea;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) LabeledText(org.netxms.ui.eclipse.widgets.LabeledText) GridData(org.eclipse.swt.layout.GridData)

Example 49 with LabeledText

use of org.netxms.ui.eclipse.widgets.LabeledText in project netxms by netxms.

the class ScheduledTaskEditor method createDialogArea.

/* (non-Javadoc)
    * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
    */
@Override
protected Control createDialogArea(Composite parent) {
    final Composite dialogArea = (Composite) super.createDialogArea(parent);
    GridLayout layout = new GridLayout();
    layout.marginHeight = WidgetHelper.DIALOG_HEIGHT_MARGIN;
    layout.marginWidth = WidgetHelper.DIALOG_WIDTH_MARGIN;
    dialogArea.setLayout(layout);
    scheduleType = new Combo(dialogArea, SWT.READ_ONLY);
    for (String type : scheduleTypeList) scheduleType.add(type);
    int taskId = scheduleTypeList.indexOf(scheduledTask.getScheduledTaskId());
    scheduleType.select(taskId == -1 ? 0 : taskId);
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.grabExcessVerticalSpace = true;
    scheduleType.setLayoutData(gd);
    selector = new ObjectSelector(dialogArea, SWT.NONE, true);
    selector.setLabel("Select execution object");
    selector.setObjectClass(AbstractObject.class);
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.grabExcessVerticalSpace = true;
    selector.setLayoutData(gd);
    if (scheduledTask.getObjectId() != 0)
        selector.setObjectId(scheduledTask.getObjectId());
    textParameters = new LabeledText(dialogArea, SWT.NONE);
    textParameters.setLabel("Parameters");
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.grabExcessVerticalSpace = true;
    textParameters.setLayoutData(gd);
    textParameters.setText(scheduledTask.getParameters());
    textComments = WidgetHelper.createLabeledText(dialogArea, SWT.MULTI | SWT.BORDER, SWT.DEFAULT, "Description", scheduledTask.getComments(), WidgetHelper.DEFAULT_LAYOUT_DATA);
    textComments.setTextLimit(255);
    gd = new GridData();
    gd.horizontalSpan = 2;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalAlignment = SWT.FILL;
    gd.heightHint = 100;
    gd.verticalAlignment = SWT.FILL;
    textComments.setLayoutData(gd);
    if ((scheduledTask.getFlags() & ScheduledTask.SYSTEM) != 0) {
        scheduleType.add(scheduledTask.getScheduledTaskId());
        scheduleType.select(scheduleTypeList.size());
        scheduleType.setEnabled(false);
        selector.setEnabled(false);
        textParameters.setEnabled(false);
    }
    scheduleSelector = new ScheduleSelector(dialogArea, SWT.NONE);
    scheduleSelector.setSchedule(scheduledTask);
    return dialogArea;
}
Also used : ScheduleSelector(org.netxms.ui.eclipse.widgets.ScheduleSelector) GridLayout(org.eclipse.swt.layout.GridLayout) ObjectSelector(org.netxms.ui.eclipse.objectbrowser.widgets.ObjectSelector) Composite(org.eclipse.swt.widgets.Composite) LabeledText(org.netxms.ui.eclipse.widgets.LabeledText) GridData(org.eclipse.swt.layout.GridData) Combo(org.eclipse.swt.widgets.Combo)

Example 50 with LabeledText

use of org.netxms.ui.eclipse.widgets.LabeledText in project netxms by netxms.

the class CreateMappingTableDialog 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.marginWidth = WidgetHelper.DIALOG_WIDTH_MARGIN;
    layout.marginHeight = WidgetHelper.DIALOG_HEIGHT_MARGIN;
    layout.verticalSpacing = WidgetHelper.DIALOG_SPACING;
    dialogArea.setLayout(layout);
    textName = new LabeledText(dialogArea, SWT.NONE);
    textName.setLabel(Messages.get().CreateMappingTableDialog_Name);
    textName.getTextControl().setTextLimit(63);
    GridData gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.widthHint = 300;
    textName.setLayoutData(gd);
    textDescription = new LabeledText(dialogArea, SWT.NONE);
    textDescription.setLabel(Messages.get().CreateMappingTableDialog_Description);
    gd = new GridData();
    gd.horizontalAlignment = SWT.FILL;
    gd.grabExcessHorizontalSpace = true;
    textDescription.setLayoutData(gd);
    return dialogArea;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) LabeledText(org.netxms.ui.eclipse.widgets.LabeledText) GridData(org.eclipse.swt.layout.GridData)

Aggregations

Composite (org.eclipse.swt.widgets.Composite)104 LabeledText (org.netxms.ui.eclipse.widgets.LabeledText)104 GridLayout (org.eclipse.swt.layout.GridLayout)103 GridData (org.eclipse.swt.layout.GridData)102 Button (org.eclipse.swt.widgets.Button)50 SelectionEvent (org.eclipse.swt.events.SelectionEvent)37 SelectionListener (org.eclipse.swt.events.SelectionListener)31 Group (org.eclipse.swt.widgets.Group)24 ObjectSelector (org.netxms.ui.eclipse.objectbrowser.widgets.ObjectSelector)22 Label (org.eclipse.swt.widgets.Label)18 RowLayout (org.eclipse.swt.layout.RowLayout)11 Spinner (org.eclipse.swt.widgets.Spinner)11 ModifyEvent (org.eclipse.swt.events.ModifyEvent)9 ModifyListener (org.eclipse.swt.events.ModifyListener)9 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)8 LabeledSpinner (org.netxms.ui.eclipse.widgets.LabeledSpinner)8 ColorSelector (org.eclipse.jface.preference.ColorSelector)6 DisposeEvent (org.eclipse.swt.events.DisposeEvent)6 DisposeListener (org.eclipse.swt.events.DisposeListener)6 WidgetFactory (org.netxms.ui.eclipse.tools.WidgetFactory)6