Examples of KongaPreferences


Examples of org.jitterbit.util.preference.KongaPreferences

        }
        String handlerName = dlg.getClass().getName();
        if (StringUtils.isNotEmpty(suffix)) {
            handlerName += suffix;
        }
        KongaPreferences prefs = KongaPreferences.getPreferences(dlg.getClass(), suffix);
        Handler handler = new Handler(handlerName, dlg, prefs, ensureNotBiggerThanRootWindow);
        managedDialogs.put(dlg, handler);
    }
View Full Code Here

Examples of org.jitterbit.util.preference.KongaPreferences

        checkNotNull(key, "key");
        sanityCheck();
        if (managedDialogs.containsKey(dlg)) {
            return;
        }
        KongaPreferences prefs = KongaPreferences.getPreferences(key);
        Handler handler = new Handler(key.getName(), dlg, prefs, ensureNotBiggerThanRootWindow);
        managedDialogs.put(dlg, handler);
    }
View Full Code Here

Examples of org.jitterbit.util.preference.KongaPreferences

        this.filterField = createField();
    }

    private StringFilterField createField() {
        StringFilterField filterField = new StringFilterField(rules);
        KongaPreferences prefs = KongaPreferences.getPreferences(getClass());
        filterField.setPreferences(prefs);
        filterField.setCallback(new Receiver<Predicate<String>>() {

            @Override
            public void handle(Predicate<String> object) {
View Full Code Here

Examples of org.jitterbit.util.preference.KongaPreferences

   
    private static final String SIZE = "Size";

    public void store(Editor editor, Point loc, Dimension size) {
        try {
            KongaPreferences node = getNode(editor.getMementoPath(), false);
            if (node != null) {
                node.putPoint(LOCATION, loc);
                node.putDimension(SIZE, size);
            }
        } catch (Exception ex) {
            ErrorLog.log(getClass(), "Failed to store editor size and location in preferences", ex);
        }
    }
View Full Code Here

Examples of org.jitterbit.util.preference.KongaPreferences

        }
    }
   
    public Rectangle getBounds(Editor editor, Rectangle defVal) {
        try {
            KongaPreferences node = getNode(editor.getMementoPath(), true);
            if (node == null) {
                return defVal;
            }
            Point p = node.getPoint(LOCATION, defVal.getLocation());
            Dimension size = node.getDimension(SIZE, defVal.getSize());
            return new Rectangle(p, size);
        } catch (Exception ex) {
            ErrorLog.log(getClass(), "Failed to restore editor size and location from preferences", ex);
            return defVal;
        }
View Full Code Here

Examples of org.jitterbit.util.preference.KongaPreferences

    }
   
    @Override
    public void remove(String[] path) {
        try {
            KongaPreferences node = getNode(path, true);
            if (node != null) {
                node.removeNode();
            }
        } catch (BackingStoreException ex) {
            ex.printStackTrace();
        }
    }
View Full Code Here

Examples of org.jitterbit.util.preference.KongaPreferences

   
    private static KongaPreferences getNode(String[] path, boolean ifExists) {
        if (path.length == 0) {
            return null;
        }
        KongaPreferences root = KongaPreferences.getPreferences(EditorPreferencesMemento.class);
        KongaPreferences prefs = root;
        for (String s : path) {
            if (ifExists && !prefs.hasChild(s)) {
                return null;
            }
            prefs = prefs.child(s);
        }
        return prefs;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.