1 /*******************************************************************************
 
   2  * Copyright (c) 2000, 2003 IBM Corporation and others.
 
   3  * All rights reserved. This program and the accompanying materials
 
   4  * are made available under the terms of the Common Public License v1.0
 
   5  * which accompanies this distribution, and is available at
 
   6  * http://www.eclipse.org/legal/cpl-v10.html
 
   9  *     IBM Corporation - initial API and implementation
 
  10  *******************************************************************************/
 
  12 package net.sourceforge.phpdt.internal.ui.preferences;
 
  14 import org.eclipse.swt.widgets.Composite;
 
  15 import org.eclipse.swt.widgets.Control;
 
  19  * Interface for preference configuration blocks which can either be
 
  20  * wrapped by a {@link org.eclipse.jdt.internal.ui.preferences.AbstractConfigurationBlockPreferencePage}
 
  21  * or be included some preference page.
 
  23  * Clients may implement this interface.
 
  28 public interface IPreferenceConfigurationBlock {
 
  31          * Creates the preference control.
 
  33          * @param parent the parent composite to which to add the preferences control
 
  34          * @return the control that was added to <code>parent</code> 
 
  36         Control createControl(Composite parent);
 
  39          * Called after creating the control. Implementations should load the 
 
  40          * preferences values and update the controls accordingly.
 
  45          * Called when the <code>OK</code> button is pressed on the preference
 
  46          * page. Implementations should commit the configured preference settings
 
  47          * into their form of preference storage.
 
  52          * Called when the <code>Defaults</code> button is pressed on the
 
  53          * preference page. Implementation should reset any preference settings to
 
  54          * their default values and adjust the controls accordingly.
 
  56         void performDefaults();
 
  59          * Called when the preference page is being disposed. Implementations should
 
  60          * free any resources they are holding on to.