@Override public void shellActivated(ShellEvent e) { if (lastShellSize == null) { lastShellSize = getShell().getSize(); } }
@Override public void shellActivated(ShellEvent e) { if (lastShellSize == null) { lastShellSize = getShell().getSize(); } }
public void shellActivated(ShellEvent e) { if (lastShellSize == null) { lastShellSize = getShell().getSize(); } }
protected Control createContents(final Composite parent) { final Control[] control = new Control[1]; BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { control[0] = PreferenceDialog.super.createContents(parent); // Add the first page selectSavedItem(); } }); return control[0]; }
@Override protected Control createContents(final Composite parent) { final Control[] control = new Control[1]; BusyIndicator.showWhile(getShell().getDisplay(), () -> { control[0] = PreferenceDialog.super.createContents(parent); // Add the first page selectSavedItem(); }); return control[0]; }
/** * Changes the shell size to the given size, ensuring that it is no larger * than the display bounds. * * @param width * the shell width * @param height * the shell height */ private void setShellSize(int width, int height) { Rectangle preferred = getShell().getBounds(); preferred.width = width; preferred.height = height; getShell().setBounds(getConstrainedShellBounds(preferred)); }
@Override protected Control createContents(final Composite parent) { final Control[] control = new Control[1]; BusyIndicator.showWhile(getShell().getDisplay(), () -> { control[0] = PreferenceDialog.super.createContents(parent); // Add the first page selectSavedItem(); }); return control[0]; }
/** * Changes the shell size to the given size, ensuring that it is no larger * than the display bounds. * * @param width * the shell width * @param height * the shell height */ private void setShellSize(int width, int height) { Rectangle preferred = getShell().getBounds(); preferred.width = width; preferred.height = height; getShell().setBounds(getConstrainedShellBounds(preferred)); }
/** * Changes the shell size to the given size, ensuring that it is no larger * than the display bounds. * * @param width * the shell width * @param height * the shell height */ private void setShellSize(int width, int height) { Rectangle preferred = getShell().getBounds(); preferred.width = width; preferred.height = height; getShell().setBounds(getConstrainedShellBounds(preferred)); }
@Override protected void constrainShellSize() { super.constrainShellSize(); // record opening shell size if (lastShellSize == null) { lastShellSize = getShell().getSize(); } }
protected void constrainShellSize() { super.constrainShellSize(); // record opening shell size if (lastShellSize == null) { lastShellSize = getShell().getSize(); } }
@Override protected void constrainShellSize() { super.constrainShellSize(); // record opening shell size if (lastShellSize == null) { lastShellSize = getShell().getSize(); } }
/** * Shows the "Page Flipping abort" dialog. */ void showPageFlippingAbortDialog() { MessageDialog.open(MessageDialog.ERROR, getShell(), JFaceResources .getString("AbortPageFlippingDialog.title"), //$NON-NLS-1$ JFaceResources.getString("AbortPageFlippingDialog.message"), SWT.SHEET); //$NON-NLS-1$ }
/** * Shows the "Page Flipping abort" dialog. */ void showPageFlippingAbortDialog() { MessageDialog.open(MessageDialog.ERROR, getShell(), JFaceResources .getString("AbortPageFlippingDialog.title"), //$NON-NLS-1$ JFaceResources.getString("AbortPageFlippingDialog.message"), SWT.SHEET); //$NON-NLS-1$ }
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
/** * Shows the "Page Flipping abort" dialog. */ void showPageFlippingAbortDialog() { MessageDialog.open(MessageDialog.ERROR, getShell(), JFaceResources .getString("AbortPageFlippingDialog.title"), //$NON-NLS-1$ JFaceResources.getString("AbortPageFlippingDialog.message"), SWT.SHEET); //$NON-NLS-1$ }
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, JFaceResources.getString("PreferencesDialog.okButtonLabel"), true); //$NON-NLS-1$ getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.get().OK_LABEL, true); getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.get().CANCEL_LABEL, false); }
private void doEdit() { IStructuredSelection ssel = (IStructuredSelection)getTableViewer().getSelection(); ScopeSet set = (ScopeSet)ssel.getFirstElement(); if (set!=null) { PreferenceManager manager = new ScopePreferenceManager(descManager, set); PreferenceDialog dialog = new ScopePreferenceDialog(getShell(), manager, descManager, set.isEditable()); dialog.setPreferenceStore(set.getPreferenceStore()); dialog.create(); dialog.getShell().setText(NLS.bind(Messages.ScopePreferenceDialog_wtitle, set.getName())); dialog.open(); } }
private void doAdvanced() { ScopeSet set = scopeSetManager.getActiveSet(); PreferenceManager manager = new ScopePreferenceManager(parent.getEngineManager(), set); PreferenceDialog dialog = new ScopePreferenceDialog(container.getShell(), manager, parent .getEngineManager(), set.isEditable()); dialog.setPreferenceStore(set.getPreferenceStore()); dialog.create(); dialog.getShell().setText(NLS.bind(Messages.ScopePreferenceDialog_wtitle, set.getName())); dialog.open(); updateMasters(set); }