List of usage examples for org.eclipse.jface.preference BooleanFieldEditor BooleanFieldEditor
public BooleanFieldEditor(String name, String label, Composite parent)
From source file:ac.soton.eventb.statemachines.diagram.preferences.custom.DiagramBehaviourPreferencePage.java
License:Open Source License
/** * Adds autosave group fields to parent control. * /*w ww. j a v a2 s . c o m*/ * @param parent */ private void addAutosaveFields(Composite parent) { // Create a Group to hold the autosave fields Group group = new Group(parent, SWT.NONE); group.setText(AUTOSAVE_SETTINGS_GROUP_LABEL); GridLayout gridLayout = new GridLayout(2, false); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.grabExcessHorizontalSpace = true; gridData.horizontalSpan = 2; // Add the fields to the group autosaveOnEditorDeactivation = new BooleanFieldEditor( IStatemachinesPreferenceConstants.PREF_AUTOSAVE_ON_DEACTIVATE, AUTOSAVE_ON_DEACTIVATE_LABEL, group); addField(autosaveOnEditorDeactivation); group.setLayoutData(gridData); group.setLayout(gridLayout); }
From source file:ar.com.tadp.xml.rinzo.core.preferences.FormattingPreferencePage.java
License:Open Source License
public void createFieldEditors() { String[][] labelAndValues = new String[][] { { "Indent using tabs", "false" }, { "Indent using spaces", "true" } }; addField(new IntegerFieldEditor(XMLEditorPlugin.PREF_MAX_LINE_WIDTH, "Maximum line width:", 3, 3, getFieldEditorParent()));// www . j a v a 2 s .c o m addField(new IntegerFieldEditor("printMarginColumn", "Print margin column", 3, 3, getFieldEditorParent())); addField(new RadioGroupFieldEditor(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS, "Indentation", 1, labelAndValues, getFieldEditorParent())); addField(new IntegerFieldEditor(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, "Indentation size:", 3, 3, getFieldEditorParent())); addField(new BooleanFieldEditor(XMLEditorPlugin.FORMAT_ON_SAVE, "Format on save", getFieldEditorParent())); addField(new BooleanFieldEditor("overviewRuler", "Show overview ruler", getFieldEditorParent())); addField(new BooleanFieldEditor("lineNumberRuler", "Show line numbers", getFieldEditorParent())); addField(new BooleanFieldEditor("currentLine", "Highlight current line", getFieldEditorParent())); addField(new BooleanFieldEditor("printMargin", "Show print margin", getFieldEditorParent())); addField(new ColorPreferenceEditor("appearanceColors", "Appearance color options:", getFieldEditorParent(), this.colorPreferences)); }
From source file:at.medevit.elexis.gdt.ui.GDTPreferencePage.java
License:Open Source License
/** * Create contents of the preference page. *//*from w ww .j a va 2 s. c om*/ @Override protected void createFieldEditors() { { Composite composite = getFieldEditorParent(); StringFieldEditor stringFieldEditorGDTID = new StringFieldEditor(CFG_GDT_ID, "GDT Identitt", composite); stringFieldEditorGDTID.getLabelControl(composite).setText("GDT Identitt (max 8 Zeichen)"); stringFieldEditorGDTID.getLabelControl(composite).setToolTipText( "Die GDT-ID dient zur eindeutigen Identifikation der an der Kommunikation beteiligten Komonenten."); stringFieldEditorGDTID.getTextControl(composite).setTextLimit(8); addField(stringFieldEditorGDTID); } { Composite composite = getFieldEditorParent(); StringFieldEditor exchangeKuerzel = new StringFieldEditor(CFG_GDT_FILETRANSFER_SHORTNAME, "Kommunikations-Krzel (4 Zeichen)", composite); exchangeKuerzel.getTextControl(composite).setTextLimit(4); addField(exchangeKuerzel); } { Composite composite = getFieldEditorParent(); ComboFieldEditor comboFieldEditor = new ComboFieldEditor(CFG_GDT_CHARSET, "Standard Zeichensatz", comboCharsetSelektor, composite); comboFieldEditor.getLabelControl(composite) .setToolTipText("Zeichensatz welcher zum Datenaustausch verwendet werden soll"); addField(comboFieldEditor); } { BooleanFieldEditor deleteNonGDTFiles = new BooleanFieldEditor(CFG_GDT_FILETRANSFER_DELETE_NON_GDT_FILES, "Nicht GDT Dateien aus Daten-Austausch-Verzeichnissen entfernen", getFieldEditorParent()); addField(deleteNonGDTFiles); } }
From source file:at.nucle.e4.preferences.example.preferences.RootPreference.java
License:Open Source License
@Override protected void createFieldEditors() { addField(new BooleanFieldEditor("truefalse", "dsda", getFieldEditorParent())); injection.call();// w w w . ja v a 2 s. c o m }
From source file:au.gov.ga.earthsci.application.parts.globe.GlobePreferencePage.java
License:Apache License
@Override protected void createFieldEditors() { BooleanFieldEditor fpsEditor = new BooleanFieldEditor(FPS_PREFERENCE_NAME, Messages.GlobePreferencePage_FPS, getFieldEditorParent());//from w w w .j a v a2 s . c o m addField(fpsEditor); BooleanFieldEditor stereoCanvasEditor = new BooleanFieldEditor(STEREO_PREFERENCE_NAME, Messages.GlobePreferencePage_Stereo, getFieldEditorParent()); addField(stereoCanvasEditor); }
From source file:au.gov.ga.earthsci.bookmark.part.preferences.BookmarksPreferencesPage.java
License:Apache License
@Override protected void createFieldEditors() { addField(new SpacerFieldEditor(getFieldEditorParent())); transitionDurationEditor = new IntegerFieldEditor(IBookmarksPreferences.DEFAULT_TRANSITION_DURATION, Messages.BookmarksPreferencesPage_TransitionDurationFieldTitle, getFieldEditorParent()); addField(transitionDurationEditor);//from w w w .java2s. c o m playBookmarksWaitDurationEditor = new IntegerFieldEditor(IBookmarksPreferences.PLAY_BOOKMARKS_WAIT_DURATION, Messages.BookmarksPreferencesPage_PlayBookmarksPauseDurationLabel, getFieldEditorParent()); addField(playBookmarksWaitDurationEditor); addField(new SpacerFieldEditor(getFieldEditorParent())); askForDeleteConfirmationEditor = new BooleanFieldEditor(IBookmarksPreferences.ASK_LIST_DELETE_CONFIRM, Messages.BookmarksPreferencesPage_AskConfirmDeleteLabel, getFieldEditorParent()); addField(askForDeleteConfirmationEditor); addField(new SpacerFieldEditor(getFieldEditorParent())); LabelFieldEditor defaultPropertiesLabel = new LabelFieldEditor( Messages.BookmarksPreferencesPage_DefaultPropertiesLabel, getFieldEditorParent()); addField(defaultPropertiesLabel); loadAvailableBookmarkProperties(); ITableItemCreator<IBookmarkProperty> tableItemCreator = new ITableItemCreator<IBookmarkProperty>() { @Override public TableItem createTableItem(Table parent, IBookmarkProperty object) { TableItem item = new TableItem(parent, SWT.NONE); item.setText(object.getName()); return item; } }; IItemSerializer<IBookmarkProperty> itemSerializer = new IItemSerializer<IBookmarkProperty>() { @Override public String asString(IBookmarkProperty object) { return object.getType(); } @Override public IBookmarkProperty fromString(String string) { return cachedProperties.get(string); } }; defaultProperties = new MultiSelectTableListFieldEditor<IBookmarkProperty>( IBookmarksPreferences.DEFAULT_PROPERTIES, new ArrayList<IBookmarkProperty>(cachedProperties.values()), new String[] { Messages.BookmarksPreferencesPage_PropertyColumn }, tableItemCreator, itemSerializer, getFieldEditorParent()); addField(defaultProperties); }
From source file:autobackup.preferences.AutoBackupPreferencesPage.java
License:Open Source License
public void createFieldEditors() { localPath = new DirectoryFieldEditor(AutoBackupPreferenceNames.P_LOCALPATH, "Local Path to Store Backups: ", getFieldEditorParent());/* w w w . j a va 2 s . c o m*/ useRemote = new BooleanFieldEditor(AutoBackupPreferenceNames.P_USEREMOTE, "Use &Remote Backup: ", getFieldEditorParent()); remoteService = new RadioGroupFieldEditor(AutoBackupPreferenceNames.P_SERVICE, "Select your Backup Service", 1, new String[][] { { "SCP", "ssh" } }, getFieldEditorParent()); user = new StringFieldEditor(AutoBackupPreferenceNames.P_USER, "&User:", getFieldEditorParent()); hostname = new StringFieldEditor(AutoBackupPreferenceNames.P_HOSTNAME, "&Hostname:", getFieldEditorParent()); remotePath = new StringFieldEditor(AutoBackupPreferenceNames.P_REMOTEPATH, "Remote Path to Store Backups: ", getFieldEditorParent()); addField(localPath); addField(useRemote); addField(remoteService); addField(user); addField(hostname); addField(remotePath); }
From source file:autosave.preferences.AutoSavePreferencePage.java
License:Apache License
/** * 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. *//*from w ww . j a va2s .c om*/ @Override public void createFieldEditors() { addField(new BooleanFieldEditor(ENABLED, "&AutoSave activated", getFieldEditorParent())); }
From source file:br.ufmg.dcc.tabuleta.ui.ConcernMapperPreferencePage.java
License:Open Source License
/** * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors() *///from w w w . ja v a 2 s . co m public void createFieldEditors() { //ConcernMapperFilter addField(new LabelFieldEditor(Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.HeaderFilter"), getFieldEditorParent())); addField(new BooleanFieldEditor(P_FILTER_ENABLED, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.FilterEnabled"), getFieldEditorParent())); IntegerFieldEditor lIntegerFieldEditor = new IntegerFieldEditor(P_FILTER_THRESHOLD, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.FilterThreshold"), getFieldEditorParent()); lIntegerFieldEditor.setValidRange(0, MAX_FILTER_THRESHOLD); addField(lIntegerFieldEditor); addField(new LabelFieldEditor("", getFieldEditorParent())); //Saving addField(new LabelFieldEditor(Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.HeaderSaving"), getFieldEditorParent())); addField(new BooleanFieldEditor(P_CM_FILE_EXT, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.CmFileExt"), getFieldEditorParent())); addField(new BooleanFieldEditor(P_AUTO_SAVE, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.AutoSave"), getFieldEditorParent())); addField(new BooleanFieldEditor(P_AUTO_LOAD, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.AutoLoad"), getFieldEditorParent())); addField(new LabelFieldEditor("", getFieldEditorParent())); //UI addField(new LabelFieldEditor(Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.HeaderUI"), getFieldEditorParent())); addField(new BooleanFieldEditor(ConcernMapperPreferencePage.P_SHOW_SLIDER, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.ShowSlider"), getFieldEditorParent())); addField(new BooleanFieldEditor(ConcernMapperPreferencePage.P_SHOW_COMMENTS, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.ShowComments"), getFieldEditorParent())); addField(new BooleanFieldEditor(ConcernMapperPreferencePage.P_SUFFIX_ENABLED, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.SuffixEnabled"), getFieldEditorParent())); addField(new BooleanFieldEditor(ConcernMapperPreferencePage.P_BOLD_ENABLED, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.BoldEnabled"), getFieldEditorParent())); String[][] lRadioGroupValues = { { Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.Parent1"), "1" }, { Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.Parent2"), "2" }, { Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.Parent3"), "3" }, { Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.Parent4"), "4" }, { Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.Parent5"), "5" }, { Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.Parent6"), "7" } }; addField(new RadioGroupFieldEditor(ConcernMapperPreferencePage.P_DECORATION_LIMIT, Tabuleta.getResourceString("ui.ConcernMapperPreferencePage.ParentDecoration"), 1, lRadioGroupValues, getFieldEditorParent())); }
From source file:ca.uvic.cs.tagsea.preferences.TagSEAPreferencePage.java
License:Open Source License
/** * 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. *///from www . j a va 2 s. c om public void createFieldEditors() { // addField(new BooleanFieldEditor(TagSEAPreferences.KEY_ADD_TASK_TAG, // "Automatically add the @tag compiler task tag", getFieldEditorParent())); addField(new BooleanFieldEditor(TagSEAPreferences.KEY_ADD_DATE, "Add &date information to tags", getFieldEditorParent())); authorAllowedEditor = new BooleanFieldEditor(TagSEAPreferences.KEY_ADD_AUTHOR, "Add &author information to tags", getFieldEditorParent()) { protected void valueChanged(boolean oldValue, boolean newValue) { super.valueChanged(oldValue, newValue); authorNameEditor.setEnabled(authorAllowedEditor.getBooleanValue(), getFieldEditorParent()); } }; addField(authorAllowedEditor); authorNameEditor = new UserNameStringFieldEditor(TagSEAPreferences.KEY_AUTHOR_NAME, "Author &name", getFieldEditorParent()); addField(authorNameEditor); authorNameEditor.setEnabled(TagSEAPreferences.isAddAuthor(), getFieldEditorParent()); }