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:fr.inria.linuxtools.tmf.ui.project.wizards.NewExperimentDialog.java
License:Open Source License
private void createExperimentNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;/* w w w . ja v a 2s .c o m*/ 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, new Listener() { @Override public void handleEvent(Event event) { validateNewExperimentName(); } }); }
From source file:fr.inria.linuxtools.tmf.ui.project.wizards.NewFolderDialog.java
License:Open Source License
private void createFolderNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;/* w ww . ja v a2 s . com*/ 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(); } }); }
From source file:fr.inria.linuxtools.tmf.ui.project.wizards.RenameExperimentDialog.java
License:Open Source License
private void createNewExperimentNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;//from ww w . ja v a2 s.c o m folderGroup.setLayout(layout); folderGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Old experiment name label Label oldExperimentLabel = new Label(folderGroup, SWT.NONE); oldExperimentLabel.setFont(font); oldExperimentLabel.setText(Messages.RenameExperimentDialog_ExperimentName); // Old experiment name field Text oldExperimentName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; oldExperimentName.setLayoutData(data); oldExperimentName.setFont(font); oldExperimentName.setText(fExperiment.getName()); oldExperimentName.setEnabled(false); // 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); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewExperimentName.setLayoutData(data); fNewExperimentName.setFont(font); fNewExperimentName.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateNewExperimentName(); } }); }
From source file:fr.inria.linuxtools.tmf.ui.project.wizards.RenameFolderDialog.java
License:Open Source License
private void createNewTraceNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;// ww w . j a va 2s. c o m folderGroup.setLayout(layout); folderGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Old trace name label Label oldTraceLabel = new Label(folderGroup, SWT.NONE); oldTraceLabel.setFont(font); oldTraceLabel.setText(Messages.RenameFolderDialog_FolderName); // Old trace name field Text oldTraceName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; oldTraceName.setLayoutData(data); oldTraceName.setFont(font); oldTraceName.setText(fFolder.getName()); oldTraceName.setEnabled(false); // 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); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewFolderNameText.setLayoutData(data); fNewFolderNameText.setFont(font); fNewFolderNameText.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateNewFolderName(); } }); }
From source file:fr.inria.linuxtools.tmf.ui.project.wizards.RenameTraceDialog.java
License:Open Source License
private void createNewTraceNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;/*w w w . java 2 s. co m*/ folderGroup.setLayout(layout); folderGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Old trace name label Label oldTraceLabel = new Label(folderGroup, SWT.NONE); oldTraceLabel.setFont(font); oldTraceLabel.setText(Messages.RenameTraceDialog_TraceName); // Old trace name field Text oldTraceName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; oldTraceName.setLayoutData(data); oldTraceName.setFont(font); oldTraceName.setText(fTrace.getName()); oldTraceName.setEnabled(false); // 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); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewTraceNameText.setLayoutData(data); fNewTraceNameText.setFont(font); fNewTraceNameText.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateNewTraceName(); } }); }
From source file:net.bioclipse.core.internal.filesystem.memory.MemoryTreeSelectionDialog.java
License:Open Source License
/** * Creates the dialog region that allows the user to specify a new element name * @param parent/*w w w . ja va 2s .com*/ */ private void createNewElementArea(Composite parent) { Composite area = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 4; area.setLayout(layout); area.setLayoutData(new GridData(GridData.FILL_BOTH)); new Label(area, SWT.NONE).setText("Name: "); nameField = new Text(area, SWT.SINGLE | SWT.BORDER); GridData data = new GridData(); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; nameField.setLayoutData(data); createButton(area, CREATE_FILE_ID, "New File", false); createButton(area, CREATE_FOLDER_ID, "New Folder", false); }
From source file:net.sf.eclipsefp.haskell.debug.ui.internal.launch.HaskellArgumentsTab.java
License:Open Source License
private void createWorkDirectoryComponent(final Composite parent) { Font font = parent.getFont(); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0;/*from w w w . ja v a2 s. c om*/ layout.marginHeight = 0; layout.numColumns = 1; GridData gridData = new GridData(GridData.FILL_HORIZONTAL); composite.setLayout(layout); composite.setLayoutData(gridData); Label label = new Label(composite, SWT.NONE); label.setText(UITexts.haskellArgumentsTab_workDir); label.setFont(font); txtWorkDirectory = new Text(composite, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; txtWorkDirectory.setLayoutData(data); txtWorkDirectory.setFont(font); createButtonComposite(parent, font); }
From source file:net.sf.eclipsefp.haskell.debug.ui.internal.launch.HaskellArgumentsTab.java
License:Open Source License
private void createArgumentComponent(final Composite parent) { Font font = parent.getFont(); Label label = new Label(parent, SWT.NONE); label.setText(UITexts.haskellArgumentsTab_lblArguments); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalSpan = 2;//from w ww. j a v a2s. com label.setLayoutData(data); label.setFont(font); int style = SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL; argumentField = new Text(parent, style); data = new GridData(GridData.FILL_BOTH); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; data.heightHint = 40; argumentField.setLayoutData(data); argumentField.setFont(font); argumentField.addModifyListener(modifyListener); Label instruction = new Label(parent, SWT.NONE); instruction.setText(UITexts.haskellArgumentsTab_noteQuote); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalSpan = 2; instruction.setLayoutData(data); instruction.setFont(font); label = new Label(parent, SWT.NONE); label.setText(UITexts.haskellArgumentsTab_lblFullArguments); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); style = SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY; fullArgumentField = new Text(parent, style); data = new GridData(GridData.FILL_BOTH); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; data.heightHint = 40; fullArgumentField.setLayoutData(data); fullArgumentField.setFont(font); argumentField.addModifyListener(new ModifyListener() { @Override public void modifyText(final ModifyEvent e) { fullArgumentField.setText(argumentField.getText() + " " + forcedArguments); //$NON-NLS-1$ } }); }
From source file:net.sourceforge.eclipseccase.ui.CommentDialogArea.java
License:Open Source License
@Override public Control createArea(Composite parent) { Composite composite = createGrabbingComposite(parent, 1); initializeDialogUnits(composite);// w ww . j a v a 2 s .co m Label label = new Label(composite, SWT.NULL); label.setLayoutData(new GridData()); label.setText("Edit the &comment:"); GridData data = null; text = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); data = new GridData(GridData.FILL_BOTH); data.widthHint = WIDTH_HINT; data.heightHint = HEIGHT_HINT; text.setLayoutData(data); text.selectAll(); text.addTraverseListener(new TraverseListener() { public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_RETURN && (e.stateMask & SWT.CTRL) != 0) { e.doit = false; CommentDialogArea.this.signalCtrlEnter(); } } }); text.setText(comment); text.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { comment = text.getText(); } }); label = new Label(composite, SWT.NULL); label.setLayoutData(new GridData()); label.setText("Choose a &previously entered comment:"); previousCommentsCombo = new Combo(composite, SWT.READ_ONLY); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; previousCommentsCombo.setLayoutData(data); // Initialize the values before we register any listeners so // we don't get any platform specific selection behavior // (see bug 32078: http://bugs.eclipse.org/bugs/show_bug.cgi?id=32078) initializeValues(); previousCommentsCombo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { int index = previousCommentsCombo.getSelectionIndex(); if (index != -1) { text.setText(comments[index]); } } }); return composite; }
From source file:net.sourceforge.eclipseccase.ui.dialogs.SelectViewDialog.java
License:Open Source License
protected ComboViewer createComboViewer(Composite composite, String[] activities) { ComboViewer comboViewer = new ComboViewer(composite, SWT.DROP_DOWN | SWT.READ_ONLY); comboViewer.setLabelProvider(new ActivityListLabelProvider()); comboViewer.setContentProvider(new ArrayContentProvider()); comboViewer.setInput(views);/*from ww w. j a v a 2 s . c o m*/ GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; comboViewer.getCombo().setLayoutData(data); return comboViewer; }