Package org.jitterbit.application.prefs

Examples of org.jitterbit.application.prefs.PreferenceFactory


    public static SchedulePolicy get() {
        return instance().get();
    }

    private static EnumPreference<SchedulePolicy> createPref() {
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        String[] path = new String[] { OperationPreferencesPage.PATH };
        String key = "SchedulePolicy";
        EnumPreference<SchedulePolicy> pref = factory.newEnumPreference(
                        path, key, SchedulePolicy.getDefault(), SchedulePolicy.class);
        return pref;
    }
View Full Code Here


    public static OperationType get() {
        return instance().get();
    }

    private static FixedSetPreference<OperationType> createPref() {
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        String[] path = new String[] { OperationPreferencesPage.PATH };
        String key = "OperationType";
        return factory.newFixedSetPreference(path, key, OperationType.getSelectableTypes(), OperationType.getDefaultType(), "name");
    }
View Full Code Here

    public static BooleanPreference instance() {
        return pref;
    }

    private static BooleanPreference createPref() {
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        BooleanPreference pref = factory.newBooleanPreference(
                        new String[] { "Project" }, "ReviveDependenciesWarning", Boolean.TRUE);
        return pref;
    }
View Full Code Here

    }

    private static FilePreference createPref() {
        String[] path = new String[] { "General" };
        String key = "ApplicationDirectory";
        PreferenceFactory f = ApplicationConfiguration.getPreferenceFactory();
        return f.newFilePreference(path, key, null);
    }
View Full Code Here

    }
   
    private static IntPreference createPref() {
        String[] path = { "Script", "UI" };
        String key = "TabSize";
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        IntPreference pref = factory.newIntPreference(path, key, 1, 100, 4);
        return pref;
    }
View Full Code Here

    public static EdgeType get() {
        return instance().get();
    }

    private static EnumPreference<EdgeType> createPref() {
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        String[] path = OperationGraphPreferencesPage.PATH();
        String key = "EdgeType";
        EnumPreference<EdgeType> pref = factory.newEnumPreference(path, key, EdgeType.STRAIGHT_LINE, EdgeType.class);
        return pref;
    }
View Full Code Here

    public static EditorLaunchMode get() {
        return INSTANCE.get();
    }
   
    private static EnumPreference<EditorLaunchMode> createPref() {
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        String[] path = OperationGraphPreferencesPage.PATH();
        String key = "EditorLaunchMode";
        EnumPreference<EditorLaunchMode> pref = factory.newEnumPreference(
                        path, key, EditorLaunchMode.defaultMode(), EditorLaunchMode.class);
        return pref;
    }
View Full Code Here

    public static final BooleanPreference INSTANCE = createPref();
   
    private static BooleanPreference createPref() {
        String[] path = new String[] { "General" };
        String key = "SplitPaneAnimation";
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        BooleanPreference pref = factory.newBooleanPreference(path, key, Boolean.TRUE);
        return pref;
    }
View Full Code Here

    }
   
    private static EnumPreference<AutoCompletionMode> createPref() {
        String[] path = { "Edit", "Page" };
        String key = "AutoCompletionMode";
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        EnumPreference<AutoCompletionMode> pref = factory.newEnumPreference(
                        path, key, AutoCompletionMode.AUTOMATIC, AutoCompletionMode.class);
        return pref;
    }
View Full Code Here

    private static PreferenceFactory createPreferenceFactory() {
        String className = props.getString("Preference.Factory", null);
        if (className != null) {
            try {
                Class<?> clazz = Class.forName(className);
                return new PreferenceFactory(clazz);
            } catch (ClassNotFoundException ex) {
                ErrorLog.log(ApplicationConfiguration.class, "Invalid configuration: unknown preference factory class",
                                ex);
            }
        }
        return new PreferenceFactory(PreferenceFactory.class);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.prefs.PreferenceFactory

Copyright © 2018 www.massapicom. 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.