/*
* Jampa
* Copyright (C) 2008-2009 J. Devauchelle and contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* 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.
*/
package org.jampa.preferences.pages;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jampa.Activator;
import org.jampa.gui.translations.Messages;
import org.jampa.preferences.PreferenceConstants;
public class LibraryViewPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public LibraryViewPage() {
super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription(Messages.getString("LibraryViewPage.Title")); //$NON-NLS-1$
}
@Override
protected void createFieldEditors() {
Label horizontalLine;
horizontalLine = new Label(getFieldEditorParent(), SWT.NONE);
horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
addField(new RadioGroupFieldEditor(
PreferenceConstants.LIBRARYVIEW_FOLDER_DOUBLECLICK_ACTION,
Messages.getString("LibraryViewPage.FolderDoubleclickAction"), //$NON-NLS-1$
1,
new String[][] { { Messages.getString("LibraryViewPage.FolderDoubleclickActionDefault"), "0" }, { //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("LibraryViewPage.FolderDoubleclickActionExpand"), "1" } }, //$NON-NLS-1$ //$NON-NLS-2$
getFieldEditorParent()));
horizontalLine = new Label(getFieldEditorParent(), SWT.NONE);
horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
addField(new RadioGroupFieldEditor(
PreferenceConstants.LIBRARYVIEW_DEFAULT_DOUBLECLICK_ACTION,
Messages.getString("LibraryViewPage.PlayDefaultDoubleclickAction"), //$NON-NLS-1$
1,
new String[][] { { Messages.getString("ViewsPage.DoubleclickActionPlay"), "0" }, { //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("ViewsPage.DoubleclickActionEnqueue"), "1" } }, //$NON-NLS-1$ //$NON-NLS-2$
getFieldEditorParent()));
}
@Override
public void init(IWorkbench workbench) {
// TODO Auto-generated method stub
}
}