Package org.jitterbit.application.ui.prefs

Examples of org.jitterbit.application.ui.prefs.ApplicationPreferences


        }
        viewer.open(getWindow().getFrame());
    }

    private void createViewer() {
        ApplicationPreferences prefs = ApplicationUi.getPreferences();
        viewer = new PreferencesViewer(prefs);
        if (initialPath != null) {
            viewer.setInitialPath(initialPath);
        }
    }
View Full Code Here


    public static void main(String[] args) {
        new PreferencesViewerTest().run();
    }

    public void run() {
        ApplicationPreferences prefs = createPreferences();
        PreferencesViewer viewer = new PreferencesViewer(prefs);
        viewer.open(null);
    }
View Full Code Here

        PreferencesViewer viewer = new PreferencesViewer(prefs);
        viewer.open(null);
    }
   
    private ApplicationPreferences createPreferences() {
        ApplicationPreferences prefs = new ApplicationPreferences();
        prefs.addPage(new PathOnlyPage("General"));
        prefs.addPage(new PathOnlyPage("Cache"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets"));
        prefs.addPage(new LocationCachePage("Http"));
        prefs.addPage(new LocationCachePage("Database"));
        prefs.addPage(new LocationCachePage("General"));
        prefs.addPage(new PathOnlyPage("Wizards"));
        return prefs;
    }
View Full Code Here

        });
        QuickFrame.show(new JScrollPane(tree), getClass().getSimpleName());
    }
   
    private TreeModel createTreeModel() {
        ApplicationPreferences prefs = new ApplicationPreferences();
        prefs.addPage(new PathOnlyPage("General"));
        prefs.addPage(new PathOnlyPage("Cache"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Http"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Database"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "General"));
        prefs.addPage(new PathOnlyPage("Wizards"));
        ApplicationPreferences.Node root = prefs.getRoot();
        return new PreferencesTreeModel(root);
    }
View Full Code Here

*/
public class ApplicationPreferencesJUnitTest {

    @Test(expected= DuplicateNodeException.class)
    public void testDuplicatePathDetection() {
        ApplicationPreferences prefs = new ApplicationPreferences();
        prefs.addPage(new PathOnlyPage("General"));
        prefs.addPage(new PathOnlyPage("Cache"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Http"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Ftp"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Ftp"));
    }
View Full Code Here

        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Ftp"));
    }
   
    @Test
    public void testNodeTree() {
        ApplicationPreferences prefs = new ApplicationPreferences();
        prefs.addPage(new PathOnlyPage("General"));
        prefs.addPage(new PathOnlyPage("Cache"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Http"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Database"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "General"));
        prefs.addPage(new PathOnlyPage("Wizards"));
        ApplicationPreferences.Node root = prefs.getRoot();
        ApplicationPreferences.Node[] children = root.getChildren();
        assertEquals(children.length, 3);
        assertEquals(children[0].getName(), "General");
        assertEquals(children[0].getChildren().length, 0);
        assertEquals(children[1].getName(), "Cache");
View Full Code Here

        assertEquals(children[2].getChildren().length, 0);
    }
   
    @Test
    public void testNodePaths() {
        ApplicationPreferences prefs = new ApplicationPreferences();
        prefs.addPage(new PathOnlyPage("Cache"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets"));
        prefs.addPage(new PathOnlyPage("Cache", "Sources & Targets", "Http"));
        ApplicationPreferences.Node root = prefs.getRoot();
        ApplicationPreferences.Node cache = root.getChildren()[0];
        assertArrayEquals(cache.getPath(), new String[] { "Cache" });
        ApplicationPreferences.Node sourcesAndTargets = cache.getChildren()[0];
        assertArrayEquals(sourcesAndTargets.getPath(), new String[] { "Cache", "Sources & Targets" });
        ApplicationPreferences.Node http = sourcesAndTargets.getChildren()[0];
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.prefs.ApplicationPreferences

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.