Package org.jitterbit.application.prefs

Examples of org.jitterbit.application.prefs.BooleanPreference


        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 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 BooleanPreference createPref() {
        String[] path = new String[] { WizardPreferencesPage.PATH };
        String key = "ConfirmCancel";
        PreferenceFactory factory = ApplicationConfiguration.getPreferenceFactory();
        BooleanPreference pref = factory.newBooleanPreference(path, key, Boolean.TRUE);
        return pref;
    }
View Full Code Here

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

        }

        private void showDialog() {
            String msg = Strings.format("RunOperation.Success", operation.getName());
            String title = UiResourceBundle.getString("OK");
            BooleanPreference showPref = RunOperationSuccessMessagePreference.INSTANCE;
            if (new DoNotShowAgainMessage(msg, title, showPref).showInDialog(null)) {
                ApplicationMessageEvent.postInformationMessage(getClass(), "");
            }
        }
View Full Code Here

                }
            });
        }

        private void showSuccessMessage() {
            BooleanPreference showPref = UploadUsersAndGroupsSuccessMessagePreference.INSTANCE;
            String msg = Strings.get("User.Save.Success.Message");
            postStatusMessage(msg);
            String title = Strings.get("User.Save.Success.Title");
            DoNotShowAgainMessage alert = new DoNotShowAgainMessage(msg, title, showPref);
            boolean clearStatusBar = false;
View Full Code Here

public final class PreferenceCheckingDeployPromptJUnitTest {

    @Test
    public void ensureAutomaticDeployWorks() {
        ByPassedDeployPrompt adaptee = new ByPassedDeployPrompt();
        BooleanPreference pref = createPreference(true);
        PreferenceCheckingDeployPrompt prompt = new PreferenceCheckingDeployPrompt(adaptee, pref);
        List<Source> dirty = Arrays.asList(new Source("S"));
        assertTrue(prompt.prompt(null, dirty));
        assertEquals(dirty, prompt.getDirtyItemsToDeploy());
        adaptee.ensureNotCalled();
View Full Code Here

        assertEquals(dirty, prompt.getDirtyItemsToDeploy());
        adaptee.ensureNotCalled();
    }

    private BooleanPreference createPreference(boolean value) {
        return new BooleanPreference(getClass(), new String[] { "Test.Deploy" }, "Automatic", value);
    }
View Full Code Here

        return new BooleanPreference(getClass(), new String[] { "Test.Deploy" }, "Automatic", value);
    }

    @Test
    public void ensureNonAutomaticDeployWorks() {
        BooleanPreference pref = createPreference(false);
        Redlight redlight = new Redlight();
        PreferenceCheckingDeployPrompt prompt = new PreferenceCheckingDeployPrompt(redlight, pref);
        List<Source> dirty = Arrays.asList(new Source("S"));
        assertFalse(prompt.prompt(null, dirty));
        redlight.ensureCalled();
View Full Code Here

            makeNodeSelected(nodeToSelect, false);
        }
    }

    public final Disposable listenToPreferences() {
        final BooleanPreference pref = LocationDecorateTreeNodeIconsPreference.INSTANCE;
        final PreferenceListener<Boolean> listener = new PreferenceListener<Boolean>() {

            @Override
            public void valueChanged(Preference<Boolean> pref, Boolean oldValue, Boolean newValue) {
                repaint();
            }
        };
        pref.addListener(listener);
        return new Disposable() {

            @Override
            public void dispose() {
                pref.removeListener(listener);
            }
        };
    }
View Full Code Here

TOP

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

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.