Author: scooter
Date: 2012-03-20 22:34:29 -0700 (Tue, 20 Mar 2012)
New Revision: 28600
Modified:
csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/HeatStrip.java
Log:
Don't outline very narrow bars
Modified: csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml
===================================================================
--- csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml 2012-03-20 23:23:42 UTC
(rev 28599)
+++ csplugins/trunk/ucsf/scooter/nodeCharts/pom.xml 2012-03-21 05:34:29 UTC
(rev 28600)
@@ -86,7 +86,7 @@
<dependency>
<groupId>cytoscape</groupId>
<artifactId>application</artifactId>
- <version>2.8.1-beta2-SNAPSHOT</version>
+ <version>2.8.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified:
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/HeatStrip.java
===================================================================
---
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/HeatStrip.java
2012-03-20 23:23:42 UTC (rev 28599)
+++
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/HeatStrip.java
2012-03-21 05:34:29 UTC (rev 28600)
@@ -147,11 +147,19 @@
double h = (0.5 * height) * (val / max);
- // Outline the bars for clarity
- Rectangle2D outline = new Rectangle2D.Double(px1, py1,
w, h);
- cgList.add(new CustomGraphic(outline, new
DefaultPaintFactory(Color.BLACK)));
+ if (w > 1) {
+ // Outline the bars for clarity if the bars are
wide enough
+ Rectangle2D outline = new
Rectangle2D.Double(px1, py1, w, h);
+ cgList.add(new CustomGraphic(outline, new
DefaultPaintFactory(Color.BLACK)));
- barArray[i] = new Rectangle2D.Double(px1+0.2, py1+0.2,
w-0.2, h-0.2);
+ // Adjust the sizes to make room for the outline
+ px1 += 0.2;
+ py1 += 0.2;
+ w -= 0.2;
+ h -= 0.2;
+ }
+
+ barArray[i] = new Rectangle2D.Double(px1, py1, w, h);
// System.out.println ("Got rectangle from: " + px1 +
"," + py1 + " of width " + w + " and height " + h);
maxY = Math.max(maxY, barArray[i].getMaxY());
--
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.