Commit ec6e7190 authored by Antoine's avatar Antoine

Adapt to the changes in core ui.layout.

parent ad69736a
/*
* Copyright 2006 - 2011
* Stefan Balev <stefan.balev@graphstream-project.org>
* Julien Baudry <julien.baudry@graphstream-project.org>
* Antoine Dutot <antoine.dutot@graphstream-project.org>
* Yoann Pigné <yoann.pigne@graphstream-project.org>
* Guilhelm Savin <guilhelm.savin@graphstream-project.org>
*
* This file is part of GraphStream <http://graphstream-project.org>.
*
* GraphStream is a library whose purpose is to handle static or dynamic
* graph, create them from scratch, file or any source and display them.
*
* This program is free software distributed under the terms of two licenses, the
* CeCILL-C license that fits European law, and the GNU Lesser General Public
* License. You can use, modify and/ or redistribute the software under the terms
* of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
* URL <http://www.cecill.info> or under the terms of the GNU LGPL as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C and LGPL licenses and that you accept their terms.
*/
package org.graphstream.ui.layout.test;
import org.graphstream.algorithm.generator.GridGenerator;
import org.graphstream.graph.Graph;
import org.graphstream.graph.implementations.MultiGraph;
public class TestLayout {
public static void main(String args[]) {
(new TestLayout()).test();
}
public void test() {
Graph graph = new MultiGraph("test");
graph.addAttribute("layout.force", 0.8);
graph.display();
GridGenerator gen = new GridGenerator();
gen.addSink(graph);
gen.begin();
for(int i=0; i<30; i++) gen.nextEvents();
gen.end();
}
}
\ No newline at end of file
...@@ -35,7 +35,7 @@ import org.graphstream.algorithm.util.RandomTools; ...@@ -35,7 +35,7 @@ import org.graphstream.algorithm.util.RandomTools;
import org.graphstream.graph.*; import org.graphstream.graph.*;
import org.graphstream.stream.GraphReplay; import org.graphstream.stream.GraphReplay;
import org.graphstream.ui.layout.Layout; import org.graphstream.ui.layout.Layout;
import org.graphstream.ui.layout.springbox.SpringBox; import org.graphstream.ui.layout.springbox.implementations.SpringBox;
/** /**
* Lots of small often used algorithms on graphs. * Lots of small often used algorithms on graphs.
......
...@@ -90,7 +90,7 @@ public class Eades84Layout extends PipeBase implements Layout { ...@@ -90,7 +90,7 @@ public class Eades84Layout extends PipeBase implements Layout {
return "Eades1984"; return "Eades1984";
} }
public int getNodeMoved() { public int getNodeMovedCount() {
return nodeMoved; return nodeMoved;
} }
...@@ -124,7 +124,7 @@ public class Eades84Layout extends PipeBase implements Layout { ...@@ -124,7 +124,7 @@ public class Eades84Layout extends PipeBase implements Layout {
return 0; return 0;
} }
public int getQuality() { public double getQuality() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return 0; return 0;
} }
...@@ -152,7 +152,7 @@ public class Eades84Layout extends PipeBase implements Layout { ...@@ -152,7 +152,7 @@ public class Eades84Layout extends PipeBase implements Layout {
} }
public void setQuality(int qualityLevel) { public void setQuality(double qualityLevel) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
......
...@@ -272,7 +272,7 @@ public class HierarchicalLayout extends PipeBase implements Layout { ...@@ -272,7 +272,7 @@ public class HierarchicalLayout extends PipeBase implements Layout {
* *
* @see org.graphstream.ui.layout.Layout#getNodeMoved() * @see org.graphstream.ui.layout.Layout#getNodeMoved()
*/ */
public int getNodeMoved() { public int getNodeMovedCount() {
return nodeMoved; return nodeMoved;
} }
...@@ -281,7 +281,7 @@ public class HierarchicalLayout extends PipeBase implements Layout { ...@@ -281,7 +281,7 @@ public class HierarchicalLayout extends PipeBase implements Layout {
* *
* @see org.graphstream.ui.layout.Layout#getQuality() * @see org.graphstream.ui.layout.Layout#getQuality()
*/ */
public int getQuality() { public double getQuality() {
return 0; return 0;
} }
...@@ -365,7 +365,7 @@ public class HierarchicalLayout extends PipeBase implements Layout { ...@@ -365,7 +365,7 @@ public class HierarchicalLayout extends PipeBase implements Layout {
* *
* @see org.graphstream.ui.layout.Layout#setQuality(int) * @see org.graphstream.ui.layout.Layout#setQuality(int)
*/ */
public void setQuality(int qualityLevel) { public void setQuality(double qualityLevel) {
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment