List of usage examples for org.eclipse.jface.dialogs IDialogConstants SELECT_TYPES_ID
int SELECT_TYPES_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants SELECT_TYPES_ID.
Click Source Link
From source file:com.ge.research.sadl.ui.imports.OwlFileResourceImportPage1.java
License:Open Source License
/** * Creates the buttons for selecting specific types or selecting all or none of the * elements.//from www .ja va 2 s .c o m * * @param parent the parent control */ protected final void createButtonsGroup(Composite parent) { // top level group Composite buttonComposite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setFont(parent.getFont()); GridData buttonData = new GridData(SWT.FILL, SWT.FILL, true, false); buttonComposite.setLayoutData(buttonData); // types edit button selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, SELECT_TYPES_TITLE, false); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleTypesEditButtonPressed(); } }; selectTypesButton.addSelectionListener(listener); setButtonLayoutData(selectTypesButton); selectAllButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setAllSelections(true); updateWidgetEnablements(); } }; selectAllButton.addSelectionListener(listener); setButtonLayoutData(selectAllButton); deselectAllButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setAllSelections(false); updateWidgetEnablements(); } }; deselectAllButton.addSelectionListener(listener); setButtonLayoutData(deselectAllButton); }
From source file:org.eclipse.ffs.internal.ui.add.WizardFileSystemResourceImportPage1.java
License:Open Source License
/** * Creates the buttons for selecting specific types or selecting all or none of the * elements.//from w ww . j av a 2 s . c o m * * @param parent the parent control */ protected final void createButtonsGroup(Composite parent) { // top level group Composite buttonComposite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setFont(parent.getFont()); GridData buttonData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL); buttonData.horizontalSpan = 2; buttonComposite.setLayoutData(buttonData); // types edit button selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, SELECT_TYPES_TITLE, false); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleTypesEditButtonPressed(); } }; selectTypesButton.addSelectionListener(listener); setButtonLayoutData(selectTypesButton); selectAllButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setAllSelections(true); updateWidgetEnablements(); } }; selectAllButton.addSelectionListener(listener); setButtonLayoutData(selectAllButton); deselectAllButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setAllSelections(false); updateWidgetEnablements(); } }; deselectAllButton.addSelectionListener(listener); setButtonLayoutData(deselectAllButton); }
From source file:org.eclipse.jubula.client.ui.rcp.wizards.pages.ImportXLSTestdataWizardPage.java
License:Open Source License
/** * Creates the buttons for selecting specific types or selecting all or none * of the elements./*from w w w.jav a 2 s . co m*/ * * @param parent * the parent control */ protected final void createButtonsGroup(Composite parent) { // top level group Composite buttonComposite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setFont(parent.getFont()); GridData buttonData = new GridData(SWT.FILL, SWT.FILL, true, false); buttonComposite.setLayoutData(buttonData); // types edit button m_selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, SELECT_TYPES_TITLE, false); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleTypesEditButtonPressed(); } }; m_selectTypesButton.addSelectionListener(listener); setButtonLayoutData(m_selectTypesButton); m_selectAllButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setAllSelections(true); updateWidgetEnablements(); } }; m_selectAllButton.addSelectionListener(listener); setButtonLayoutData(m_selectAllButton); m_deselectAllButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setAllSelections(false); updateWidgetEnablements(); } }; m_deselectAllButton.addSelectionListener(listener); setButtonLayoutData(m_deselectAllButton); }
From source file:org.eclipse.papyrus.uml.diagram.menu.dialogs.ShowHideCompartmentSelectionDialog.java
License:Open Source License
/** * Adds the propagation button (in addition to the buttons added by the super class) to the dialog. * /* ww w.j ava 2 s .com*/ * @see org.eclipse.papyrus.diagram.common.dialogs.CustomCheckedTreeSelectionDialog.createSelectionButtons * @param composite * the parent composite * @return Composite the composite the buttons were created in. */ @Override protected Composite createSelectionButtons(Composite composite) { Composite buttonComposite = super.createSelectionButtons(composite); Button propagateToSameType = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, Messages.ShowHideCompartmentAction_PropagateToSameType, false); SelectionListener listener = new PropagateSelectionAdapter(); propagateToSameType.addSelectionListener(listener); return buttonComposite; }
From source file:org.eclipse.ui.dialogs.WizardExportResourcesPage.java
License:Open Source License
/** * Creates the buttons for selecting specific types or selecting all or none of the * elements./*from ww w . j ava 2 s.c o m*/ * * @param parent the parent control */ protected final void createButtonsGroup(Composite parent) { Font font = parent.getFont(); // top level group Composite buttonComposite = new Composite(parent, SWT.NONE); buttonComposite.setFont(parent.getFont()); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); // types edit button Button selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, SELECT_TYPES_TITLE, false); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleTypesEditButtonPressed(); } }; selectTypesButton.addSelectionListener(listener); selectTypesButton.setFont(font); setButtonLayoutData(selectTypesButton); Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { resourceGroup.setAllSelections(true); updateWidgetEnablements(); } }; selectButton.addSelectionListener(listener); selectButton.setFont(font); setButtonLayoutData(selectButton); Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { resourceGroup.setAllSelections(false); updateWidgetEnablements(); } }; deselectButton.addSelectionListener(listener); deselectButton.setFont(font); setButtonLayoutData(deselectButton); }
From source file:org.eclipse.ui.internal.editors.text.SelectResourcesDialog.java
License:Open Source License
protected final void createSelectionButtonGroup(Composite parent) { Font font = parent.getFont(); // top level group Composite buttonComposite = new Composite(parent, SWT.NONE); buttonComposite.setFont(parent.getFont()); GridLayout layout = new GridLayout(); layout.numColumns = 3;//from w w w. j a va 2 s . c o m layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, TextEditorMessages.SelectResourcesDialog_selectAll, false); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fResourceGroup.setAllSelections(true); updateSelectionCount(); } }; selectButton.addSelectionListener(listener); selectButton.setFont(font); setButtonLayoutData(selectButton); Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, TextEditorMessages.SelectResourcesDialog_deselectAll, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fResourceGroup.setAllSelections(false); updateSelectionCount(); } }; deselectButton.addSelectionListener(listener); deselectButton.setFont(font); setButtonLayoutData(deselectButton); // types edit button Button selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, TextEditorMessages.SelectResourcesDialog_filterSelection, false); listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleSelectFileTypes(); } }; selectTypesButton.addSelectionListener(listener); selectTypesButton.setFont(font); setButtonLayoutData(selectTypesButton); }
From source file:org.erlide.ui.wizards.ErlangProjectImportWizardPage.java
License:Open Source License
/** * Creates the buttons for selecting specific types or selecting all or none * of the elements.//from w ww.j a va 2 s. c om * * @param parent * the parent control */ protected final void createButtonsGroup(final Composite parent) { // top level group final Composite buttonComposite = new Composite(parent, SWT.NONE); final GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setFont(parent.getFont()); final GridData buttonData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL); buttonData.horizontalSpan = 2; buttonComposite.setLayoutData(buttonData); final Button button = new Button(buttonComposite, SWT.PUSH); button.setFont(buttonComposite.getFont()); final GridData buttonData1 = new GridData(GridData.FILL_HORIZONTAL); button.setLayoutData(buttonData1); button.setData(Integer.valueOf(IDialogConstants.SELECT_TYPES_ID)); button.setText(SELECT_TYPES_TITLE); // types edit button selectTypesButton = button; final SelectionListener listener = new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { handleTypesEditButtonPressed(); } }; selectTypesButton.addSelectionListener(listener); setButtonLayoutData(selectTypesButton); }
From source file:org.talend.repository.ui.wizards.newproject.copyfromeclipse.TalendWizardArchiveFileResourceExportPage1.java
License:Open Source License
protected final void myCreateButtonsGroup(Composite parent) { Font font = parent.getFont(); // top level group Composite buttonComposite = new Composite(parent, SWT.NONE); buttonComposite.setFont(parent.getFont()); GridLayout layout = new GridLayout(); layout.numColumns = 3;/* w w w. j a v a 2 s .c o m*/ layout.makeColumnsEqualWidth = true; buttonComposite.setLayout(layout); buttonComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); // types edit button Button selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID, SELECT_TYPES_TITLE, false); SelectionListener listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleTypesEditButtonPressed(); } }; selectTypesButton.addSelectionListener(listener); selectTypesButton.setFont(font); setButtonLayoutData(selectTypesButton); Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false); listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resourceGroup.setAllSelections(true); updateWidgetEnablements(); } }; selectButton.addSelectionListener(listener); selectButton.setFont(font); setButtonLayoutData(selectButton); Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false); listener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { resourceGroup.setAllSelections(false); updateWidgetEnablements(); } }; deselectButton.addSelectionListener(listener); deselectButton.setFont(font); setButtonLayoutData(deselectButton); }