/*
* Gamers Own Instant Messenger
* Copyright (C) 2005-2006 Herbert Poul (kahless@sphene.net)
* http://goim.sphene.net
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package net.sphene.goim.rcp.preferences;
import org.eclipse.jface.preference.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.IWorkbench;
import net.sphene.goim.rcp.GOIMPlugin;
import net.sphene.goim.rcp.ui.preferences.GOIMPreferencePageGUI;
/**
* This class represents a preference page that
* is contributed to the Preferences dialog. By
* subclassing <samp>FieldEditorPreferencePage</samp>, we
* can use the field support built into JFace that allows
* us to create a page that is small and knows how to
* save, restore and apply itself.
* <p>
* This page is used to modify preferences only. They
* are stored in the preference store that belongs to
* the main plug-in class. That way, preferences can
* be accessed directly via the preference store.
*/
public class GOIMAccountPreferences
extends PreferencePage
implements IWorkbenchPreferencePage {
public static final String ID = "net.sphene.goim.rcp.preferences.GOIMAccountPreferences";
@Override
public boolean isValid() {
// TODO Auto-generated method stub
return true;
}
public GOIMAccountPreferences() {
super();
noDefaultAndApplyButton();
setPreferenceStore(GOIMPlugin.getDefault().getPreferenceStore());
setDescription("GOIM Accounts");
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
public void init(IWorkbench workbench) {
}
@Override
protected Control createContents(Composite parent) {
parent.setLayout(new GridLayout());
GOIMPreferencePageGUI gui = new GOIMPreferencePageGUI(parent,SWT.NONE);
return gui;
}
}