Author: kono
Date: 2011-04-06 19:33:45 -0700 (Wed, 06 Apr 2011)
New Revision: 24697
Added:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/FontTwoDVisualProperty.java
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/IntegerTwoDVisualProperty.java
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DVisualLexicon.java
core3/gui-distribution/trunk/startlevel-3/pom.xml
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/RichVisualLexicon.java
core3/presentation-api/trunk/src/test/java/org/cytoscape/view/presentation/RichVisualLexiconTest.java
Log:
Moved some visual props from ding to rich.
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DVisualLexicon.java
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DVisualLexicon.java
2011-04-07 02:09:17 UTC (rev 24696)
+++
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DVisualLexicon.java
2011-04-07 02:33:45 UTC (rev 24697)
@@ -35,7 +35,6 @@
package org.cytoscape.ding.impl;
import java.awt.Color;
-import java.awt.Font;
import java.awt.Paint;
import java.util.HashMap;
import java.util.HashSet;
@@ -60,8 +59,6 @@
import org.cytoscape.ding.impl.strokes.ZigzagStroke;
import org.cytoscape.ding.impl.visualproperty.ArrowShapeTwoDVisualProperty;
import org.cytoscape.ding.impl.visualproperty.CustomGraphicsVisualProperty;
-import org.cytoscape.ding.impl.visualproperty.FontTwoDVisualProperty;
-import org.cytoscape.ding.impl.visualproperty.IntegerTwoDVisualProperty;
import org.cytoscape.ding.impl.visualproperty.ObjectPositionVisualProperty;
import org.cytoscape.graph.render.immed.GraphGraphics;
import org.cytoscape.model.CyEdge;
@@ -78,15 +75,11 @@
import org.cytoscape.view.presentation.property.NullVisualProperty;
import org.cytoscape.view.presentation.property.PaintVisualProperty;
import org.cytoscape.view.presentation.property.RichVisualLexicon;
-import org.cytoscape.view.presentation.property.StringVisualProperty;
import org.cytoscape.view.presentation.property.values.LineType;
import org.cytoscape.view.presentation.property.values.NodeShape;
public class DVisualLexicon extends RichVisualLexicon {
- private static final int DEF_FONT_SIZE = 12;
- private static final double DEF_BORDER_WIDTH = 2.0d;
-
// Set of custom graphics positions.
private static final Set<VisualProperty<?>> CG_POSITIONS = new
HashSet<VisualProperty<?>>();
private static final Set<VisualProperty<?>> CG_SIZE = new
HashSet<VisualProperty<?>>();
@@ -105,39 +98,10 @@
Boolean.TRUE, "NETWORK_EDGE_SELECTION", "Network Edge
Selection",
CyNetwork.class);
- public static final VisualProperty<Paint> NODE_SELECTED_PAINT = new
PaintVisualProperty(
- Color.YELLOW, MinimalVisualLexicon.PAINT_RANGE,
- "NODE_SELECTED_PAINT", "Node Selected Paint",
CyNode.class);
- public static final VisualProperty<Paint> NODE_BORDER_PAINT = new
PaintVisualProperty(
- Color.BLACK, MinimalVisualLexicon.PAINT_RANGE,
"NODE_BORDER_PAINT",
- "Node Border Paint", CyNode.class);
-
- public static final VisualProperty<Double> NODE_BORDER_WIDTH = new
DoubleVisualProperty(
- DEF_BORDER_WIDTH,
- MinimalVisualLexicon.NONE_ZERO_POSITIVE_DOUBLE_RANGE,
- "NODE_BORDER_WIDTH", "Node Border Width", CyNode.class);
- // public static final VisualProperty<? extends Stroke>
NODE_BORDER_STROKE =
- // new StrokeTwoDVisualProperty(
- // StrokeTwoDVisualProperty.DEFAULT_STROKE, "NODE_BORDER_STROKE",
- // "Node Border Stroke", CyNode.class);
-
- public static final VisualProperty<String> NODE_TOOLTIP = new
StringVisualProperty(
- "", MinimalVisualLexicon.ARBITRARY_STRING_RANGE,
"NODE_TOOLTIP",
- "Node Tooltip", CyNode.class);
-
- public static final VisualProperty<Font> NODE_LABEL_FONT_FACE = new
FontTwoDVisualProperty(
- new Font("SansSerif", Font.PLAIN, DEF_FONT_SIZE),
- "NODE_LABEL_FONT_FACE", "Node Label Font Face",
CyNode.class);
- public static final VisualProperty<Integer> NODE_LABEL_FONT_SIZE = new
IntegerTwoDVisualProperty(
- DEF_FONT_SIZE, "NODE_LABEL_FONT_SIZE", "Node Label Font
Size",
- CyNode.class);
public static final VisualProperty<ObjectPosition> NODE_LABEL_POSITION
= new ObjectPositionVisualProperty(
ObjectPositionImpl.DEFAULT_POSITION,
"NODE_LABEL_POSITION",
"Node Label Position", CyNode.class);
- public static final VisualProperty<Integer> NODE_TRANSPARENCY = new
IntegerTwoDVisualProperty(
- 200, "NODE_TRANSPARENCY", "Node Transparency",
CyNode.class);
-
// Range object for custom graphics.
private static final CustomGraphicsRange CG_RANGE = new
CustomGraphicsRange();
@@ -264,26 +228,6 @@
"Node Custom Graphics Position 9", CyNode.class);
// Edge VPs
- public static final VisualProperty<Paint> EDGE_SELECTED_PAINT = new
PaintVisualProperty(
- Color.RED, MinimalVisualLexicon.PAINT_RANGE,
"EDGE_SELECTED_PAINT",
- "Edge Selected Paint", CyEdge.class);
- public static final VisualProperty<Paint> EDGE_UNSELECTED_PAINT = new
PaintVisualProperty(
- Color.DARK_GRAY, MinimalVisualLexicon.PAINT_RANGE,
- "EDGE_UNSELECTED_PAINT", "Edge Unselected Paint",
CyEdge.class);
- public static final VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT =
new PaintVisualProperty(
- Color.RED, MinimalVisualLexicon.PAINT_RANGE,
- "EDGE_STROKE_SELECTED_PAINT", "Edge Stroke Selected
Paint",
- CyEdge.class);
- public static final VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
= new PaintVisualProperty(
- Color.DARK_GRAY, MinimalVisualLexicon.PAINT_RANGE,
- "EDGE_STROKE_UNSELECTED_PAINT", "Edge Stroke Unselected
Paint",
- CyEdge.class);
-
- // public static final VisualProperty<? extends Stroke> EDGE_STROKE =
new
- // StrokeTwoDVisualProperty(
- // StrokeTwoDVisualProperty.DEFAULT_STROKE, "EDGE_STROKE", "Edge
Stroke",
- // CyEdge.class);
-
public static final VisualProperty<Paint>
EDGE_SOURCE_ARROW_SELECTED_PAINT = new PaintVisualProperty(
Color.YELLOW, MinimalVisualLexicon.PAINT_RANGE,
"EDGE_SOURCE_ARROW_SELECTED_PAINT",
@@ -308,23 +252,12 @@
ArrowShape.NONE, "EDGE_TARGET_ARROW_SHAPE",
"Edge Target Arrow Shape");
- public static final VisualProperty<String> EDGE_TOOLTIP = new
StringVisualProperty(
- "", MinimalVisualLexicon.ARBITRARY_STRING_RANGE,
"EDGE_TOOLTIP",
- "Edge Tooltip", CyEdge.class);
-
- public static final VisualProperty<Font> EDGE_LABEL_FONT_FACE = new
FontTwoDVisualProperty(
- new Font("SansSerif", Font.PLAIN, 10),
"EDGE_LABEL_FONT_FACE",
- "Edge Label Font Face", CyEdge.class);
- public static final VisualProperty<Integer> EDGE_LABEL_FONT_SIZE = new
IntegerTwoDVisualProperty(
- 10, "EDGE_LABEL_FONT_SIZE", "Edge Label Font Size",
CyEdge.class);
-
public static final VisualProperty<ObjectPosition> EDGE_LABEL_POSITION
= new ObjectPositionVisualProperty(
ObjectPositionImpl.DEFAULT_POSITION,
"EDGE_LABEL_POSITION",
"Edge Label Position", CyEdge.class);
// Ding specific node shapes.
- private static final NodeShape VEE = new DNodeShape(
- GraphGraphics.SHAPE_VEE, "V", "VEE");
+ private static final NodeShape VEE = new
DNodeShape(GraphGraphics.SHAPE_VEE, "V", "VEE");
// Ding-local line types
private static final DLineType ZIGZAG = new DLineType("Zigzag",
"ZIGZAG",
@@ -347,6 +280,21 @@
1.0f));
private static final DLineType SEPARATE_ARROW = new DLineType(
"Separate Arrow", "SEPARATE_ARROW", new
SeparateArrowStroke(1.0f));
+
+ public static final VisualProperty<Paint> EDGE_SELECTED_PAINT = new
PaintVisualProperty(
+ Color.RED, MinimalVisualLexicon.PAINT_RANGE,
"EDGE_SELECTED_PAINT",
+ "Edge Selected Paint", CyEdge.class);
+ public static final VisualProperty<Paint> EDGE_UNSELECTED_PAINT = new
PaintVisualProperty(
+ Color.DARK_GRAY, MinimalVisualLexicon.PAINT_RANGE,
+ "EDGE_UNSELECTED_PAINT", "Edge Unselected Paint",
CyEdge.class);
+ public static final VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT =
new PaintVisualProperty(
+ Color.RED, MinimalVisualLexicon.PAINT_RANGE,
+ "EDGE_STROKE_SELECTED_PAINT", "Edge Stroke Selected
Paint",
+ CyEdge.class);
+ public static final VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
= new PaintVisualProperty(
+ Color.DARK_GRAY, MinimalVisualLexicon.PAINT_RANGE,
+ "EDGE_STROKE_UNSELECTED_PAINT", "Edge Stroke Unselected
Paint",
+ CyEdge.class);
static {
CG_POSITIONS.add(NODE_CUSTOMGRAPHICS_POSITION_1);
@@ -420,21 +368,8 @@
addVisualProperty(NETWORK_NODE_SELECTION, NETWORK);
addVisualProperty(NETWORK_EDGE_SELECTION, NETWORK);
- addVisualProperty(NODE_BORDER_PAINT, NODE_PAINT);
-
- addVisualProperty(NODE_TOOLTIP, NODE);
-
- addVisualProperty(NODE_LABEL_FONT_SIZE, NODE_SIZE);
-
addVisualProperty(NODE_LABEL_POSITION, NODE);
- addVisualProperty(NODE_LABEL_FONT_FACE, NODE);
- // addVisualProperty(NODE_SHAPE, NODE);
- addVisualProperty(NODE_SELECTED_PAINT, NODE_PAINT);
- addVisualProperty(NODE_BORDER_WIDTH, NODE);
- addVisualProperty(NODE_BORDER_LINE_TYPE, NODE);
- addVisualProperty(NODE_TRANSPARENCY, NODE);
-
// Parent of Custom Graphics related
addVisualProperty(NODE_CUSTOMPAINT_1, NODE_PAINT);
addVisualProperty(NODE_CUSTOMPAINT_2, NODE_PAINT);
@@ -477,13 +412,12 @@
addVisualProperty(NODE_CUSTOMGRAPHICS_POSITION_7,
NODE_CUSTOMPAINT_7);
addVisualProperty(NODE_CUSTOMGRAPHICS_POSITION_8,
NODE_CUSTOMPAINT_8);
addVisualProperty(NODE_CUSTOMGRAPHICS_POSITION_9,
NODE_CUSTOMPAINT_9);
-
+
+
addVisualProperty(EDGE_SELECTED_PAINT, EDGE_PAINT);
addVisualProperty(EDGE_UNSELECTED_PAINT, EDGE_PAINT);
addVisualProperty(EDGE_STROKE_SELECTED_PAINT,
EDGE_SELECTED_PAINT);
addVisualProperty(EDGE_STROKE_UNSELECTED_PAINT,
EDGE_UNSELECTED_PAINT);
-
- addVisualProperty(EDGE_LINE_TYPE, EDGE);
addVisualProperty(EDGE_SOURCE_ARROW_SELECTED_PAINT,
EDGE_SELECTED_PAINT);
addVisualProperty(EDGE_TARGET_ARROW_SELECTED_PAINT,
EDGE_SELECTED_PAINT);
addVisualProperty(EDGE_SOURCE_ARROW_UNSELECTED_PAINT,
@@ -492,10 +426,8 @@
EDGE_UNSELECTED_PAINT);
addVisualProperty(EDGE_SOURCE_ARROW_SHAPE, EDGE);
addVisualProperty(EDGE_TARGET_ARROW_SHAPE, EDGE);
- addVisualProperty(EDGE_TOOLTIP, EDGE);
+
addVisualProperty(EDGE_LABEL_POSITION, EDGE);
- addVisualProperty(EDGE_LABEL_FONT_FACE, EDGE);
- addVisualProperty(EDGE_LABEL_FONT_SIZE, EDGE);
createLookupMap();
}
Modified: core3/gui-distribution/trunk/startlevel-3/pom.xml
===================================================================
--- core3/gui-distribution/trunk/startlevel-3/pom.xml 2011-04-07 02:09:17 UTC
(rev 24696)
+++ core3/gui-distribution/trunk/startlevel-3/pom.xml 2011-04-07 02:33:45 UTC
(rev 24697)
@@ -373,7 +373,7 @@
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>editor-impl</artifactId>
- <version>3.0.0-alpha1</version>
+ <version>3.0.0-alpha2-SNAPSHOT</version>
</dependency>
<!-- prefuse layouts -->
Added:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/FontTwoDVisualProperty.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/FontTwoDVisualProperty.java
(rev 0)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/FontTwoDVisualProperty.java
2011-04-07 02:33:45 UTC (rev 24697)
@@ -0,0 +1,101 @@
+/*
+ Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library 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. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. 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 library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+package org.cytoscape.view.presentation.property;
+
+import java.awt.Font;
+import java.awt.GraphicsEnvironment;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.cytoscape.view.model.AbstractVisualProperty;
+import org.cytoscape.view.model.DiscreteRange;
+import org.cytoscape.view.model.Range;
+
+public class FontTwoDVisualProperty extends AbstractVisualProperty<Font> {
+
+ private static final Range<Font> FONT_RANGE;
+ private static final int DEF_FONT_SIZE = 12;
+
+ static {
+ final Set<Font> fontSet = new HashSet<Font>();
+ final Font[] allFonts =
GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
+
+ for(Font f: allFonts)
+ fontSet.add(f.deriveFont(DEF_FONT_SIZE));
+
+ FONT_RANGE = new DiscreteRange<Font>(Font.class,fontSet);
+ }
+
+ public FontTwoDVisualProperty(final Font def, final String id,
+ final String name, final Class<?> targetDataType) {
+ super(def, FONT_RANGE, id, name, targetDataType);
+ }
+
+ public String toSerializableString(final Font value) {
+ // TODO:
+ return value.toString();
+ }
+
+ public Font parseSerializableString(final String text) {
+ Font font = null;
+
+ if (text != null) {
+ // e.g. "Monospaced,plain,12"
+ String name =
text.replaceAll("(\\.[bB]old)?,[a-zA-Z]+,\\d+(\\.\\d+)?", "");
+
+ boolean bold = text.matches("(?i).*\\.bold,[a-zA-Z]+,.*");
+ int style = bold ? Font.BOLD : Font.PLAIN;
+ int size = 12;
+
+ String sSize = text.replaceAll(".+,[^,]+,", "");
+
+ try {
+ size = Integer.parseInt(sSize);
+ } catch (NumberFormatException nfe) {
+ // TODO: log/warning
+ }
+
+ font = new Font(name, style, size);
+ }
+
+ return font;
+ }
+
+ private static Set<Font> getSystemFonts() {
+ //TODO: implement this.
+ final Set<Font> fontSet = new HashSet<Font>();
+ return fontSet;
+ }
+}
Added:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/IntegerTwoDVisualProperty.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/IntegerTwoDVisualProperty.java
(rev 0)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/IntegerTwoDVisualProperty.java
2011-04-07 02:33:45 UTC (rev 24697)
@@ -0,0 +1,58 @@
+
+/*
+ Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library 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. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. 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 library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+package org.cytoscape.view.presentation.property;
+
+import org.cytoscape.view.model.AbstractVisualProperty;
+import org.cytoscape.view.model.ContinuousRange;
+import org.cytoscape.view.model.Range;
+
+public class IntegerTwoDVisualProperty extends AbstractVisualProperty<Integer>
{
+
+ private static final Range<Integer> INT_RANGE = new
ContinuousRange<Integer>(Integer.class, Integer.MIN_VALUE, Integer.MAX_VALUE);
+
+ public IntegerTwoDVisualProperty(final Integer def, final String id,
final String name, final Class<?> targetDataType) {
+ super(def,INT_RANGE, id, name, targetDataType);
+ }
+
+ public String toSerializableString(final Integer value) {
+ return value.toString();
+ }
+
+ public Integer parseSerializableString(final String text) {
+ // Cytoscape 2.x serializes integer attributes as decimals
(e.g."1.0")!
+ return Double.valueOf(text).intValue();
+ }
+}
Modified:
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/RichVisualLexicon.java
===================================================================
---
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/RichVisualLexicon.java
2011-04-07 02:09:17 UTC (rev 24696)
+++
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/RichVisualLexicon.java
2011-04-07 02:33:45 UTC (rev 24697)
@@ -1,5 +1,9 @@
package org.cytoscape.view.presentation.property;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Paint;
+
import org.cytoscape.model.CyEdge;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.model.CyNode;
@@ -13,6 +17,9 @@
*
*/
public class RichVisualLexicon extends MinimalVisualLexicon {
+
+ private static final double DEF_BORDER_WIDTH = 2.0d;
+ private static final int DEF_FONT_SIZE = 12;
// 3D-related props
public static final VisualProperty<Double> NODE_Z_LOCATION = new
DoubleVisualProperty(
@@ -36,7 +43,46 @@
LineTypeVisualProperty.SOLID, "NODE_BORDER_STROKE",
"Node Border Line Type", CyNode.class);
public static final VisualProperty<LineType> EDGE_LINE_TYPE = new
LineTypeVisualProperty(
LineTypeVisualProperty.SOLID, "EDGE_LINE_TYPE", "Edge
Line Type", CyEdge.class);
+
+ // Moved from DING rendering engine.
+ public static final VisualProperty<Paint> NODE_SELECTED_PAINT = new
PaintVisualProperty(
+ Color.YELLOW, MinimalVisualLexicon.PAINT_RANGE,
+ "NODE_SELECTED_PAINT", "Node Selected Paint",
CyNode.class);
+ public static final VisualProperty<Paint> NODE_BORDER_PAINT = new
PaintVisualProperty(
+ Color.BLACK, MinimalVisualLexicon.PAINT_RANGE,
"NODE_BORDER_PAINT",
+ "Node Border Paint", CyNode.class);
+ public static final VisualProperty<Double> NODE_BORDER_WIDTH = new
DoubleVisualProperty(
+ DEF_BORDER_WIDTH,
+ MinimalVisualLexicon.NONE_ZERO_POSITIVE_DOUBLE_RANGE,
+ "NODE_BORDER_WIDTH", "Node Border Width", CyNode.class);
+
+ public static final VisualProperty<String> NODE_TOOLTIP = new
StringVisualProperty(
+ "", MinimalVisualLexicon.ARBITRARY_STRING_RANGE,
"NODE_TOOLTIP",
+ "Node Tooltip", CyNode.class);
+
+ public static final VisualProperty<Font> NODE_LABEL_FONT_FACE = new
FontTwoDVisualProperty(
+ new Font("SansSerif", Font.PLAIN, DEF_FONT_SIZE),
+ "NODE_LABEL_FONT_FACE", "Node Label Font Face",
CyNode.class);
+ public static final VisualProperty<Integer> NODE_LABEL_FONT_SIZE = new
IntegerTwoDVisualProperty(
+ DEF_FONT_SIZE, "NODE_LABEL_FONT_SIZE", "Node Label Font
Size",
+ CyNode.class);
+
+ public static final VisualProperty<Integer> NODE_TRANSPARENCY = new
IntegerTwoDVisualProperty(
+ 200, "NODE_TRANSPARENCY", "Node Transparency",
CyNode.class);
+
+ public static final VisualProperty<String> EDGE_TOOLTIP = new
StringVisualProperty(
+ "", MinimalVisualLexicon.ARBITRARY_STRING_RANGE,
"EDGE_TOOLTIP",
+ "Edge Tooltip", CyEdge.class);
+
+ public static final VisualProperty<Font> EDGE_LABEL_FONT_FACE = new
FontTwoDVisualProperty(
+ new Font("SansSerif", Font.PLAIN, 10),
"EDGE_LABEL_FONT_FACE",
+ "Edge Label Font Face", CyEdge.class);
+ public static final VisualProperty<Integer> EDGE_LABEL_FONT_SIZE = new
IntegerTwoDVisualProperty(
+ 10, "EDGE_LABEL_FONT_SIZE", "Edge Label Font Size",
CyEdge.class);
+
+
+
/**
* Construct a {@linkplain VisalLexicon} for 3D rendering engine.
*
@@ -53,6 +99,23 @@
addVisualProperty(NETWORK_DEPTH, NETWORK_SIZE);
addVisualProperty(NODE_SHAPE, NODE);
+
+ addVisualProperty(NODE_SELECTED_PAINT, NODE_PAINT);
+ addVisualProperty(NODE_BORDER_WIDTH, NODE);
+ addVisualProperty(NODE_BORDER_LINE_TYPE, NODE);
+ addVisualProperty(NODE_TRANSPARENCY, NODE);
+
+ addVisualProperty(NODE_BORDER_PAINT, NODE_PAINT);
+ addVisualProperty(NODE_TOOLTIP, NODE);
+ addVisualProperty(NODE_LABEL_FONT_SIZE, NODE_SIZE);
+
+ addVisualProperty(NODE_LABEL_FONT_FACE, NODE);
+ addVisualProperty(EDGE_LINE_TYPE, EDGE);
+
+ addVisualProperty(EDGE_TOOLTIP, EDGE);
+
+ addVisualProperty(EDGE_LABEL_FONT_FACE, EDGE);
+ addVisualProperty(EDGE_LABEL_FONT_SIZE, EDGE);
}
}
Modified:
core3/presentation-api/trunk/src/test/java/org/cytoscape/view/presentation/RichVisualLexiconTest.java
===================================================================
---
core3/presentation-api/trunk/src/test/java/org/cytoscape/view/presentation/RichVisualLexiconTest.java
2011-04-07 02:09:17 UTC (rev 24696)
+++
core3/presentation-api/trunk/src/test/java/org/cytoscape/view/presentation/RichVisualLexiconTest.java
2011-04-07 02:33:45 UTC (rev 24697)
@@ -19,10 +19,8 @@
@Before
public void setUp() throws Exception {
-
// Create root node.
richRoot = new NullVisualProperty("RICH_ROOT", "Rich Root
Visual Property");
-
richLex = new RichVisualLexicon(richRoot);
}
@@ -33,7 +31,7 @@
@Test
public void test2DLexicon() throws Exception {
- assertEquals(34, richLex.getAllVisualProperties().size());
+ assertEquals(46, richLex.getAllVisualProperties().size());
}
@Test
--
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.