/*
* 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.IntegerFieldEditor;
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 StatisticsViewPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public StatisticsViewPage() {
super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription(Messages.getString("StatisticsViewPage.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));
IntegerFieldEditor maxItemsEditor = new IntegerFieldEditor(PreferenceConstants.STATISTICVIEW_NB_MAX_ITEMS,
Messages.getString("StatisticsViewPage.StatisticsMaxItems"), //$NON-NLS-1$
getFieldEditorParent());
maxItemsEditor.getTextControl(getFieldEditorParent()).setToolTipText(Messages.getString("StatisticsViewPage.StatisticsMaxItemsTooltip")); //$NON-NLS-1$
addField(maxItemsEditor);
}
@Override
public void init(IWorkbench workbench) {
// TODO Auto-generated method stub
}
}