Author: paperwing
Date: 2011-08-02 07:27:44 -0700 (Tue, 02 Aug 2011)
New Revision: 26352
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/.settings/org.eclipse.jdt.core.prefs
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/Graphics.java
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/resources/controls.txt
Log:
commit before attempting to implement edge width visual property
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/.settings/org.eclipse.jdt.core.prefs
2011-08-02 00:17:01 UTC (rev 26351)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/.settings/org.eclipse.jdt.core.prefs
2011-08-02 14:27:44 UTC (rev 26352)
@@ -1,3 +1,13 @@
-#Fri Jul 29 12:17:05 EDT 2011
+#Mon Aug 01 10:15:28 EDT 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/Graphics.java
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/Graphics.java
2011-08-02 00:17:01 UTC (rev 26351)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/Graphics.java
2011-08-02 14:27:44 UTC (rev 26352)
@@ -1,4 +1,5 @@
package org.cytoscape.paperwing.internal;
+import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Graphics2D;
@@ -285,9 +286,9 @@
// Draw nodes and edges
// --------------------
- gl.glColor3f(0.73f, 0.73f, 0.73f);
+ // gl.glColor3f(0.73f, 0.73f, 0.73f);
drawNodes(gl);
- gl.glColor3f(0.51f, 0.51f, 0.53f);
+ // gl.glColor3f(0.51f, 0.51f, 0.53f);
drawEdges(gl, DrawStateModifier.NORMAL);
framesElapsed++;
@@ -991,9 +992,21 @@
}
private void drawNodes(GL2 gl) {
+// VisualProperty<Paint> NODE_PAINT
+// VisualProperty<Paint> NODE_FILL_COLOR
+//
+// VisualProperty<Double> NODE_SIZE
+//
+// VisualProperty<Boolean> NODE_VISIBLE
+// VisualProperty<Boolean> NODE_SELECTED
+//
+// VisualProperty<NodeShape> NODE_SHAPE
+//
+// VisualProperty<Paint> NODE_SELECTED_PAINT
+
float x, y, z;
int index;
-
+ networkView.updateView();
for (View<CyNode> nodeView : networkView.getNodeViews()) {
x =
nodeView.getVisualProperty(RichVisualLexicon.NODE_X_LOCATION).floatValue() /
DISTANCE_SCALE;
y =
nodeView.getVisualProperty(RichVisualLexicon.NODE_Y_LOCATION).floatValue() /
DISTANCE_SCALE;
@@ -1006,18 +1019,28 @@
gl.glPushMatrix();
gl.glTranslatef(x, y, z);
+
gl.glScalef(nodeView.getVisualProperty(MinimalVisualLexicon.NODE_WIDTH).floatValue()
/ DISTANCE_SCALE,
+
nodeView.getVisualProperty(MinimalVisualLexicon.NODE_HEIGHT).floatValue() /
DISTANCE_SCALE,
+
nodeView.getVisualProperty(RichVisualLexicon.NODE_DEPTH).floatValue() /
DISTANCE_SCALE);
+
if (selectedNodeIndices.contains(index)) {
gl.glColor3f(0.52f, 0.70f, 0.52f);
gl.glScalef(1.1f, 1.1f, 1.1f);
- gl.glCallList(nodeListIndex);
} else if (index == hoverNodeIndex) {
gl.glColor3f(0.52f, 0.52f, 0.70f);
- gl.glCallList(nodeListIndex);
} else {
- gl.glColor3f(0.73f, 0.73f, 0.73f);
- gl.glCallList(nodeListIndex);
+ Color color = (Color)
nodeView.getVisualProperty(MinimalVisualLexicon.NODE_FILL_COLOR);
+
+ gl.glColor3f(color.getRed() / 255.0f,
color.getGreen() / 255.0f, color.getBlue() / 255.0f);
+
+ // System.out.println("Color: " +
color.getRed() / 255.0f + ", " + color.getGreen() / 255.0f + ", " +
color.getBlue() / 255.0f);
+
+ // gl.glColor3f(0.73f, 0.73f, 0.73f);
+
}
+ gl.glCallList(nodeListIndex);
+
gl.glPopMatrix();
}
}
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/resources/controls.txt
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/resources/controls.txt
2011-08-02 00:17:01 UTC (rev 26351)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/resources/controls.txt
2011-08-02 14:27:44 UTC (rev 26352)
@@ -76,7 +76,67 @@
nodes will move in the same direction as the mouse cursor.
+Supported Visual Properties
+For Nodes:
+VisualProperty<Double> NODE_X_LOCATION
+VisualProperty<Double> NODE_Y_LOCATION
+VisualProperty<Double> NODE_Z_LOCATION
+To be supported
+VisualProperty<Paint> NODE_PAINT
+VisualProperty<Paint> NODE_FILL_COLOR
+
+VisualProperty<Double> NODE_SIZE
+
+VisualProperty<Boolean> NODE_VISIBLE
+VisualProperty<Boolean> NODE_SELECTED
+
+VisualProperty<NodeShape> NODE_SHAPE
+
+VisualProperty<Paint> NODE_SELECTED_PAINT
+
+
+VisualProperty<Paint> NODE_LABEL_COLOR
+VisualProperty<String> NODE_LABEL
+
+(Not sure about these)
+VisualProperty<Double> NODE_WIDTH
+VisualProperty<Double> NODE_HEIGHT
+
+VisualProperty<Paint> NODE_BORDER_PAINT
+VisualProperty<String> NODE_TOOLTIP
+VisualProperty<Double> NODE_BORDER_WIDTH
+
+VisualProperty<Font> NODE_LABEL_FONT_FACE
+VisualProperty<Integer> NODE_LABEL_FONT_SIZE
+
+VisualProperty<Integer> NODE_TRANSPARENCY
+
+
+For edges
+
+VisualProperty<Paint> EDGE_PAINT
+
+VisualProperty<Double> EDGE_WIDTH
+
+VisualProperty<Boolean> EDGE_VISIBLE
+VisualProperty<Boolean> EDGE_SELECTED
+
+VisualProperty<Paint> EDGE_SELECTED_PAINT
+VisualProperty<Paint> EDGE_UNSELECTED_PAINT
+
+VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT
+VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
+
+
+VisualProperty<String> EDGE_LABEL
+
+VisualProperty<Font> EDGE_LABEL_FONT_FACE
+VisualProperty<Integer> EDGE_LABEL_FONT_SIZE
+VisualProperty<Paint> EDGE_LABEL_COLOR
+
+VisualProperty<String> EDGE_TOOLTIP
+
--
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.