Author: kono
Date: 2010-09-27 16:49:51 -0700 (Mon, 27 Sep 2010)
New Revision: 22080
Added:
core3/ding-presentation-impl/branches/vp-tree/src/test/java/org/cytoscape/view/DVisualLexiconTest.java
Modified:
core3/default-mappingcalculators/branches/vp-tree/src/test/java/org/cytoscape/vizmap/ColorVisualProperty.java
Log:
Refactored version of visual property tree. Tree structure is now managed in
wrapper object VisualLexiconNode.
Modified:
core3/default-mappingcalculators/branches/vp-tree/src/test/java/org/cytoscape/vizmap/ColorVisualProperty.java
===================================================================
---
core3/default-mappingcalculators/branches/vp-tree/src/test/java/org/cytoscape/vizmap/ColorVisualProperty.java
2010-09-27 23:47:56 UTC (rev 22079)
+++
core3/default-mappingcalculators/branches/vp-tree/src/test/java/org/cytoscape/vizmap/ColorVisualProperty.java
2010-09-27 23:49:51 UTC (rev 22080)
@@ -8,7 +8,7 @@
public ColorVisualProperty(final Color defaultValue,
final String id, final String name) {
- super(defaultValue, id, name, null);
+ super(defaultValue, id, name);
}
public Color parseSerializableString(final String text) {
Added:
core3/ding-presentation-impl/branches/vp-tree/src/test/java/org/cytoscape/view/DVisualLexiconTest.java
===================================================================
---
core3/ding-presentation-impl/branches/vp-tree/src/test/java/org/cytoscape/view/DVisualLexiconTest.java
(rev 0)
+++
core3/ding-presentation-impl/branches/vp-tree/src/test/java/org/cytoscape/view/DVisualLexiconTest.java
2010-09-27 23:49:51 UTC (rev 22080)
@@ -0,0 +1,47 @@
+package org.cytoscape.view;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.cytoscape.ding.impl.DVisualLexicon;
+import org.cytoscape.view.model.NullDataType;
+import org.cytoscape.view.model.VisualLexicon;
+import org.cytoscape.view.model.VisualProperty;
+import org.cytoscape.view.model.internal.VisualLexiconNodeFactoryImpl;
+import org.cytoscape.view.presentation.AbstractVisualLexiconTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class DVisualLexiconTest extends AbstractVisualLexiconTest {
+
+ private VisualLexicon dLexicon;
+
+ @Before
+ public void setUp() throws Exception {
+ dLexicon = new DVisualLexicon(new
VisualLexiconNodeFactoryImpl());
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testDVisualLexicon() throws Exception {
+ assertNotNull(dLexicon);
+
+ VisualProperty<NullDataType> root =
dLexicon.getRootVisualProperty();
+ assertNotNull(root);
+ assertEquals(DVisualLexicon.DING_ROOT, root);
+
+ assertEquals(1,
dLexicon.getVisualLexiconNode(root).getChildren().size());
+
+ assertEquals(68, dLexicon.getAllVisualProperties().size());
+ }
+
+ @Test
+ public void testDVisualLexiconTree() throws Exception {
+ this.testTree(dLexicon);
+ }
+
+}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.