List of usage examples for org.eclipse.jface.dialogs IDialogConstants ENTRY_FIELD_WIDTH
int ENTRY_FIELD_WIDTH
To view the source code for org.eclipse.jface.dialogs IDialogConstants ENTRY_FIELD_WIDTH.
Click Source Link
From source file:org.eclipse.jsch.internal.ui.preference.ExportDialog.java
License:Open Source License
protected void createTargetFields(Composite parent) { new Label(parent, SWT.NONE).setText(Messages.CVSSSH2PreferencePage_125); field = new Text(parent, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH); field.setLayoutData(data);/* w w w .java 2 s .co m*/ }
From source file:org.eclipse.jsch.internal.ui.preference.PassphraseDialog.java
License:Open Source License
protected void createPassphraseFields(Composite parent) { new Label(parent, SWT.NONE).setText(Messages.CVSSSH2PreferencePage_127); passphraseField = new Text(parent, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH); passphraseField.setLayoutData(data); passphraseField.setEchoChar('*'); new Label(parent, SWT.NONE); }
From source file:org.eclipse.jsch.internal.ui.UserValidationDialog.java
License:Open Source License
/** * Creates the three widgets that represent the password entry area. * /*w w w .j ava 2 s . com*/ * @param parent the parent of the widgets */ protected void createPasswordFields(Composite parent) { new Label(parent, SWT.NONE).setText(Messages.UserValidationDialog_4); passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH); passwordField.setLayoutData(data); }
From source file:org.eclipse.jsch.internal.ui.UserValidationDialog.java
License:Open Source License
/** * Creates the three widgets that represent the user name entry area. * //from w ww . j a v a 2s . co m * @param parent the parent of the widgets */ protected void createUsernameFields(Composite parent) { new Label(parent, SWT.NONE).setText(Messages.UserValidationDialog_5); usernameField = new Text(parent, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH); usernameField.setLayoutData(data); }
From source file:org.eclipse.linuxtools.gcov.dialog.OpenGCDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { this.getShell().setText("Gcov - Open coverage results..."); Composite composite = (Composite) super.createDialogArea(parent); /* first line */ Group c = new Group(composite, SWT.NONE); c.setText("Binary File"); c.setToolTipText("Please enter here the binary file which produced the coverage data."); GridLayout layout = new GridLayout(2, false); c.setLayout(layout);/*from ww w . j av a 2 s .c om*/ GridData data = new GridData(GridData.FILL_BOTH); c.setLayoutData(data); Label binLabel = new Label(c, SWT.NONE); binLabel.setText("Please enter here the binary file which produced the coverage data."); data = new GridData(); data.horizontalSpan = 2; binLabel.setLayoutData(data); binText = new Text(c, SWT.BORDER); binText.setText(this.defaultValue); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; binText.setLayoutData(data); binText.addModifyListener(binModifyListener); Composite cbBin = new Composite(c, SWT.NONE); data = new GridData(GridData.HORIZONTAL_ALIGN_END); cbBin.setLayoutData(data); cbBin.setLayout(new GridLayout(2, true)); binBrowseWorkspaceButton = new Button(cbBin, SWT.PUSH); binBrowseWorkspaceButton.setText("&Workspace..."); binBrowseWorkspaceButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent sev) { handleBrowseWorkspace("Open Binary file...", binText); } }); binBrowseFileSystemButton = new Button(cbBin, SWT.PUSH); binBrowseFileSystemButton.setText("&File System..."); binBrowseFileSystemButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent sev) { handleBrowse("Open Binary file...", binText); } }); Group covMode = new Group(composite, SWT.NONE); covMode.setText("Coverage result"); covMode.setToolTipText("Please choose the result scope."); GridData covModeData = new GridData(GridData.FILL_BOTH); covMode.setLayoutData(covModeData); covMode.setLayout(new GridLayout()); openThisFileOnlyButton = new Button(covMode, SWT.RADIO); openThisFileOnlyButton.setLayoutData(new GridData()); openCoverageSummaryButton = new Button(covMode, SWT.RADIO); openCoverageSummaryButton.setLayoutData(new GridData()); String cFile = gcFile.removeFileExtension().lastSegment() + ".c"; openThisFileOnlyButton.setText("Show coverage details for \"" + cFile + "\" only."); openCoverageSummaryButton.setText("Show coverage for the whole selected binary file"); openCoverageSummaryButton.setSelection(true); SelectionAdapter sa = new SelectionAdapter() { public void widgetSelected(SelectionEvent sev) { openCoverageSummary = openCoverageSummaryButton.getSelection(); } }; openCoverageSummaryButton.addSelectionListener(sa); openThisFileOnlyButton.addSelectionListener(sa); /* 2sd line */ errorLabel = new Label(composite, SWT.NONE); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; errorLabel.setLayoutData(data); errorLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED)); c.layout(); return composite; }
From source file:org.eclipse.linuxtools.gprof.dialog.OpenGmonDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { this.getShell().setText("Gmon File Viewer: binary file..."); Composite composite = (Composite) super.createDialogArea(parent); /* first line */ Group c = new Group(composite, SWT.NONE); c.setText("Binary File"); c.setToolTipText("Please enter here the binary file which produced the profile data."); GridLayout layout = new GridLayout(2, false); c.setLayout(layout);/*from www .j a v a2 s .c o m*/ GridData data = new GridData(GridData.FILL_BOTH); c.setLayoutData(data); Label binLabel = new Label(c, SWT.NONE); binLabel.setText("Please enter here the binary file which produced the profile data."); data = new GridData(); data.horizontalSpan = 2; binLabel.setLayoutData(data); binText = new Text(c, SWT.BORDER); binText.setText(this.defaultValue); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; binText.setLayoutData(data); binText.addModifyListener(binModifyListener); Composite cbBin = new Composite(c, SWT.NONE); data = new GridData(GridData.HORIZONTAL_ALIGN_END); cbBin.setLayoutData(data); cbBin.setLayout(new GridLayout(2, true)); binBrowseWorkspaceButton = new Button(cbBin, SWT.PUSH); binBrowseWorkspaceButton.setText("&Workspace..."); binBrowseWorkspaceButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent sev) { handleBrowseWorkspace("Open Binary file...", binText); } }); binBrowseFileSystemButton = new Button(cbBin, SWT.PUSH); binBrowseFileSystemButton.setText("&File System..."); binBrowseFileSystemButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent sev) { handleBrowse("Open Binary file...", binText); } }); /* 2sd line */ errorLabel = new Label(composite, SWT.NONE); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; errorLabel.setLayoutData(data); errorLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED)); c.layout(); return composite; }
From source file:org.eclipse.linuxtools.internal.gcov.dialog.OpenGCDialog.java
License:Open Source License
@Override protected Control createDialogArea(Composite parent) { this.getShell().setText(Messages.OpenGCDialog_open_results); Composite composite = (Composite) super.createDialogArea(parent); /* first line */ Group c = new Group(composite, SWT.NONE); c.setText(Messages.OpenGCDialog_bin_group_header); c.setToolTipText(Messages.OpenGCDialog_bin_group_tooltip); GridLayout layout = new GridLayout(2, false); c.setLayout(layout);/*from w w w.j a va2s.co m*/ GridData data = new GridData(GridData.FILL_BOTH); c.setLayoutData(data); Label binLabel = new Label(c, SWT.NONE); binLabel.setText(Messages.OpenGCDialog_bin_group_label); data = new GridData(); data.horizontalSpan = 2; binLabel.setLayoutData(data); binText = new Text(c, SWT.BORDER); binText.setText(this.defaultValue); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; binText.setLayoutData(data); binText.addModifyListener(new BinaryModifyListener()); Composite cbBin = new Composite(c, SWT.NONE); data = new GridData(GridData.HORIZONTAL_ALIGN_END); cbBin.setLayoutData(data); cbBin.setLayout(new GridLayout(2, true)); Button binBrowseWorkspaceButton = new Button(cbBin, SWT.PUSH); binBrowseWorkspaceButton.setText(Messages.OpenGCDialog_bin_browser_button_text); binBrowseWorkspaceButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent sev) { handleBrowseWorkspace(Messages.OpenGCDialog_bin_browser_handler_text, binText); } }); Button binBrowseFileSystemButton = new Button(cbBin, SWT.PUSH); binBrowseFileSystemButton.setText(Messages.OpenGCDialog_bin_browser_fs_button_text); binBrowseFileSystemButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent sev) { handleBrowse(Messages.OpenGCDialog_bin_browser_handler_text, binText); } }); Group covMode = new Group(composite, SWT.NONE); covMode.setText(Messages.OpenGCDialog_coverage_mode_header); covMode.setToolTipText(Messages.OpenGCDialog_coverage_mode_tooltip); GridData covModeData = new GridData(GridData.FILL_BOTH); covMode.setLayoutData(covModeData); covMode.setLayout(new GridLayout()); Button openThisFileOnlyButton = new Button(covMode, SWT.RADIO); openThisFileOnlyButton.setLayoutData(new GridData()); final Button openCoverageSummaryButton = new Button(covMode, SWT.RADIO); openCoverageSummaryButton.setLayoutData(new GridData()); String cFile = gcFile.removeFileExtension().lastSegment() + ".c"; //$NON-NLS-1$ openThisFileOnlyButton.setText(NLS.bind(Messages.OpenGCDialog_open_file_button_text, cFile)); openCoverageSummaryButton.setText(Messages.OpenGCDialog_summ_button_text); openCoverageSummaryButton.setSelection(true); SelectionAdapter sa = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent sev) { openCoverageSummary = openCoverageSummaryButton.getSelection(); } }; openCoverageSummaryButton.addSelectionListener(sa); openThisFileOnlyButton.addSelectionListener(sa); /* 2sd line */ errorLabel = new Label(composite, SWT.NONE); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; errorLabel.setLayoutData(data); errorLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED)); c.layout(); return composite; }
From source file:org.eclipse.linuxtools.internal.gdbtrace.ui.views.project.dialogs.SelectTraceExecutableDialog.java
License:Open Source License
/** * Creates the folder name specification controls. * * @param parent the parent composite//from w ww . j a va2 s . co m */ private void createFolderNameGroup(Composite parent) { final Shell shell = parent.getShell(); Font font = parent.getFont(); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(3, false); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Executable name label Label label = new Label(composite, SWT.NONE); label.setFont(font); label.setText(Messages.SelectTraceExecutableDialog_ExecutableName); // Executable name entry field fExecutableNameEntry = new Text(composite, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fExecutableNameEntry.setLayoutData(data); fExecutableNameEntry.setFont(font); fExecutableNameEntry.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { fExecutablePath = Path.fromOSString(fExecutableNameEntry.getText()); if (!validateExecutableName()) { updateStatus(PATH_ERROR_STATUS); } else if (!validateExecutableBinary()) { updateStatus(BINARY_ERROR_STATUS); } else { updateStatus(OK_STATUS); } } }); // Browse button Button browseExecutableButton = new Button(composite, SWT.NONE); browseExecutableButton.setText(Messages.SelectTraceExecutableDialog_Browse); browseExecutableButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { FileDialog dlg = new FileDialog(shell); String workspacePath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString(); dlg.setFilterPath(workspacePath); dlg.setText(Messages.SelectTraceExecutableDialog_ExecutablePrompt); String path = dlg.open(); if (path != null) { fExecutableNameEntry.setText(path); } } }); }
From source file:org.eclipse.linuxtools.internal.gprof.dialog.OpenGmonDialog.java
License:Open Source License
@Override protected Control createDialogArea(Composite parent) { this.getShell().setText(Messages.OpenGmonDialog_GMON_BINARY_FILE); Composite composite = (Composite) super.createDialogArea(parent); /* first line */ Group c = new Group(composite, SWT.NONE); c.setText(Messages.OpenGmonDialog_BINARY_FILE); c.setToolTipText(Messages.OpenGmonDialog_PLEASE_ENTER_BINARY_FILE_FULL_MSG); GridLayout layout = new GridLayout(2, false); c.setLayout(layout);/*from w ww . j av a2s . c om*/ GridData data = new GridData(GridData.FILL_BOTH); c.setLayoutData(data); Label binLabel = new Label(c, SWT.NONE); binLabel.setText(Messages.OpenGmonDialog_PLEASE_ENTER_BINARY_FILE_FULL_MSG); data = new GridData(); data.horizontalSpan = 2; binLabel.setLayoutData(data); binText = new Text(c, SWT.BORDER); binText.setText(this.defaultValue); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; binText.setLayoutData(data); binText.addModifyListener(new BinaryModifyListener()); Composite cbBin = new Composite(c, SWT.NONE); data = new GridData(GridData.HORIZONTAL_ALIGN_END); cbBin.setLayoutData(data); cbBin.setLayout(new GridLayout(2, true)); Button binBrowseWorkspaceButton = new Button(cbBin, SWT.PUSH); binBrowseWorkspaceButton.setText(Messages.OpenGmonDialog_WORKSPACE); binBrowseWorkspaceButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent sev) { handleBrowseWorkspace(Messages.OpenGmonDialog_OPEN_BINARY_FILE, binText); } }); Button binBrowseFileSystemButton = new Button(cbBin, SWT.PUSH); binBrowseFileSystemButton.setText(Messages.OpenGmonDialog_FILE_SYSTEM); binBrowseFileSystemButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent sev) { handleBrowse(Messages.OpenGmonDialog_OPEN_BINARY_FILE, binText); } }); /* 2sd line */ errorLabel = new Label(composite, SWT.NONE); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; errorLabel.setLayoutData(data); errorLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED)); c.layout(); return composite; }
From source file:org.eclipse.linuxtools.lttng.ui.views.project.dialogs.NewExperimentDialog.java
License:Open Source License
/** * Creates the folder name specification controls. * //from w ww .ja v a2s . co m * @param parent the parent composite */ private void createFolderNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; folderGroup.setLayout(layout); folderGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // new folder label Label folderLabel = new Label(folderGroup, SWT.NONE); folderLabel.setFont(font); folderLabel.setText(Messages.NewExperimentDialog_ExperimentLabel); // new folder name entry field folderNameField = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; folderNameField.setLayoutData(data); folderNameField.setFont(font); folderNameField.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateLinkedResource(); } }); }