List of usage examples for org.eclipse.jface.dialogs IDialogConstants IGNORE_ID
int IGNORE_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants IGNORE_ID.
Click Source Link
From source file:org.eclipse.wb.internal.core.model.property.editor.geometry.AbstractGeometryDialog.java
License:Open Source License
@Override protected final void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.IGNORE_ID, ModelMessages.AbstractGeometryDialog_defaultButton, false); super.createButtonsForButtonBar(parent); }
From source file:org.eclipse.wb.internal.core.model.property.editor.geometry.AbstractGeometryDialog.java
License:Open Source License
@Override protected final void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.IGNORE_ID) { setReturnCode(buttonId);//from ww w. j ava 2 s . c o m close(); } super.buttonPressed(buttonId); }
From source file:org.eclipse.wb.internal.swing.model.property.editor.geometry.DimensionPropertyEditor.java
License:Open Source License
@Override protected void openDialog(Property property) throws Exception { // prepare Dimension to edit Dimension dimension;//w w w .j a v a2 s . c o m { Object value = property.getValue(); if (value instanceof Dimension) { dimension = new Dimension((Dimension) value); } else { dimension = new Dimension(); } } // prepare dialog DimensionDialog dimensionDialog = new DimensionDialog(property.getTitle(), dimension); // open dialog int result = dimensionDialog.open(); if (result == IDialogConstants.IGNORE_ID) { property.setValue(Property.UNKNOWN_VALUE); } else if (result == IDialogConstants.OK_ID) { property.setValue(dimension); } }
From source file:org.eclipse.wb.internal.swing.model.property.editor.geometry.InsetsPropertyEditor.java
License:Open Source License
@Override protected void openDialog(Property property) throws Exception { // prepare Insets to edit Insets insets;/*from w w w.j a v a 2s .c o m*/ { Object value = property.getValue(); if (value instanceof Insets) { Insets insetsValue = (Insets) value; insets = new Insets(insetsValue.top, insetsValue.left, insetsValue.bottom, insetsValue.right); } else { insets = new Insets(0, 0, 0, 0); } } // prepare dialog InsetsDialog insetsDialog = new InsetsDialog(property.getTitle(), insets); // open dialog int result = insetsDialog.open(); if (result == IDialogConstants.IGNORE_ID) { property.setValue(Property.UNKNOWN_VALUE); } else if (result == IDialogConstants.OK_ID) { property.setValue(insets); } }
From source file:org.eclipse.wb.internal.swing.model.property.editor.geometry.PointPropertyEditor.java
License:Open Source License
@Override protected void openDialog(Property property) throws Exception { // prepare Point to edit Point point;//from ww w. j a v a 2s. c o m { Object value = property.getValue(); if (value instanceof Point) { point = new Point((Point) value); } else { point = new Point(); } } // prepare dialog PointDialog pointDialog = new PointDialog(property.getTitle(), point); // open dialog int result = pointDialog.open(); if (result == IDialogConstants.IGNORE_ID) { property.setValue(Property.UNKNOWN_VALUE); } else if (result == IDialogConstants.OK_ID) { property.setValue(point); } }
From source file:org.eclipse.wb.internal.swing.model.property.editor.geometry.RectanglePropertyEditor.java
License:Open Source License
@Override protected void openDialog(Property property) throws Exception { // prepare Rectangle to edit Rectangle rectangle;/*w ww .ja v a 2 s . c om*/ { Object value = property.getValue(); if (value instanceof Rectangle) { rectangle = new Rectangle((Rectangle) value); } else { rectangle = new Rectangle(); } } // prepare dialog RectangleDialog rectangleDialog = new RectangleDialog(property.getTitle(), rectangle); // open dialog int result = rectangleDialog.open(); if (result == IDialogConstants.IGNORE_ID) { property.setValue(Property.UNKNOWN_VALUE); } else if (result == IDialogConstants.OK_ID) { property.setValue(rectangle); } }
From source file:org.eclipse.wb.internal.swt.model.property.editor.geometry.PointPropertyEditor.java
License:Open Source License
@Override protected void openDialog(Property property) throws Exception { // prepare Point to edit Object point;/* www . j av a 2 s . c om*/ { Object value = property.getValue(); if (value == Property.UNKNOWN_VALUE) { point = PointSupport.newPoint(0, 0); } else { point = PointSupport.getPointCopy(value); } } // prepare dialog PointDialog pointDialog = new PointDialog(property.getTitle(), point); // open dialog int result = pointDialog.open(); if (result == IDialogConstants.IGNORE_ID) { property.setValue(Property.UNKNOWN_VALUE); } else if (result == IDialogConstants.OK_ID) { property.setValue(point); } }
From source file:org.eclipse.wb.internal.swt.model.property.editor.geometry.RectanglePropertyEditor.java
License:Open Source License
@Override protected void openDialog(Property property) throws Exception { // prepare Rectangle to edit Object rectangle;/*from w ww . j a va2 s . c om*/ { Object value = property.getValue(); if (value == Property.UNKNOWN_VALUE) { rectangle = RectangleSupport.newRectangle(0, 0, 0, 0); } else { rectangle = value; } } // prepare dialog RectangleDialog rectangleDialog = new RectangleDialog(property.getTitle(), rectangle); // open dialog int result = rectangleDialog.open(); if (result == IDialogConstants.IGNORE_ID) { property.setValue(Property.UNKNOWN_VALUE); } else if (result == IDialogConstants.OK_ID) { property.setValue(rectangle); } }
From source file:org.eclipse.wst.xsl.internal.debug.ui.actions.MultipleInputDialog.java
License:Open Source License
protected void createVariablesField(String labelText, String initialValue, boolean allowEmpty) { Label label = new Label(panel, SWT.NONE); label.setText(labelText);//from w w w. ja v a 2 s . c o m label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); Composite comp = new Composite(panel, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; comp.setLayout(layout); comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Text text = new Text(comp, SWT.SINGLE | SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = 200; text.setLayoutData(data); text.setData(FIELD_NAME, labelText); // make sure rows are the same height on both panels. label.setSize(label.getSize().x, text.getSize().y); if (initialValue != null) { text.setText(initialValue); } if (!allowEmpty) { validators.add(new Validator() { @Override public boolean validate() { return !text.getText().equals(""); //$NON-NLS-1$ } }); text.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validateFields(); } }); } Button button = createButton(comp, IDialogConstants.IGNORE_ID, Messages.VariablesFieldButton_Text, false); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); int code = dialog.open(); if (code == IDialogConstants.OK_ID) { String variable = dialog.getVariableExpression(); if (variable != null) { text.insert(variable); } } } }); controlList.add(text); }
From source file:org.jkiss.dbeaver.ui.dialogs.ConnectionLostDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.STOP_ID, stopButtonName, true); createButton(parent, IDialogConstants.RETRY_ID, IDialogConstants.RETRY_LABEL, false); createButton(parent, IDialogConstants.IGNORE_ID, IDialogConstants.IGNORE_LABEL, false); createDetailsButton(parent);//from ww w . jav a2 s. c o m }