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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations