GrxuiPreferencePage.java
Go to the documentation of this file.
1 package com.generalrobotix.ui.grxui;
2 
3 import org.eclipse.jface.preference.*;
4 import org.eclipse.swt.SWT;
5 import org.eclipse.swt.layout.GridData;
6 import org.eclipse.swt.widgets.Composite;
7 import org.eclipse.swt.widgets.Group;
8 import org.eclipse.swt.widgets.Label;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
10 import org.eclipse.ui.IWorkbench;
13 
14 public class GrxuiPreferencePage
15  extends FieldEditorPreferencePage
16  implements IWorkbenchPreferencePage {
17 
19  super(GRID);
20  setPreferenceStore(Activator.getDefault().getPreferenceStore());
21  }
22 
23  public void createFieldEditors() {
24  Composite comp = getFieldEditorParent();
25 
26  Group group2 = new Group(comp, SWT.NONE);
27  group2.setText(MessageBundle.get("GrxuiPreferencePage.serverDir.title")); //$NON-NLS-1$
28  GridData group2Data = new GridData();
29  group2Data.horizontalSpan = 3;
30  group2.setLayoutData(group2Data);
31  Label label2 = new Label(group2, SWT.NONE);
32  label2.setText(MessageBundle.get("GrxuiPreferencePage.serverDir.message")); //$NON-NLS-1$
33  GridData label2Data = new GridData();
34  label2Data.horizontalSpan = 3;
35  label2.setLayoutData(label2Data);
36  addField(new DirectoryFieldEditor(PreferenceConstants.SERVER_DIR, "", group2)); //$NON-NLS-1$
37 
38  Label gap0 = new Label(comp, SWT.NONE);
39  Group group0 = new Group(comp, SWT.NONE);
40  group0.setText(MessageBundle.get("GrxuiPreferencePage.projectDir.title")); //$NON-NLS-1$
41  GridData group0Data = new GridData();
42  group0Data.horizontalSpan = 3;
43  group0.setLayoutData(group0Data);
44  Label label0 = new Label(group0, SWT.NONE);
45  label0.setText(MessageBundle.get("GrxuiPreferencePage.projectDir.message")); //$NON-NLS-1$
46  GridData label0Data = new GridData();
47  label0Data.horizontalSpan = 3;
48  label0.setLayoutData(label0Data);
49  addField(new DirectoryFieldEditor(PreferenceConstants.PROJECT_DIR, "", group0)); //$NON-NLS-1$
50 
51  Label gap1 = new Label(comp, SWT.NONE);
52  GridData gap1Data = new GridData();
53  gap1Data.horizontalSpan = 3;
54  gap1.setLayoutData(gap1Data);
55  addField(
56  new StringFieldEditor(PreferenceConstants.BIN_SFX, MessageBundle.get("GrxuiPreferencePage.binSfx.title"), getFieldEditorParent())); //$NON-NLS-1$
57 
58  Label gap2 = new Label(comp, SWT.NONE);
59  Group group1 = new Group(comp, SWT.NONE);
60  group1.setText(MessageBundle.get("GrxuiPreferencePage.jythonLib.title")); //$NON-NLS-1$
61  GridData group1Data = new GridData();
62  group1Data.horizontalSpan = 3;
63  group1.setLayoutData(group1Data);
64  Label label1 = new Label(group1, SWT.NONE);
65  label1.setText(MessageBundle.get("GrxuiPreferencePage.jythonLib.message")); //$NON-NLS-1$
66  GridData label1Data = new GridData();
67  label1Data.horizontalSpan = 1;
68  label1.setLayoutData(label1Data);
69  addField(new StringFieldEditor(PreferenceConstants.JYTHON_LIB, "", group1)); //$NON-NLS-1$
70 
71  Label gap3 = new Label(comp, SWT.NONE);
72  Group group3 = new Group(comp, SWT.NONE);
73  group3.setText(MessageBundle.get("GrxuiPreferencePage.initialProject.title")); //$NON-NLS-1$
74  GridData group3Data = new GridData();
75  group3Data.horizontalSpan = 3;
76  group3.setLayoutData(group3Data);
77  Label label3 = new Label(group3, SWT.NONE);
78  label3.setText(MessageBundle.get("GrxuiPreferencePage.initialProject.message")); //$NON-NLS-1$
79  GridData label3Data = new GridData();
80  label3Data.horizontalSpan = 3;
81  label3.setLayoutData(label3Data);
82  FileFieldEditor fileFieldEditor = new FileFieldEditor(PreferenceConstants.INITIALPROJECT, "", group3);
83  String[] extensions = {"*.xml"};
84  fileFieldEditor.setFileExtensions(extensions);
85  addField(fileFieldEditor); //$NON-NLS-1$
86  }
87 
88  public void init(IWorkbench workbench) {
89  }
90 
91 }
static final String get(String key)
org


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:03