Package com.simonepezzano.hshare.preferences

Source Code of com.simonepezzano.hshare.preferences.HMainPreferencePage

package com.simonepezzano.hshare.preferences;

import hshare.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;


/**
* the main preference page
* @author Simone Pezzano
*
*/
public class HMainPreferencePage
  extends FieldEditorPreferencePage
  implements IWorkbenchPreferencePage {
  public static final String ID = "HShare.mainPreferencePage";
  public HMainPreferencePage() {
    super(GRID);
    setPreferenceStore(Activator.getDefault().getPreferenceStore());
    setDescription("General program preferences");
  }
 
  public void createFieldEditors() {
    addField(new StringFieldEditor(PreferenceConstants.P_IPURLSERVICE,
        "&External IP address service URL:", getFieldEditorParent()));
    addField(
      new IntegerFieldEditor(
        PreferenceConstants.P_LISTENINGPORT,
        "&Listening port",
        getFieldEditorParent()));
  }

  /* (non-Javadoc)
   * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
   */
  public void init(IWorkbench workbench) {
  }
 
}
TOP

Related Classes of com.simonepezzano.hshare.preferences.HMainPreferencePage

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.