GrxuiPreferencePage.java
Go to the documentation of this file.
00001 package com.generalrobotix.ui.grxui;
00002 
00003 import org.eclipse.jface.preference.*;
00004 import org.eclipse.swt.SWT;
00005 import org.eclipse.swt.layout.GridData;
00006 import org.eclipse.swt.widgets.Composite;
00007 import org.eclipse.swt.widgets.Group;
00008 import org.eclipse.swt.widgets.Label;
00009 import org.eclipse.ui.IWorkbenchPreferencePage;
00010 import org.eclipse.ui.IWorkbench;
00011 import com.generalrobotix.ui.grxui.Activator;
00012 import com.generalrobotix.ui.util.MessageBundle;
00013 
00014 public class GrxuiPreferencePage
00015         extends FieldEditorPreferencePage
00016         implements IWorkbenchPreferencePage {
00017 
00018         public GrxuiPreferencePage() {
00019                 super(GRID);
00020                 setPreferenceStore(Activator.getDefault().getPreferenceStore());
00021         }
00022         
00023         public void createFieldEditors() {
00024                 Composite comp = getFieldEditorParent();
00025                 
00026                 Group group2 = new Group(comp, SWT.NONE);
00027                 group2.setText(MessageBundle.get("GrxuiPreferencePage.serverDir.title")); //$NON-NLS-1$
00028                 GridData group2Data = new GridData();
00029                 group2Data.horizontalSpan = 3;
00030                 group2.setLayoutData(group2Data);
00031                 Label label2 = new Label(group2, SWT.NONE);
00032                 label2.setText(MessageBundle.get("GrxuiPreferencePage.serverDir.message")); //$NON-NLS-1$
00033                 GridData label2Data = new GridData();
00034                 label2Data.horizontalSpan = 3;
00035                 label2.setLayoutData(label2Data);
00036                 addField(new DirectoryFieldEditor(PreferenceConstants.SERVER_DIR, "", group2)); //$NON-NLS-1$
00037                 
00038                 Label gap0 = new Label(comp, SWT.NONE);
00039                 Group group0 = new Group(comp, SWT.NONE);
00040                 group0.setText(MessageBundle.get("GrxuiPreferencePage.projectDir.title")); //$NON-NLS-1$
00041                 GridData group0Data = new GridData();
00042                 group0Data.horizontalSpan = 3;
00043                 group0.setLayoutData(group0Data);
00044                 Label label0 = new Label(group0, SWT.NONE);
00045                 label0.setText(MessageBundle.get("GrxuiPreferencePage.projectDir.message")); //$NON-NLS-1$
00046                 GridData label0Data = new GridData();
00047                 label0Data.horizontalSpan = 3;
00048                 label0.setLayoutData(label0Data);
00049                 addField(new DirectoryFieldEditor(PreferenceConstants.PROJECT_DIR, "", group0)); //$NON-NLS-1$
00050                 
00051                 Label gap1 = new Label(comp, SWT.NONE);
00052                 GridData gap1Data = new GridData();
00053                 gap1Data.horizontalSpan = 3;
00054                 gap1.setLayoutData(gap1Data);
00055                 addField(
00056                         new StringFieldEditor(PreferenceConstants.BIN_SFX, MessageBundle.get("GrxuiPreferencePage.binSfx.title"), getFieldEditorParent())); //$NON-NLS-1$
00057                 
00058                 Label gap2 = new Label(comp, SWT.NONE);
00059                 Group group1 = new Group(comp, SWT.NONE);
00060                 group1.setText(MessageBundle.get("GrxuiPreferencePage.jythonLib.title")); //$NON-NLS-1$
00061                 GridData group1Data = new GridData();
00062                 group1Data.horizontalSpan = 3;
00063                 group1.setLayoutData(group1Data);
00064                 Label label1 = new Label(group1, SWT.NONE);
00065                 label1.setText(MessageBundle.get("GrxuiPreferencePage.jythonLib.message")); //$NON-NLS-1$
00066                 GridData label1Data = new GridData();
00067                 label1Data.horizontalSpan = 1;
00068                 label1.setLayoutData(label1Data);
00069                 addField(new StringFieldEditor(PreferenceConstants.JYTHON_LIB, "", group1)); //$NON-NLS-1$
00070                 
00071                 Label gap3 = new Label(comp, SWT.NONE);
00072                 Group group3 = new Group(comp, SWT.NONE);
00073                 group3.setText(MessageBundle.get("GrxuiPreferencePage.initialProject.title"));   //$NON-NLS-1$
00074                 GridData group3Data = new GridData();
00075                 group3Data.horizontalSpan = 3;
00076                 group3.setLayoutData(group3Data);
00077                 Label label3 = new Label(group3, SWT.NONE);
00078                 label3.setText(MessageBundle.get("GrxuiPreferencePage.initialProject.message"));        //$NON-NLS-1$
00079                 GridData label3Data = new GridData();
00080                 label3Data.horizontalSpan = 3;
00081                 label3.setLayoutData(label3Data);
00082                 FileFieldEditor fileFieldEditor = new FileFieldEditor(PreferenceConstants.INITIALPROJECT, "", group3);
00083                 String[] extensions = {"*.xml"};
00084                 fileFieldEditor.setFileExtensions(extensions);
00085                 addField(fileFieldEditor); //$NON-NLS-1$
00086         }
00087 
00088         public void init(IWorkbench workbench) {
00089         }
00090         
00091 }


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:43:54