Package org.jitterbit.util.preference

Examples of org.jitterbit.util.preference.KongaPreferences


        preferenceKey = key;
    }

    @Override
    public void restore(KongaTable table) {
        KongaPreferences prefs = getPreferences();
        int index = prefs.getInt(INDEX, -1);
        if (index >= 0) {
            SortOrder order = restoreSortOrder(prefs);
            if (order != null) {
                table.setSortingStatus(index, order);
            }
View Full Code Here


        }
    }

    @Override
    public void store(KongaTable table) {
        KongaPreferences prefs = getPreferences();
        RowSorter<? extends TableModel> sorter = table.getRowSorter();
        List<? extends SortKey> keys = sorter.getSortKeys();
        int index = -1;
        SortOrder order = SortOrder.ASCENDING;
        if (!keys.isEmpty()) {
            SortKey key = keys.get(0);
            index = key.getColumn();
            order = key.getSortOrder();
        }
        prefs.putInt    (INDEX, index);
        prefs.putEnum(ORDER, order);
    }
View Full Code Here

            });
            setInitialState();
        }

        private void updatePreference(boolean value) {
            KongaPreferences prefs = getPreferences();
            prefs.putBoolean(INCLUDE_JITTERBIT_VARIABLES_PREF, value);
        }
View Full Code Here

            boolean selected = getPreferenceValue();
            checkBox.setSelected(selected);
        }

        private boolean getPreferenceValue() {
            KongaPreferences prefs = getPreferences();
            return prefs.getBoolean(INCLUDE_JITTERBIT_VARIABLES_PREF, false);
        }
View Full Code Here

        installChangeFontActions(ta);
    }

    private static void setFont(JTextComponent ta) {
        Font font = TextStyles.LargeMonoSpaced.getFont();
        KongaPreferences prefs = KongaPreferences.getPreferences(FONT_SIZE_KEY);
        int userSize = prefs.getInt(FONT_SIZE_KEY.keyName(), -1);
        if (userSize > 0) {
            font = font.deriveFont((float) userSize);
        }
        ta.setFont(font);
    }
View Full Code Here

        private void redoSyntaxHighlighting() {
            textComponent.getPartitioner().refresh();
        }

        private void updateUserPreferences(int newSize) {
            KongaPreferences prefs = KongaPreferences.getPreferences(FONT_SIZE_KEY);
            prefs.putInt(FONT_SIZE_KEY.keyName(), newSize);
        }
View Full Code Here

final class OriginalAppDirLocationPreference {

    private static final String PATH_PREFERENCE_KEY = "Path";

    static File get() {
        KongaPreferences prefs = KongaPreferences.getPreferences(ClientApplicationDirectory.class);
        return prefs.getFile(PATH_PREFERENCE_KEY, null);
    }
View Full Code Here

    }

    private SaveCopyAsAction createSaveCopyAction() {
        SaveCopyAsAction a = new SaveCopyAsAction(file);
        a.setWaitService(getWaitService());
        KongaPreferences prefs = KongaPreferences.getPreferences(getClass());
        a.setDirectoryPreference(prefs);
        return a;
    }
View Full Code Here

    private static final String NAME = "RanAt";

    @Override
    public void completed(Class<? extends UpgradeScript> scriptClass) {
        KongaPreferences prefs = KongaPreferences.getPreferences(scriptClass);
        if (prefs != null) {
            prefs.putLong(NAME, System.currentTimeMillis());
        }
    }
View Full Code Here

        }
    }

    @Override
    public boolean hasRun(Class<? extends UpgradeScript> scriptClass) {
        KongaPreferences prefs = KongaPreferences.getPreferences(scriptClass);
        return (prefs != null) && (prefs.getLong(NAME, 0L) > 0L);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.util.preference.KongaPreferences

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.