Java 类org.eclipse.jface.preference.FontFieldEditor 实例源码

项目:LogViewer    文件:LogViewerPreferences.java   
private void createFontSettings(Composite composite) {
    Composite panel = new Composite(composite, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.numColumns = 4;
    panel.setLayout(layout);
    GridData data = new GridData();
    data.horizontalSpan = 2;
       data.grabExcessHorizontalSpace = true;
       data.horizontalAlignment = SWT.CENTER;
    panel.setLayoutData(data);

    fontTypeEditor = new FontFieldEditor(ILogViewerConstants.PREF_EDITOR_FONT_STYLE,LogViewerPlugin.getResourceString("preferences.contenteditor.font.style.text"),panel); //$NON-NLS-1$
    fontTypeEditor.setChangeButtonText(LogViewerPlugin.getResourceString("preferences.contenteditor.fontl.style.button.text")); //$NON-NLS-1$
    fontTypeEditor.setPreferenceStore(doGetPreferenceStore());
    fontTypeEditor.fillIntoGrid(panel, 3);
    fontTypeEditor.setPage(this);
    fontTypeEditor.load();
}
项目:raptor-chess-interface    文件:ChessBoardResultsPage.java   
@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(PreferenceKeys.RESULTS_FADE_AWAY_MODE,
            local.getString("resFedAw"), getFieldEditorParent()));

    addField(new ComboFieldEditor(PreferenceKeys.RESULTS_ANIMATION_DELAY,
            local.getString("resAnDel"), RESULTS_ANIMATION_DELAY_OPTIONS,
            getFieldEditorParent()));

    addField(new ComboFieldEditor(PreferenceKeys.RESULTS_WIDTH_PERCENTAGE,
            local.getString("resPreSz"), RESULTS_PERCENTAGE,
            getFieldEditorParent()));

    addField(new ColorFieldEditor(PreferenceKeys.RESULTS_COLOR,
            local.getString("resCol"), getFieldEditorParent()));
    addField(new FontFieldEditor(PreferenceKeys.RESULTS_FONT,
            local.getString("resFnt"), getFieldEditorParent()));
}
项目:cuina    文件:EventPreferencePage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors()
{
    addField(new FontFieldEditor(
            EventPreferences.CMDLINE_FONT, "Schrift:", getFieldEditorParent()) );
    addField(new IntegerFieldEditor(
            EventPreferences.CMDLINE_INDENT_WIDTH, "Einrückungstiefe", getFieldEditorParent()) );
    addField(new ColorListEditor(new String[][]
    {
            {EventPreferences.CMDLINE_BACKGROUND_COLOR,     "Hintergrund Farbe"},
            {EventPreferences.CMDLINE_COLOR_DEFAULT,        "Default Farbe"},
            {EventPreferences.CMDLINE_COLOR_COMMENT,        "Kommentare"},
            {EventPreferences.CMDLINE_COLOR_CONTROL,        "Kontrollstrukturen"},
            {EventPreferences.CMDLINE_COLOR_ASSIGNMENT,     "Zuweisungen"},
            {EventPreferences.CMDLINE_COLOR_FUNCTION,       "Funktionen"},
    }, "Farb-Schema:", getFieldEditorParent()) );
}
项目:raptor-chess-interface    文件:BughousePage.java   
@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(
            PreferenceKeys.BUGHOUSE_OBSERVING_OPEN_PARTNER_BOARD,
            local.getString("bugPageVar1"),
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            PreferenceKeys.BUGHOUSE_PLAYING_OPEN_PARTNER_BOARD,
            local.getString("bugPageVar2"),
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            PreferenceKeys.BUGHOUSE_SHOW_BUGWHO_ON_PARTNERSHIP,
            local.getString("bugPageVar3"),
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            PreferenceKeys.BUGHOUSE_IS_PLAYING_PARTNERSHIP_OFFERED_SOUND,
            local.getString("bugPageVar4"),
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            PreferenceKeys.BOARD_SHOW_BUGHOUSE_SIDE_UP_TIME,
            local.getString("bugPageVar5"), getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            PreferenceKeys.BUGHOUSE_SPEAK_COUNTDOWN_ON_PARTNER_BOARD,
            local.getString("bugPageVar6"), getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            PreferenceKeys.BUGHOUSE_SPEAK_PARTNER_TELLS,
            local.getString("bugPageVar7"), getFieldEditorParent()));

    addField(new FontFieldEditor(PreferenceKeys.BUG_BUTTONS_FONT,
            local.getString("bugPageVar8"), getFieldEditorParent()));
}
项目:raptor-chess-interface    文件:RaptorWindowPage.java   
@Override
protected void createFieldEditors() {

    String[][] sliderWidthPreferences = { { local.getString("tiny"), "3" },
            { local.getString("small"), "5" }, { local.getString("medium"), "8" }, { local.getString("large"), "11" },
            { local.getString("extWide"), "15" } };
    ComboFieldEditor setFieldEditor = new ComboFieldEditor(
            PreferenceKeys.APP_SASH_WIDTH, local.getString("divSashWid"),
            sliderWidthPreferences, getFieldEditorParent());
    addField(setFieldEditor);

    ColorFieldEditor pingTimeColor = new ColorFieldEditor(
            PreferenceKeys.APP_PING_COLOR, local.getString("pingTFontCol"),
            getFieldEditorParent());
    addField(pingTimeColor);

    addField(pingTimeColor);
    FontFieldEditor pingTimeFont = new FontFieldEditor(
            PreferenceKeys.APP_PING_FONT, local.getString("pingTFont"),
            getFieldEditorParent());
    addField(pingTimeFont);

    ColorFieldEditor statusBarFontColor = new ColorFieldEditor(
            PreferenceKeys.APP_STATUS_BAR_COLOR, local.getString("statBarFontCol"),
            getFieldEditorParent());
    addField(statusBarFontColor);

    FontFieldEditor statusBarFont = new FontFieldEditor(
            PreferenceKeys.APP_STATUS_BAR_FONT, local.getString("statBarFont"),
            getFieldEditorParent());
    addField(statusBarFont);

    addField(new BooleanFieldEditor(
            PreferenceKeys.APP_SHOW_STATUS_BAR,
            local.getString("showWinStar"),
            getFieldEditorParent()));

}
项目:SPELL    文件:FontsPreferencePage.java   
@Override
protected void createFieldEditors()
{
    // TODO Auto-generated method stub
    m_colorSelectors = new FontFieldEditor[FontKey.values().length];
    Composite parent = getFieldEditorParent();
    for (FontKey key : FontKey.values())
    {
        FontFieldEditor selector = new FontFieldEditor(key.getPreferenceName(), key.description, TEST_TEXT, parent);
        m_colorSelectors[key.ordinal()] = selector;
        addField(selector);
    }
}
项目:SPELL    文件:FontsPreferencePage.java   
@Override
public void performApply()
{
    for (FontKey key : FontKey.values())
    {
        FontFieldEditor selector = m_colorSelectors[key.ordinal()];
        Font font = selector.getPreviewControl().getFont();
        m_conf.setFont(key, font);
    }
}
项目:PDFReporter-Studio    文件:DesignerPreferencePage.java   
/**
 *
 */
