Package org.jampa.preferences.pages

Source Code of org.jampa.preferences.pages.EnginesPage

/*
* 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 EnginesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

  public EnginesPage() {
    super(GRID);
    setPreferenceStore(Activator.getDefault().getPreferenceStore());
    setDescription(Messages.getString("EnginesPage.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, 3, 1));
   
    addField(new RadioGroupFieldEditor(
        PreferenceConstants.PLAYBACK_ENGINE,
        Messages.getString("EnginesPage.ChooseEngine"), //$NON-NLS-1$
        1,
        new String[][] { { Messages.getString("EnginesPage.JLayerEngine"), "0" }, { //$NON-NLS-1$ //$NON-NLS-2$
                  Messages.getString("EnginesPage.MPlayerEngine"), "1" } }, //$NON-NLS-1$ //$NON-NLS-2$
        getFieldEditorParent()));
   
  }

  @Override
  public void init(IWorkbench workbench) {
    // TODO Auto-generated method stub
   
  }

 

}
TOP

Related Classes of org.jampa.preferences.pages.EnginesPage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.