Java Code Examples for org.eclipse.jface.dialogs.IDialogConstants#ENTRY_FIELD_WIDTH
The following examples show how to use
org.eclipse.jface.dialogs.IDialogConstants#ENTRY_FIELD_WIDTH .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NewFolderDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
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.NewFolderDialog_FolderName); // New folder name entry field fFolderName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fFolderName.setLayoutData(data); fFolderName.setFont(font); fFolderName.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateNewFolderName(); } }); }
Example 2
Source File: NewExperimentDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private void createExperimentNameGroup(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 experiment label Label experimentLabel = new Label(folderGroup, SWT.NONE); experimentLabel.setFont(font); experimentLabel.setText(Messages.NewExperimentDialog_ExperimentName); // New experiment name entry field fExperimentName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fExperimentName.setLayoutData(data); fExperimentName.setFont(font); fExperimentName.addListener(SWT.Modify, event -> validateNewExperimentName()); }
Example 3
Source File: CopyExperimentDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private void createNewExperimentNameGroup(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)); String name = fExperiment.getName(); // New experiment name label Label newExperimentLabel = new Label(folderGroup, SWT.NONE); newExperimentLabel.setFont(font); newExperimentLabel.setText(Messages.CopyExperimentDialog_ExperimentNewName); // New experiment name entry field fNewExperimentName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewExperimentName.setLayoutData(data); fNewExperimentName.setFont(font); fNewExperimentName.setFocus(); fNewExperimentName.setText(name); fNewExperimentName.setSelection(0, name.length()); fNewExperimentName.addListener(SWT.Modify, event -> validateNewExperimentName()); }
Example 4
Source File: CopyTraceDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private void createNewTraceNameGroup(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)); String name = fTrace.getName(); // New trace name label Label newTraceLabel = new Label(folderGroup, SWT.NONE); newTraceLabel.setFont(font); newTraceLabel.setText(Messages.CopyTraceDialog_TraceNewName); // New trace name entry field fNewTraceName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewTraceName.setLayoutData(data); fNewTraceName.setFont(font); fNewTraceName.setFocus(); fNewTraceName.setText(name); fNewTraceName.setSelection(0, name.length()); fNewTraceName.addListener(SWT.Modify, event -> validateNewTraceName()); }
Example 5
Source File: RenameFolderDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private void createNewTraceNameGroup(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)); String name = fFolder.getName(); // New trace name label Label newTaceLabel = new Label(folderGroup, SWT.NONE); newTaceLabel.setFont(font); newTaceLabel.setText(Messages.RenameFolderDialog_FolderNewName); // New trace name entry field fNewFolderNameText = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewFolderNameText.setLayoutData(data); fNewFolderNameText.setFont(font); fNewFolderNameText.setFocus(); fNewFolderNameText.setText(name); fNewFolderNameText.setSelection(0, name.length()); fNewFolderNameText.addListener(SWT.Modify, event -> validateNewFolderName()); }
Example 6
Source File: RenameTraceDialog.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private void createNewTraceNameGroup(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)); String name = fTrace.getName(); // New trace name label Label newTaceLabel = new Label(folderGroup, SWT.NONE); newTaceLabel.setFont(font); newTaceLabel.setText(Messages.RenameTraceDialog_TraceNewName); // New trace name entry field fNewTraceNameText = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewTraceNameText.setLayoutData(data); fNewTraceNameText.setFont(font); fNewTraceNameText.setFocus(); fNewTraceNameText.setText(name); fNewTraceNameText.setSelection(0, name.length()); fNewTraceNameText.addListener(SWT.Modify, event -> validateNewTraceName()); }
Example 7
Source File: RenameExperimentDialog.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
private void createNewExperimentNameGroup(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)); String name = fExperiment.getName(); // New experiment name label Label newExperimentLabel = new Label(folderGroup, SWT.NONE); newExperimentLabel.setFont(font); newExperimentLabel.setText(Messages.RenameExperimentDialog_ExperimentNewName); // New experiment name entry field fNewExperimentName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewExperimentName.setLayoutData(data); fNewExperimentName.setFont(font); fNewExperimentName.setFocus(); fNewExperimentName.setText(name); fNewExperimentName.setSelection(0, name.length()); fNewExperimentName.addListener(SWT.Modify, event -> validateNewExperimentName()); }
Example 8
Source File: TrimTraceDialog.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
private void createNewTraceNameGroup(Composite parent) { setStatusLineAboveButtons(true); 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)); String name = fElement.getName(); // New trace name label Label newTaceLabel = new Label(folderGroup, SWT.NONE); newTaceLabel.setFont(font); newTaceLabel.setText(Messages.RenameTraceDialog_TraceNewName); // New trace name entry field GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; Text newElementName = new Text(folderGroup, SWT.BORDER); newElementName.setLayoutData(data); newElementName.setFont(font); newElementName.setFocus(); newElementName.setText(name); newElementName.setSelection(0, name.length()); newElementName.addListener(SWT.Modify, event -> validateNewTraceName()); fNewElementName = newElementName; validateNewTraceName(); }
Example 9
Source File: SVNWizardPage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Utility method that creates a combo box * * @param parent the parent for the new label * @return the new widget */ protected Combo createCombo(Composite parent) { Combo combo = new Combo(parent, SWT.READ_ONLY); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; combo.setLayoutData(data); return combo; }
Example 10
Source File: SVNWizardPage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Create a text field specific for this application * * @param parent the parent of the new text field * @return the new text field */ static public Text createTextField(Composite parent) { Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.verticalAlignment = GridData.CENTER; data.grabExcessVerticalSpace = false; data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; text.setLayoutData(data); return text; }
Example 11
Source File: ConfigurationWizardMainPage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Utility method to create an editable combo box * * @param parent the parent of the combo box * @return the created combo */ protected Combo createEditableCombo(Composite parent) { Combo combo = new Combo(parent, SWT.NULL); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; combo.setLayoutData(data); return combo; }
Example 12
Source File: NewFolderDialogOfHs.java From translationstudio8 with GNU General Public License v2.0 | votes |
/** * Creates the folder name specification controls. * * @param parent the parent composite */ private void createFolderNameGroup(Composite parent) { Font font = parent.getFont(); // project specification group 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(IDEWorkbenchMessages.NewFolderDialog_nameLabel); // 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() { public void handleEvent(Event event) { validateLinkedResource(); } }); }