Package org.jitterbit.application.ui.prefs

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


    boolean status(final List<String> toks) {
        if (standaloneNodes.size() > 0) {
            out.println("Standalone Nodes:");
            for (String nodeName : standaloneNodes.keySet()) {
                Node node = standaloneNodes.get(nodeName);
                for (String curi : node.getInstalledContributions()) {
                    for (String dc : node.getDeployedComposites(curi)) {
                        out.println("   " + nodeName + " " + dc);
                    }
                }
            }
            out.println();
        }
        if (nodes.size() > 0) {
            for (Node node : nodes.values()) {
                out.println("Domain: " + node.getDomainName());
                List<String> ics;
                if (toks.size() > 1) {
                    ics = new ArrayList<String>();
                    ics.add(toks.get(1));
                } else {
                    ics = node.getInstalledContributions();
                }

                for (String curi : ics) {
                    Contribution c = node.getInstalledContribution(curi);
                    List<String> dcs = node.getDeployedComposites(curi);
                    if (toks.size() > 2) {
                        dcs = new ArrayList<String>();
                        dcs.add(toks.get(2));
                    } else {
                        dcs = node.getDeployedComposites(curi);
                    }
                    for (String compositeUri : dcs) {
                        for (Artifact a : c.getArtifacts()) {
                            if (compositeUri.equals(a.getURI())) {
                                out.println("   " + curi
View Full Code Here


        }
        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

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OSMNode> wayNodes = new ArrayList<OSMNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        if (origNode != null) {
          wayNodes.add(nodeMap.get(origNode));
        }
      }
     
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OwnNode> wayNodes = new ArrayList<OwnNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        wayNodes.add(nodeMap.get(origNode));
      }
     
      OwnWay ownWay = new OwnWay(tagGroupForEntity(way), wayNodes);
     
View Full Code Here

TOP

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

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.