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:net.xmind.workbench.ui.internal.NewsletterSubscriptionDialog.java
private void createMessageLabel(Composite parent) { Label label = new Label(parent, SWT.WRAP); label.setText(Messages.NewsletterSubscriptionReminder_DialogMessage); GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH); label.setLayoutData(data);//from ww w . j a v a 2 s . c o m label.setFont(parent.getFont()); }
From source file:org.bundlemaker.core.ui.handler.exporter.AbstractExporterConfigurationDialog.java
License:Open Source License
/** * Create a drop-down combo box specific for this application * /*w w w. jav a2 s.c o m*/ * @param parent * the parent of the new combo box * @return the new combo box */ protected Combo createDropDownCombo(Composite parent) { Combo combo = new Combo(parent, SWT.DROP_DOWN); GridData comboData = new GridData(GridData.FILL_HORIZONTAL); comboData.verticalAlignment = GridData.CENTER; comboData.grabExcessVerticalSpace = false; comboData.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; combo.setLayoutData(comboData); return combo; }
From source file:org.bundlemaker.core.ui.handler.exporter.AbstractExporterConfigurationDialog.java
License:Open Source License
protected Combo createReadOnlyDropDownCombo(Composite parent) { Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY); GridData comboData = new GridData(GridData.FILL_HORIZONTAL); comboData.verticalAlignment = GridData.CENTER; comboData.grabExcessVerticalSpace = false; comboData.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; combo.setLayoutData(comboData);/*w w w . ja va 2 s .c o m*/ return combo; }
From source file:org.bundlemaker.core.ui.handler.exporter.AbstractExporterConfigurationDialog.java
License:Open Source License
/** * Create a text field specific for this application * //from w ww. j a v a 2 s . c om * @param parent * the parent of the new text field * @return the new text field */ protected 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; }
From source file:org.cloudfoundry.ide.eclipse.internal.server.ui.tunnel.CommandDisplayPart.java
License:Open Source License
public Control createPart(Composite parent) { if (shell == null) { shell = parent.getShell();/* www.j a va2 s. c o m*/ } Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(main); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); Composite fileSelection = new Composite(main, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(fileSelection); GridDataFactory.fillDefaults().grab(true, false).applyTo(fileSelection); /* Display name area */ Composite displayComp = new Composite(fileSelection, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(displayComp); GridDataFactory.fillDefaults().grab(true, false).applyTo(displayComp); Label commandDisplayName = new Label(displayComp, SWT.NONE); GridDataFactory.fillDefaults().grab(false, false).span(2, 0).applyTo(commandDisplayName); commandDisplayName.setText("Display Name:"); displayName = new Text(displayComp, SWT.BORDER); GridDataFactory.fillDefaults().grab(true, false).span(2, 0).applyTo(displayName); Label fileSelectionLabel = new Label(fileSelection, SWT.NONE); GridDataFactory.fillDefaults().grab(false, false).span(2, 0).applyTo(fileSelectionLabel); fileSelectionLabel.setText("Enter or browse location of command executable:"); /* Executable location */ Composite locationComp = new Composite(fileSelection, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(locationComp); GridDataFactory.fillDefaults().grab(true, false).applyTo(locationComp); locationField = new Text(locationComp, SWT.BORDER); GridDataFactory.fillDefaults().grab(true, false).applyTo(locationField); findApplicationButton = new Button(locationComp, SWT.PUSH); GridDataFactory.fillDefaults().grab(false, false).applyTo(findApplicationButton); findApplicationButton.setText("Browse..."); findApplicationButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { handleChange(event); } }); displayName.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent event) { handleChange(event); } }); locationField.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent event) { handleChange(event); } }); Label argsLabel = new Label(main, SWT.NONE); GridDataFactory.fillDefaults().grab(false, false).applyTo(argsLabel); argsLabel.setText("Enter options:"); options = new Text(main, SWT.MULTI | SWT.WRAP | SWT.BORDER); options.addTraverseListener(new TraverseListener() { public void keyTraversed(TraverseEvent event) { if (event.detail == SWT.TRAVERSE_RETURN && (event.stateMask & SWT.MODIFIER_MASK) != 0) { event.doit = true; } } }); GridDataFactory.fillDefaults().grab(true, true).hint(30, IDialogConstants.ENTRY_FIELD_WIDTH) .applyTo(options); Text optionsDescription = new Text(main, SWT.MULTI | SWT.BORDER); GridDataFactory.fillDefaults().grab(true, true).hint(30, IDialogConstants.ENTRY_FIELD_WIDTH) .applyTo(optionsDescription); optionsDescription.setEditable(false); optionsDescription.setText(getOptionsDescription()); setInitialValues(); // Initial Validation. validate(true); return main; }
From source file:org.cloudfoundry.ide.eclipse.server.ui.internal.tunnel.AddCommandDisplayPart.java
License:Open Source License
protected void createOptionsArea(Composite parent) { parent = createGroupComposite(parent, Messages.AddCommandDisplayPart_TITLE_APP_OPTION); Label optionsLabel = new Label(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(false, false).applyTo(optionsLabel); optionsLabel.setText(Messages.AddCommandDisplayPart_LABEL_SET_VAR); options = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL); options.addTraverseListener(new TraverseListener() { public void keyTraversed(TraverseEvent event) { if (event.detail == SWT.TRAVERSE_RETURN && (event.stateMask & SWT.MODIFIER_MASK) != 0) { event.doit = true;//from ww w. j av a2 s . co m } } }); options.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent event) { handleChange(event); } }); GridDataFactory.fillDefaults().grab(true, false).hint(IDialogConstants.ENTRY_FIELD_WIDTH, 80) .applyTo(options); }
From source file:org.cloudfoundry.ide.eclipse.server.ui.internal.tunnel.AddCommandDisplayPart.java
License:Open Source License
protected void createTunnelVariablesArea(Composite parent) { Text optionsDescription = new Text(parent, SWT.MULTI | SWT.BORDER); GridDataFactory.fillDefaults().grab(true, true).hint(IDialogConstants.ENTRY_FIELD_WIDTH, 120) .applyTo(optionsDescription); optionsDescription.setEditable(false); optionsDescription.setText(getOptionsDescription()); optionsDescription.setBackground(parent.getBackground()); }
From source file:org.eclipse.ant.internal.ui.launchConfigurations.AntBuilderTargetsTab.java
License:Open Source License
private Text createText(Composite parent) { GridData gd;// ww w. j av a2 s . com Text newText = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY); newText.setFont(parent.getFont()); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 40; gd.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; newText.setLayoutData(gd); return newText; }
From source file:org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab.java
License:Open Source License
/** * Creates the widgets that display the target order * /* w w w . j a v a 2 s . c o m*/ * @param parent * the parent composite */ private void createTargetOrder(Composite parent) { Font font = parent.getFont(); Label label = new Label(parent, SWT.NONE); label.setText(AntLaunchConfigurationMessages.AntTargetsTab_Target_execution_order__3); label.setFont(font); Composite orderComposite = new Composite(parent, SWT.NONE); GridData gd = new GridData(GridData.FILL_HORIZONTAL); orderComposite.setLayoutData(gd); GridLayout layout = new GridLayout(2, false); layout.marginHeight = 0; layout.marginWidth = 0; orderComposite.setLayout(layout); orderComposite.setFont(font); fTargetOrderText = new Text(orderComposite, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY); fTargetOrderText.setFont(font); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 40; gd.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fTargetOrderText.setLayoutData(gd); fOrderButton = createPushButton(orderComposite, AntLaunchConfigurationMessages.AntTargetsTab__Order____4, null); gd = (GridData) fOrderButton.getLayoutData(); gd.verticalAlignment = GridData.BEGINNING; fOrderButton.setFont(font); fOrderButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleOrderPressed(); } }); }
From source file:org.eclipse.ant.internal.ui.preferences.AddCustomDialog.java
License:Open Source License
private void createNameGroup(Composite topComposite) { Label label = new Label(topComposite, SWT.NONE); label.setFont(topComposite.getFont()); label.setText(AntPreferencesMessages.AddCustomDialog__Name__3); nameField = new Text(topComposite, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; nameField.setLayoutData(data);//from w w w. j av a 2 s .c om nameField.setFont(topComposite.getFont()); nameField.setText(name); nameField.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { updateStatus(); } }); }