/******************************************************************************* * Copyright (c) 2005, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ui.preferences; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; /** * The ViewSettingsDialog is an abstract class that * provides some common functionality for view preferences. * * @since 3.1 */ public class ViewSettingsDialog extends Dialog { private static int DEFAULTS_BUTTON_ID = 25; /** * Create a new instance of the receiver. * @param parentShell */ public ViewSettingsDialog(Shell parentShell) { super(parentShell); } /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) */ protected void buttonPressed(int buttonId) { if (buttonId == DEFAULTS_BUTTON_ID) { performDefaults(); } super.buttonPressed(buttonId); } /** * Performs special processing when this dialog Defaults button has been pressed. *
* This is a framework hook method for subclasses to do special things when
* the Defaults button has been pressed.
* Subclasses may override, but should call super.performDefaults
.
*