Java tutorial
/*********************************************************************************** * Ubiquisense - A smart ambient utilities framework * * Copyright (c) 2008 - 2012, Lucas Bigeardel * * The library is released under: * * A) LGPL * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA * * B) EPL * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Lucas Bigeardel <lucas.bigeardel@gmail.com> - Initial API and implementation ***********************************************************************************/ package net.sf.smbt.ui.ableton.preferences; import net.sf.smbt.ui.ableton.Activator; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IntegerFieldEditor; import org.eclipse.jface.preference.StringFieldEditor; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; public class AbletonLivePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public AbletonLivePreferencePage() { super(GRID); setPreferenceStore(Activator.getDefault().getPreferenceStore()); setDescription("Ableton Live Connection Preferences"); } /** * Creates the field editors. Field editors are abstractions of * the common GUI blocks needed to manipulate various types * of preferences. Each field editor knows how to save and * restore itself. */ public void createFieldEditors() { addField(new IntegerFieldEditor(PreferenceConstants.P_ABLETON_INPUT_PORT, "Ableton Input Port:", getFieldEditorParent())); addField(new StringFieldEditor(PreferenceConstants.P_ABLETON_IP_ADDRESS, "Ableton IP Address:", getFieldEditorParent())); addField(new IntegerFieldEditor(PreferenceConstants.P_ABLETON_OUTPUT_PORT, "Ableton Output Port:", getFieldEditorParent())); } /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ public void init(IWorkbench workbench) { } }