List of usage examples for org.eclipse.jface.dialogs IDialogConstants OK_LABEL
String OK_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants OK_LABEL.
Click Source Link
From source file:ch.hilbri.assist.application.parts.AboutDialog.java
License:Open Source License
@Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); // create a layout with spacing and margins appropriate for the font // size./*from www. jav a 2 s . co m*/ GridLayout layout = new GridLayout(); layout.numColumns = 0; // this is incremented by createButton layout.makeColumnsEqualWidth = true; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); composite.setLayout(layout); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER); composite.setLayoutData(data); composite.setFont(parent.getFont()); createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); return composite; }
From source file:cn.edu.pku.ogeditor.dialogs.ConceptFilterDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // TODO Auto-generated method stub // super.createButtonsForButtonBar(parent); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:cn.edu.pku.ogeditor.dialogs.RelationFilterDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // TODO Auto-generated method stub // super.createButtonsForButtonBar(parent); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:cn.edu.pku.ogeditor.properties.DescriptionSection.java
License:Open Source License
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { super.createControls(parent, aTabbedPropertySheetPage); Composite composite = getWidgetFactory().createFlatFormComposite(parent); FormData data;/*from w w w. java2 s . c o m*/ // composite.setLayout(new FillLayout()); descriptionText = getWidgetFactory().createText(composite, "", SWT.WRAP | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); //$NON-NLS-1$ data = new FormData(); data.left = new FormAttachment(0, ITabbedPropertyConstants.HSPACE); data.right = new FormAttachment(100, 0); data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); data.height = 100; descriptionText.setLayoutData(data); descriptionText.addModifyListener(listener); // // CLabel labelLabel = getWidgetFactory() // .createCLabel(composite, "description:"); //$NON-NLS-1$ // data = new FormData(); // data.left = new FormAttachment(0, 0); // data.right = new FormAttachment(descriptionText, // -ITabbedPropertyConstants.HSPACE); // data.top = new FormAttachment(descriptionText, 0, SWT.CENTER); // labelLabel.setLayoutData(data); Button button = getWidgetFactory().createButton(composite, IDialogConstants.OK_LABEL, SWT.PUSH); data = new FormData(); // data.left = new FormAttachment(0,ITabbedPropertyConstants.HSPACE); data.right = new FormAttachment(100, 0); data.top = new FormAttachment(descriptionText, ITabbedPropertyConstants.VSPACE); data.width = STANDARD_LABEL_WIDTH; button.setLayoutData(data); button.addSelectionListener(new ButtonListener()); }
From source file:cn.ieclipse.adt.ext.helpers.MultiCheckSelector.java
License:Apache License
/** * Create contents of the button bar.// ww w. ja va 2s . com * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { Button ok = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); // ok.addSelectionListener(new SelectionAdapter() { // @Override // public void widgetSelected(SelectionEvent e) { // // } // }); Button cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); cancel.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (callback != null) { callback.onClose(); } } }); }
From source file:cn.ieclipse.aorm.eclipse.helpers.MultiCheckSelector.java
License:Apache License
/** * Create contents of the button bar.//from w w w .ja v a2 s . c o m * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { Button ok = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); ok.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (callback != null) { List<String> sel = getSelection(); callback.onOkay(sel); } } }); Button cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); cancel.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (callback != null) { callback.onClose(); } } }); }
From source file:cn.ieclipse.pde.signer.wizard.KeyAliasDialog.java
License:Apache License
/** * Create contents of the button bar./*from www.j a v a 2s .co m*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { if (this.item != null) { createButton(parent, IDialogConstants.RETRY_ID, "&Delete", false); createButton(parent, IDialogConstants.IGNORE_ID, "&Export", true); } else { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); } createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.agynamix.platform.frontend.dialogs.AboutApplicationDialog.java
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
From source file:com.agynamix.platform.frontend.dialogs.InputNetworkAddressDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); // super.createButtonsForButtonBar(parent); }
From source file:com.aliyun.odps.eclipse.template.ProjectEditorDialog.java
License:Apache License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }