001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 *
019 */
020 package org.apache.directory.studio.apacheds.prefs;
021
022
023 import org.apache.directory.studio.apacheds.ApacheDsPlugin;
024 import org.eclipse.jface.preference.PreferencePage;
025 import org.eclipse.swt.SWT;
026 import org.eclipse.swt.layout.GridData;
027 import org.eclipse.swt.layout.GridLayout;
028 import org.eclipse.swt.widgets.Composite;
029 import org.eclipse.swt.widgets.Control;
030 import org.eclipse.ui.IWorkbench;
031 import org.eclipse.ui.IWorkbenchPreferencePage;
032
033
034 /**
035 * This class implements the Apache DS preference page for the Apache DS plugin.
036 *
037 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
038 * @version $Rev$, $Date$
039 */
040 public class MainPage extends PreferencePage implements IWorkbenchPreferencePage
041 {
042 /**
043 * Creates a new instance of MainPage.
044 */
045 public MainPage()
046 {
047 super( Messages.getString( "MainPage.ApacheDS" ) ); //$NON-NLS-1$
048 setPreferenceStore( ApacheDsPlugin.getDefault().getPreferenceStore() );
049 setDescription( Messages.getString( "MainPage.GeneralSettingsPlugin" ) ); //$NON-NLS-1$
050 }
051
052
053 /* (non-Javadoc)
054 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
055 */
056 protected Control createContents( Composite parent )
057 {
058 Composite composite = new Composite( parent, SWT.NONE );
059 composite.setLayout( new GridLayout() );
060 composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
061
062 return parent;
063 }
064
065
066 /* (non-Javadoc)
067 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
068 */
069 public void init( IWorkbench workbench )
070 {
071 // Nothing to do
072 }
073 }