Author: kono
Date: 2010-11-19 11:51:49 -0800 (Fri, 19 Nov 2010)
New Revision: 22933
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DNodeView.java
Log:
Changed casts from Double to Number for more flexibility.
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DNodeView.java
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DNodeView.java
2010-11-19 19:26:18 UTC (rev 22932)
+++
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DNodeView.java
2010-11-19 19:51:49 UTC (rev 22933)
@@ -67,7 +67,6 @@
/**
* Ding implementation of node presentation.
*
- * @author $author$
*/
public class DNodeView implements NodeView, Label {
// Affects size of the nested network image relative to the node size:
@@ -1517,21 +1516,21 @@
} else if (vp == DVisualLexicon.NODE_BORDER_PAINT) {
setBorderPaint((Paint) value);
} else if (vp == DVisualLexicon.NODE_BORDER_WIDTH) {
- setBorderWidth(((Double) value).floatValue());
+ setBorderWidth(((Number) value).floatValue());
} else if (vp == DVisualLexicon.NODE_BORDER_STROKE) {
setBorder((Stroke) value);
} else if (vp == DVisualLexicon.NODE_TRANSPARENCY) {
setTransparency(((Integer) value));
} else if (vp == TwoDVisualLexicon.NODE_X_SIZE) {
- setWidth(((Double) value).doubleValue());
+ setWidth(((Number) value).doubleValue());
} else if (vp == TwoDVisualLexicon.NODE_Y_SIZE) {
- setHeight(((Double) value).doubleValue());
+ setHeight(((Number) value).doubleValue());
} else if (vp == TwoDVisualLexicon.NODE_LABEL) {
setText(value.toString());
} else if (vp == TwoDVisualLexicon.NODE_X_LOCATION) {
- setXPosition(((Double) value).doubleValue());
+ setXPosition(((Number) value).doubleValue());
} else if (vp == TwoDVisualLexicon.NODE_Y_LOCATION) {
- setYPosition(((Double) value).doubleValue());
+ setYPosition(((Number) value).doubleValue());
} else if (vp == DVisualLexicon.NODE_TOOLTIP) {
setToolTip((String) value);
} else if (vp == TwoDVisualLexicon.NODE_LABEL_COLOR) {
--
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.