/*******************************************************************************
 * This file is part of OpenNMS(R).
 *
 * Copyright (C) 2012 The OpenNMS Group, Inc.
 * OpenNMS(R) is Copyright (C) 1999-2012 The OpenNMS Group, Inc.
 *
 * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
 *
 * OpenNMS(R) is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License,
 * or (at your option) any later version.
 *
 * OpenNMS(R) is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OpenNMS(R).  If not, see:
 *      http://www.gnu.org/licenses/
 *
 * For more information contact:
 *     OpenNMS(R) Licensing <license@opennms.org>
 *     http://www.opennms.org/
 *     http://www.opennms.com/
 *******************************************************************************/

package org.opennms.features.topology.app.internal;

import org.opennms.features.topology.api.Graph;
import org.opennms.features.topology.api.GraphContainer;
import org.opennms.features.topology.api.Layout;
import org.opennms.features.topology.api.LayoutAlgorithm;
import org.opennms.features.topology.api.topo.Vertex;

public class ManualLayoutAlgorithm implements LayoutAlgorithm {

	public void updateLayout(GraphContainer graphContainer) {
	    Graph g = graphContainer.getGraph();
        
        Layout layout = g.getLayout();
        int i = 0;
        for(Vertex vertex : g.getDisplayVertices()) {
            int x = i * 200;
            int y = i * 200;
            
            layout.setLocation(vertex, x, y);
            i++;
        }
	}

}

@@ -1277,114 +1277,17 @@
 raph
-;%0Aimport org.opennms.features.topology.api.GraphContainer;%0Aimport org.opennms.features.topology.api.Layout
+Container
 ;%0Aim
@@ -1345,62 +1345,8 @@
 thm;
-%0Aimport org.opennms.features.topology.api.topo.Vertex;
 %0A%0Apu
@@ -1458,327 +1458,38 @@
 raph
-Container) %7B%0A%09    Graph g = graphContainer.getGraph();%0A        %0A        Layout layout = g.getLayout();%0A        int i = 0;%0A        for(Vertex vertex : g.getDisplayVertices()) %7B%0A            int x = i * 200;%0A            int y = i * 200;%0A            %0A            layout.setLocation(vertex, x, y);%0A            i++;%0A        %7D
+) %7B%0A%09%09// don't layout anything
 %0A%09%7D%0A

remove custom layout algorithm