public void createFieldEditors() {
    addField(new ComboFieldEditor(
            P_ELEMENT_DESIGN_BORDER_STYLE,
            Messages.DesignerPreferencePage_element_design_border_style,
            new String[][] {
                    { Messages.DesignerPreferencePage_corners, "corners" }, { Messages.common_rectangle, "rectangle" } }, getFieldEditorParent())); //$NON-NLS-1$ //$NON-NLS-2$
    addField(new ColorFieldEditor(P_ELEMENT_DESIGN_BORDER_COLOR, Messages.DesignerPreferencePage_elementbordercolor,
            getFieldEditorParent()));

    addField(new ComboFieldEditor(P_PAGE_DESIGN_BORDER_STYLE, Messages.DesignerPreferencePage_page_border_style,
            new String[][] { { Messages.DesignerPreferencePage_fancy_shadow, DEFAULT_BORDERSTYLE },
                    { Messages.DesignerPreferencePage_simple_shadow, "rectangle" } }, getFieldEditorParent())); //$NON-NLS-1$ //$NON-NLS-2$

    addField(new ComboFieldEditor(P_PAGE_DEFAULT_UNITS, Messages.DesignerPreferencePage_unit, Unit.getUnits2(),
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(P_SHOW_REPORT_BAND_NAMES, Messages.DesignerPreferencePage_show_band_names,
            getFieldEditorParent()));
    addField(new ColorFieldEditor(P_CONTAINER_MARGIN_COLOR, Messages.DesignerPreferencePage_common_bandmargincolor,
            getFieldEditorParent()));
    addField(new ColorFieldEditor(P_PAGE_MARGIN_COLOR, Messages.DesignerPreferencePage_pageprintmargincolor,
            getFieldEditorParent()));
    addField(new ColorFieldEditor(P_PAGE_BACKGROUND, Messages.DesignerPreferencePage_pagebackground,
            getFieldEditorParent()));
    addField(new FontFieldEditor(P_INTERNAL_EDITORS_FONT, Messages.DesignerPreferencePage_InternalEditorsFont,
            getFieldEditorParent()));

    addField(new ComboFieldEditor(BEHAVIOR_ON_FIELD_DROP, Messages.DesignerPreferencePage_field_behavior,
            new String[][] { { Messages.DesignerPreferencePage_field_behavior_label, BEHAVIOR_CREATE_LABEL },
                    { Messages.DesignerPreferencePage_field_behavior_nothing, BEHAVIOR_DO_NOTHING },
                    { Messages.DesignerPreferencePage_field_behavior_ask, BEHAVIOR_ASK_EVERYTIME } }, getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_USE_FIELD_DESCRIPTION, Messages.DesignerPreferencePage_UseDescriptionForLabelText,
            getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_SAVE_ON_PREVIEW, Messages.DesignerPreferencePage_savereportonpreview, getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_CENTER_SELECTION, Messages.DesignerPreferencePage_centerEditorOption, getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_RESIZE_CONTAINER, Messages.DesignerPreferencePage_autoresizeBand, getFieldEditorParent()));
}
项目:mytourbook    文件:PrefPagePhotoDirectory.java   
private void createUI_12_Gallery(final Composite parent) {

        final Group group = new Group(parent, SWT.NONE);
        GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
        GridLayoutFactory.swtDefaults().applyTo(group);
        group.setText(Messages.PrefPage_Photo_Viewer_Group_PhotoGallery);
        {
            /*
             * text min size
             */
            createUI_14_MinSize(group);

            /*
             * gallery font
             */
            _galleryFontEditor = new FontFieldEditor(IPhotoPreferences.PHOTO_VIEWER_FONT, //
                    Messages.PrefPage_Photo_Viewer_Label_FontEditor,
                    Messages.PrefPage_Photo_Viewer_Label_FontExample,
                    group);
            _galleryFontEditor.setPreferenceStore(_prefStore);
            _galleryFontEditor.setPage(this);
            _galleryFontEditor.load();
            _galleryFontEditor.setPropertyChangeListener(this);
        }

        // force 2 columns
        final GridLayout gl = (GridLayout) group.getLayout();
        gl.numColumns = 2;
        gl.marginWidth = 5;
        gl.marginHeight = 5;
        gl.makeColumnsEqualWidth = true;
    }
项目:AutoDeriv    文件:MainPreferencePage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors() {
    Composite parent = getFieldEditorParent();

    addField(new LabelFieldEditor  ("General", parent, true));
    addField(new BooleanFieldEditor(PrefCst.P_STARTUP_CHECK,        "Check resources derived state at startup", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_MARKER,        "Add markers in .derived file (per-rule info or warn)", parent));

    addField(new LabelFieldEditor  ("Trace", parent, true));
    addField(new BooleanFieldEditor(PrefCst.P_OUTPUT_LOG,           "Output in the .log file (in workspace/.metadata/)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_OUTPUT_STD,           "Output in the standard output streams (console)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_TRACE_WARN,           "Trace warnings (recommended)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_TRACE_INFO,           "Trace info", parent));
    addField(new BooleanFieldEditor(PrefCst.P_TRACE_DEBUG,          "Trace debug", parent));

    addField(new LabelFieldEditor  ("Decoration - Label", parent, true));
    addField(new LabelFieldEditor  ("NOTE: decorations may be disabled at workspace level,", parent));
    addField(new LabelFieldEditor  ("See General > Appearance > Label Decorations", parent));
    addField(new BooleanFieldEditor(PrefCst.P_DECO_LABEL_TEXT,      "Affect the label of derived resources", parent));
    addField(new StringFieldEditor (PrefCst.P_DECO_PREFIX,          "Label prefix", parent));
    addField(new StringFieldEditor (PrefCst.P_DECO_SUFFIX,          "Label suffix", parent));
    addField(new BooleanFieldEditor(PrefCst.P_DECO_LABEL_FCOLOR,    "Override foreground color", parent));
    addField(new ColorFieldEditor  (PrefCst.P_DECO_FOREGROUND,      "Label foreground", parent));
    addField(new BooleanFieldEditor(PrefCst.P_DECO_LABEL_BCOLOR,    "Override background color", parent));
    addField(new ColorFieldEditor  (PrefCst.P_DECO_BACKGROUND,      "Label background", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_DECO_FONT,     "Override font", parent));
    addField(new FontFieldEditor   (PrefCst.P_DECO_LABEL_FONT,      "Derived resources font", parent));

    addField(new LabelFieldEditor("Decoration - Icon", parent, true));
    addField(new ColorFieldEditor  (PrefCst.P_ICON_COLOR,           "Icon color (hue only)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_CONF_ICON,     "Replace icon of .derived conf file", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_DECO_ICON,     "Show an icon on derived resources", parent));
    String[][] comboLocation = {
        {"top left",    "TOP_LEFT"},    {"top right",   "TOP_RIGHT"},
        {"bottom left", "BOTTOM_LEFT"}, {"bottom right","BOTTOM_RIGHT"},
    };
    addField(new RadioGroupFieldEditor( PrefCst.P_DECO_ICON_LOC, "Decoration icon location", 2,comboLocation, parent, true));
}
项目:cuina    文件:ScriptPreferencePage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors()
{
    addField(new FontFieldEditor(
            ScriptPreferences.CMDLINE_FONT, "Schrift:", getFieldEditorParent()) );
    addField(new IntegerFieldEditor(
            ScriptPreferences.CMDLINE_INDENT_WIDTH, "Einrückungstiefe", getFieldEditorParent()) );
    addField(new ColorListEditor(new String[][]
    {
            {ScriptPreferences.CMDLINE_BACKGROUND_COLOR,    "Hintergrund Farbe"},
            {ScriptPreferences.CMDLINE_COLOR_DEFAULT,       "Default Farbe"},
            {ScriptPreferences.CMDLINE_COLOR_COMMENT,       "Kommentare"},
            {ScriptPreferences.CMDLINE_COLOR_CONTROL,       "Kontrollstrukturen"},
            {ScriptPreferences.CMDLINE_COLOR_ASSIGNMENT,    "Zuweisungen"},
            {ScriptPreferences.CMDLINE_COLOR_FUNCTION,      "Funktionen"},
    }, "Farb-Schema:", getFieldEditorParent()) );

    addField(new ComboFieldEditor(ScriptPreferences.CMDLINE_DEFAULT_NODE, "Standard Dialog", new String[][]
    {
        {ScriptUtil.getTitleForNode(CallNode.class),    "CallNode"},
        {ScriptUtil.getTitleForNode(AsgNode.class),     "AsgNode"},
        {ScriptUtil.getTitleForNode(IfNode.class),      "IfNode"},
        {ScriptUtil.getTitleForNode(WhileNode.class),   "WhileNode"},
        {ScriptUtil.getTitleForNode(CaseNode.class),    "CaseNode"},
    }, getFieldEditorParent()));
}
项目:raptor-chess-interface    文件:ChessBoardFontsPage.java   
@Override
protected void createFieldEditors() {
    addField(new FontFieldEditor(PreferenceKeys.BOARD_CLOCK_FONT,
            local.getString("chessBFontsP1"), getFieldEditorParent()));

    FontFieldEditor coordinatesFont = new FontFieldEditor(
            PreferenceKeys.BOARD_COORDINATES_FONT, local.getString("chessBFontsP2"),
            getFieldEditorParent());
    addField(coordinatesFont);

    FontFieldEditor gameDescriptionFont = new FontFieldEditor(
            PreferenceKeys.BOARD_GAME_DESCRIPTION_FONT,
            local.getString("chessBFontsP3"), getFieldEditorParent());
    addField(gameDescriptionFont);

    FontFieldEditor lagFont = new FontFieldEditor(
            PreferenceKeys.BOARD_LAG_FONT, local.getString("chessBFontsP4"),
            getFieldEditorParent());
    addField(lagFont);

    FontFieldEditor lastMoveFont = new FontFieldEditor(
            PreferenceKeys.BOARD_STATUS_FONT, local.getString("chessBFontsP5"),
            getFieldEditorParent());
    addField(lastMoveFont);

    FontFieldEditor openingDescriptionFont = new FontFieldEditor(
            PreferenceKeys.BOARD_OPENING_DESC_FONT, local.getString("chessBFontsP6"),
            getFieldEditorParent());
    addField(openingDescriptionFont);

    FontFieldEditor pieceJailFont = new FontFieldEditor(
            PreferenceKeys.BOARD_PIECE_JAIL_FONT,
            local.getString("chessBFontsP7"), getFieldEditorParent());
    addField(pieceJailFont);

    FontFieldEditor playerNameFont = new FontFieldEditor(
            PreferenceKeys.BOARD_PLAYER_NAME_FONT,
            local.getString("chessBFontsP8"), getFieldEditorParent());
    addField(playerNameFont);

    FontFieldEditor premovesFont = new FontFieldEditor(
            PreferenceKeys.BOARD_OPENING_DESC_FONT, local.getString("chessBFontsP9"),
            getFieldEditorParent());
    addField(premovesFont);
}
项目:raptor-chess-interface    文件:ChatConsolePage.java   
@Override
protected void createFieldEditors() {
    ComboFieldEditor consoleChars = new ComboFieldEditor(
            PreferenceKeys.CHAT_MAX_CONSOLE_CHARS,
            local.getString("chatConsP1"), CONSOLE_CHARS,
            getFieldEditorParent());
    addField(consoleChars);

    ColorFieldEditor inputTextBackground = new ColorFieldEditor(
            PreferenceKeys.CHAT_INPUT_BACKGROUND_COLOR,
            local.getString("chatConsP2"), getFieldEditorParent());
    addField(inputTextBackground);

    ColorFieldEditor consoleBackground = new ColorFieldEditor(
            PreferenceKeys.CHAT_CONSOLE_BACKGROUND_COLOR,
            local.getString("chatConsP3"), getFieldEditorParent());
    addField(consoleBackground);

    FontFieldEditor inputFont = new FontFieldEditor(
            PreferenceKeys.CHAT_INPUT_FONT, local.getString("chatConsP4"),
            getFieldEditorParent());
    addField(inputFont);

    ColorFieldEditor outputTextBackground = new ColorFieldEditor(
            PreferenceKeys.CHAT_OUTPUT_BACKGROUND_COLOR,
            local.getString("chatConsP5"), getFieldEditorParent());
    addField(outputTextBackground);

    ColorFieldEditor promptColor = new ColorFieldEditor(
            PreferenceKeys.CHAT_PROMPT_COLOR,
            local.getString("chatConsP6"), getFieldEditorParent());
    addField(promptColor);

    ColorFieldEditor outputTextForeground = new ColorFieldEditor(
            PreferenceKeys.CHAT_OUTPUT_TEXT_COLOR,
            local.getString("chatConsP7"), getFieldEditorParent());
    addField(outputTextForeground);

    addField(new FontFieldEditor(
            PreferenceKeys.CHAT_OUTPUT_FONT, local.getString("chatConsP8"),
            getFieldEditorParent()));

    ColorFieldEditor linkTextColor = new ColorFieldEditor(
            PreferenceKeys.CHAT_LINK_UNDERLINE_COLOR, local.getString("chatConsP9"),
            getFieldEditorParent());
    addField(linkTextColor);

    ColorFieldEditor quoteUnderlineColor = new ColorFieldEditor(
            PreferenceKeys.CHAT_QUOTE_UNDERLINE_COLOR,
            local.getString("chatConsP10"), getFieldEditorParent());
    addField(quoteUnderlineColor);

    Label warningLabel = new Label(getFieldEditorParent(), SWT.NONE);
    warningLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
            false, 3, 1));
    warningLabel
            .setText(WordUtils
                    .wrap(local.getString("chatConsP11"), 70));
}
项目:mytourbook    文件:PrefPageMap.java   
private Composite createUI(final Composite parent) {

        final IPreferenceStore prefStore = getPreferenceStore();

        final Composite container = new Composite(parent, SWT.NONE);
        GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
        GridLayoutFactory.fillDefaults().applyTo(container);
        {
            final Composite infoContainer = new Composite(container, SWT.NONE);
            GridDataFactory.fillDefaults().grab(true, false).applyTo(infoContainer);
            GridLayoutFactory.fillDefaults().applyTo(infoContainer);
            {

                // checkbox: show tile info
                _chkShowTileInfo = new BooleanFieldEditor(
                        IMappingPreferences.SHOW_MAP_TILE_INFO,
                        Messages.pref_map_show_tile_info,
                        infoContainer);
                _chkShowTileInfo.setPreferenceStore(prefStore);
                _chkShowTileInfo.setPage(this);
                _chkShowTileInfo.load();
            }

            final Composite fontContainer = new Composite(container, SWT.NONE);
            GridDataFactory.fillDefaults().indent(0, 20).grab(true, false).applyTo(fontContainer);
            GridLayoutFactory.fillDefaults().applyTo(fontContainer);
            {
                // font: mono space
                _monoFontEditor = new FontFieldEditor(
                        IMappingPreferences.THEME_FONT_LOGGING,
                        Messages.Theme_Font_Logging,
                        Messages.Theme_Font_Logging_PREVIEW_TEXT,
                        fontContainer);
                _monoFontEditor.setPreferenceStore(prefStore);
                _monoFontEditor.setPage(this);
                _monoFontEditor.load();
            }
            // force 2 columns
            final GridLayout gl = (GridLayout) fontContainer.getLayout();
            gl.numColumns = 2;
            gl.makeColumnsEqualWidth = true;
        }

        return container;
    }
项目:mytourbook    文件:PrefPageMap.java   
private Composite createUI(final Composite parent) {

        final IPreferenceStore prefStore = getPreferenceStore();

        final Composite container = new Composite(parent, SWT.NONE);
        GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
        GridLayoutFactory.fillDefaults().applyTo(container);
        {
            final Composite infoContainer = new Composite(container, SWT.NONE);
            GridDataFactory.fillDefaults().grab(true, false).applyTo(infoContainer);
            GridLayoutFactory.fillDefaults().applyTo(infoContainer);
            {

                // checkbox: show tile info
                _chkShowTileInfo = new BooleanFieldEditor(
                        IMappingPreferences.SHOW_MAP_TILE_INFO,
                        Messages.pref_map_show_tile_info,
                        infoContainer);
                _chkShowTileInfo.setPreferenceStore(prefStore);
                _chkShowTileInfo.setPage(this);
                _chkShowTileInfo.load();
            }

            final Composite fontContainer = new Composite(container, SWT.NONE);
            GridDataFactory.fillDefaults().indent(0, 20).grab(true, false).applyTo(fontContainer);
            GridLayoutFactory.fillDefaults().applyTo(fontContainer);
            {
                // font: mono space
                _monoFontEditor = new FontFieldEditor(
                        IMappingPreferences.THEME_FONT_LOGGING,
                        Messages.Theme_Font_Logging,
                        Messages.Theme_Font_Logging_PREVIEW_TEXT,
                        fontContainer);
                _monoFontEditor.setPreferenceStore(prefStore);
                _monoFontEditor.setPage(this);
                _monoFontEditor.load();
            }
            // force 2 columns
            final GridLayout gl = (GridLayout) fontContainer.getLayout();
            gl.numColumns = 2;
            gl.makeColumnsEqualWidth = true;
        }

        return container;
    }
项目:Rel    文件:PreferencePageCmd.java   
protected void createFieldEditors() {
    addField(new FontFieldEditor(CMD_FONT, "&Font:", "ABCabc0123", getFieldEditorParent()));
    addField(new BooleanFieldEditor(CMD_BROWSER_SWING, "Use an alternative output display to try to fix output problems.", getFieldEditorParent()));
}
项目:NIEM-Modeling-Tool    文件:ClassDiagramPreferencePage.java   
@Override
public void createFieldEditors() {
    addField(new BooleanFieldEditor(P_SYNC_CLASS_DIAGRAMS_WITH_UML,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_synchClassDiagramsWithUML"),
            getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_RESTRICT_NIEM_SUBSET_CONTENT,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_restrictNiemSubsetContent"),
            getFieldEditorParent()));
    // TODO: remove this in Luna
    addField(new BooleanFieldEditor(P_DISPLAY_MESSAGE_FOR_DELETE_ACTION,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_displayMessageForDeleteAction"),
            getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_DISPLAY_MESSAGE_FOR_HIDE_ACTION,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_displayMessageForHideAction"),
            getFieldEditorParent()));
    addField(new ComboFieldEditor(P_INITIAL_PROPERTY_AGGREGATION,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_initialPropertyAggregation"), new String[][] {
        { AggregationKind.NONE_LITERAL.getName(), AggregationKind.NONE_LITERAL.getName() },
        { AggregationKind.SHARED_LITERAL.getName(), AggregationKind.SHARED_LITERAL.getName() },
        { AggregationKind.COMPOSITE_LITERAL.getName(), AggregationKind.COMPOSITE_LITERAL.getName() } },
        getFieldEditorParent()));
    addField(new ColorFieldEditor(P_NIEM_REFERENCE_ELEMENT_ILLEGAL_COLOR,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_niemReferenceElementIllegalColor"),
            getFieldEditorParent()));
    addField(new FontFieldEditor(P_NIEM_REFERENCE_ELEMENT_ILLEGAL_FONT,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_niemReferenceElementIllegalFont"),
            getFieldEditorParent()));
    addField(new ColorFieldEditor(P_NIEM_REFERENCE_ELEMENT_LEGAL_COLOR,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_niemReferenceElementLegalColor"),
            getFieldEditorParent()));
    addField(new FontFieldEditor(P_NIEM_REFERENCE_ELEMENT_LEGAL_FONT,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_niemReferenceElementLegalFont"),
            getFieldEditorParent()));
    addField(new IntegerFieldEditor(P_CLASS_DIAGRAM_COLUMNS,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_classDiagramColumns"), getFieldEditorParent()));
    addField(new IntegerFieldEditor(P_CLASS_DIAGRAM_ELEMENT_WIDTH,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_classDiagramElementWidth"),
            getFieldEditorParent()));
    addField(new IntegerFieldEditor(P_CLASS_DIAGRAM_COLUMN_WIDTH,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_classDiagramColumnWidth"),
            getFieldEditorParent()));
    addField(new IntegerFieldEditor(P_CLASS_DIAGRAM_VERTICAL_PADDING,
            Activator.INSTANCE.getString("_UI_ClassDiagramPreferencePage_classDiagramVerticalPadding"),
            getFieldEditorParent()));
}
项目:elexis-3-core    文件:FontPreference.java   
@Override
protected void createFieldEditors(){
    addField(new FontFieldEditor(Preferences.USR_DEFAULTFONT,
        Messages.FontPreference_standardschriftart, "Elexis", getFieldEditorParent())); //$NON-NLS-1$
}