Author: kono
Date: 2012-04-16 17:41:55 -0700 (Mon, 16 Apr 2012)
New Revision: 28849
Modified:
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeDetails.java
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeView.java
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/InnerCanvas.java
Log:
fixes #552 Handler added for bypass values.
Modified:
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeDetails.java
===================================================================
---
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeDetails.java
2012-04-17 00:11:34 UTC (rev 28848)
+++
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeDetails.java
2012-04-17 00:41:55 UTC (rev 28849)
@@ -805,10 +805,8 @@
public void setEdgeBendDefault(final Bend bend) {
this.m_edgeBendDefault = bend;
}
+
-
-
-
// Used by bends
private final MinLongHeap m_heap = new MinLongHeap();
private final float[] m_extentsBuff = new float[4];
Modified:
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeView.java
===================================================================
---
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeView.java
2012-04-17 00:11:34 UTC (rev 28848)
+++
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DEdgeView.java
2012-04-17 00:41:55 UTC (rev 28849)
@@ -692,7 +692,12 @@
// Interface org.cytoscape.graph.render.immed.EdgeAnchors:
@Override
public int numAnchors() {
- final Bend bend = m_view.m_edgeDetails.bend(model);
+ final Bend bend;
+ if(isValueLocked(DVisualLexicon.EDGE_BEND))
+ bend = this.getVisualProperty(DVisualLexicon.EDGE_BEND);
+ else
+ bend = m_view.m_edgeDetails.bend(model);
+
final int numHandles = bend.getAllHandles().size();
if (numHandles == 0)
@@ -709,8 +714,12 @@
*/
@Override
public void getAnchor(int anchorIndex, float[] anchorArr, int offset) {
- final Bend bend = m_view.m_edgeDetails.bend(model);
-
+ final Bend bend;
+ if(isValueLocked(DVisualLexicon.EDGE_BEND))
+ bend = this.getVisualProperty(DVisualLexicon.EDGE_BEND);
+ else
+ bend = m_view.m_edgeDetails.bend(model);
+
final Handle handle;
if (m_view.m_edgeDetails.lineType(model) ==
EdgeView.CURVED_LINES)
handle = bend.getAllHandles().get(anchorIndex);
@@ -798,34 +807,7 @@
public <T, V extends T> void setVisualProperty(VisualProperty<? extends
T> vpOriginal, V value) {
final VisualProperty<?> vp = vpOriginal;
-// final VisualLexiconNode treeNode =
lexicon.getVisualLexiconNode(vpOriginal);
-//
-// // TODO: This should not happen. Maybe this should throw an
exception?
-// if(treeNode == null)
-// return;
-//
-// if(treeNode.getChildren().size() != 0) {
-// // This is not leaf.
-// final Collection<VisualLexiconNode> children =
treeNode.getChildren();
-// boolean shouldApply = false;
-// for(VisualLexiconNode node: children) {
-// if(node.isDepend()) {
-// shouldApply = true;
-// break;
-// }
-// }
-//
-// if(shouldApply == false)
-// return;
-// }
-//
-// if(treeNode.isDepend()) {
-// // Do not use this. Parent will be applied.
-// return;
-// } else {
-// vp = vpOriginal;
-// }
-//
+
if(value == null)
value = (V) vp.getDefault();
Modified:
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/InnerCanvas.java
===================================================================
---
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/InnerCanvas.java
2012-04-17 00:11:34 UTC (rev 28848)
+++
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/InnerCanvas.java
2012-04-17 00:41:55 UTC (rev 28849)
@@ -938,7 +938,6 @@
ev.moveHandleInternal(anchorInx,
m_floatBuff1[0] + move, m_floatBuff1[1]);
}
}
-
repaint();
}
}
--
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.