|
From: <be...@us...> - 2006-10-24 16:07:39
|
Revision: 67
http://svn.sourceforge.net/jtreemap/?rev=67&view=rev
Author: benoitx
Date: 2006-10-24 08:59:12 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
A few more Checkstyle fixes.
Modified Paths:
--------------
trunk/JTreeMap/qalab.xml
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNode.java
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/HSBTreeMapColorProvider.java
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/RandomColorProvider.java
trunk/KTreeMap/qalab.xml
Modified: trunk/JTreeMap/qalab.xml
===================================================================
--- trunk/JTreeMap/qalab.xml 2006-10-24 15:37:27 UTC (rev 66)
+++ trunk/JTreeMap/qalab.xml 2006-10-24 15:59:12 UTC (rev 67)
@@ -26,6 +26,7 @@
<summaryresult date="2006-10-23" filecount="27" statvalue="307" type="checkstyle"/>
<summaryresult date="2006-10-23" filecount="14" statvalue="35" type="findbugs"/>
<summaryresult date="2006-10-23" filecount="4" statvalue="280" type="simian"/>
+ <summaryresult date="2006-10-24" filecount="29" statvalue="62" type="checkstyle"/>
</summary>
<file id="org_jense_swing_jtreemap_package.html" path="org/jense/swing/jtreemap/package.html">
<result date="2006-10-17" statvalue="1" type="checkstyle"/>
@@ -233,6 +234,10 @@
<result date="2006-10-23" statvalue="2" type="findbugs"/>
<result date="2006-10-23" statvalue="2" type="findbugs"/>
<result date="2006-10-23" statvalue="2" type="findbugs"/>
+ <result date="2006-10-24" statvalue="2" type="findbugs"/>
+ <result date="2006-10-24" statvalue="2" type="findbugs"/>
+ <result date="2006-10-24" statvalue="2" type="findbugs"/>
+ <result date="2006-10-24" statvalue="1" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_swing_example_RandomColorProvider.java" path="net/sf/jtreemap/swing/example/RandomColorProvider.java">
<result date="2006-10-23" statvalue="10" type="checkstyle"/>
@@ -250,4 +255,18 @@
<result date="2006-10-23" statvalue="7" type="checkstyle"/>
<result date="2006-10-23" statvalue="2" type="findbugs"/>
</file>
+ <file id="net_sf_jtreemap_swing_SplitByNumber.java" path="net/sf/jtreemap/swing/SplitByNumber.java"/>
+ <file id="net_sf_jtreemap_swing_SplitBySlice.java" path="net/sf/jtreemap/swing/SplitBySlice.java"/>
+ <file id="net_sf_jtreemap_swing_SplitBySortedWeight.java" path="net/sf/jtreemap/swing/SplitBySortedWeight.java"/>
+ <file id="net_sf_jtreemap_swing_SplitByWeight.java" path="net/sf/jtreemap/swing/SplitByWeight.java"/>
+ <file id="net_sf_jtreemap_swing_example_DemoUtil.java" path="net/sf/jtreemap/swing/example/DemoUtil.java">
+ <result date="2006-10-24" statvalue="57" type="checkstyle"/>
+ </file>
+ <file
+ id="net_sf_jtreemap_swing_provider_HSBTreeMapColorProvider.java" path="net/sf/jtreemap/swing/provider/HSBTreeMapColorProvider.java">
+ <result date="2006-10-24" statvalue="2" type="checkstyle"/>
+ </file>
+ <file id="net_sf_jtreemap_swing_provider_RedGreenColorProvider.java" path="net/sf/jtreemap/swing/provider/RedGreenColorProvider.java">
+ <result date="2006-10-24" statvalue="2" type="checkstyle"/>
+ </file>
</qalab>
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNode.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNode.java 2006-10-24 15:37:27 UTC (rev 66)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNode.java 2006-10-24 15:59:12 UTC (rev 67)
@@ -17,10 +17,12 @@
*/
public class TreeMapNode extends DefaultMutableTreeNode {
+ private static final int DEFAULT_BORDER_SIZE = 3;
+
private static final long serialVersionUID = 742372833853976103L;
// max border between two nodes of the same level
- private static int border = 3;
+ private static int border = DEFAULT_BORDER_SIZE;
private int height;
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/HSBTreeMapColorProvider.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/HSBTreeMapColorProvider.java 2006-10-24 15:37:27 UTC (rev 66)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/HSBTreeMapColorProvider.java 2006-10-24 15:59:12 UTC (rev 67)
@@ -24,6 +24,8 @@
* @author Andy Adamczak
*/
public class HSBTreeMapColorProvider extends ColorProvider {
+ private static final int HSBVAL_SIZE = 3;
+
/**
*
*/
@@ -159,7 +161,7 @@
// reds in this color space, so use the
// hue/saturation
// constructions for grey scales.
- float[] hsbvals = new float[3];
+ float[] hsbvals = new float[HSBVAL_SIZE];
hsbvals = Color.RGBtoHSB(positiveColor.getRed(), positiveColor.getGreen(), positiveColor.getBlue(), hsbvals);
positiveHue = hsbvals[0];
@@ -236,19 +238,26 @@
* @return the converted value
*/
private double adjustValue(final double value) {
+ double ret = value;
switch (colorDistribution) {
case Log:
- return Math.log1p(value);
+ ret = Math.log1p(value);
+ break;
case Exp:
- return Math.exp(value);
+ ret = Math.exp(value);
+ break;
case SquareRoot:
- return Math.sqrt(value);
+ ret = Math.sqrt(value);
+ break;
case CubicRoot:
- return Math.cbrt(value);
+ ret = Math.cbrt(value);
+ break;
default:
// Linear
- return value;
+ ret = value;
+ break;
}
+ return ret;
}
/**
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/RandomColorProvider.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/RandomColorProvider.java 2006-10-24 15:37:27 UTC (rev 66)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/provider/RandomColorProvider.java 2006-10-24 15:59:12 UTC (rev 67)
@@ -105,6 +105,8 @@
* @author Laurent Dutheil
*/
protected class Legend extends JPanel {
+ private static final int OFFSET = 3;
+
private static final int X_OFFSET = 15;
private static final int INITIAL_X_POS = 20;
@@ -134,7 +136,7 @@
g.setColor(color);
g.fillRect(this.x, Legend.Y, Legend.WIDTH, Legend.HEIGHT);
g.setColor(Color.black);
- x = x + Legend.WIDTH + 3;
+ x = x + Legend.WIDTH + OFFSET;
g.drawString(value.getLabel(), x, yString);
x = x + fm.stringWidth(value.getLabel()) + X_OFFSET;
}
Modified: trunk/KTreeMap/qalab.xml
===================================================================
--- trunk/KTreeMap/qalab.xml 2006-10-24 15:37:27 UTC (rev 66)
+++ trunk/KTreeMap/qalab.xml 2006-10-24 15:59:12 UTC (rev 67)
@@ -25,6 +25,10 @@
<summaryresult date="2006-10-23" filecount="1" statvalue="4" type="pmd"/>
<summaryresult date="2006-10-23" filecount="6" statvalue="7" type="findbugs"/>
<summaryresult date="2006-10-23" filecount="2" statvalue="34" type="simian"/>
+ <summaryresult date="2006-10-24" filecount="22" statvalue="136" type="checkstyle"/>
+ <summaryresult date="2006-10-24" filecount="1" statvalue="4" type="pmd"/>
+ <summaryresult date="2006-10-24" filecount="6" statvalue="7" type="findbugs"/>
+ <summaryresult date="2006-10-24" filecount="2" statvalue="34" type="simian"/>
</summary>
<file id="org_jense_ktreemap_example_package.html" path="org/jense/ktreemap/example/package.html">
<result date="2006-10-18" statvalue="1" type="checkstyle"/>
@@ -88,34 +92,45 @@
</file>
<file id="net_sf_jtreemap_ktreemap_package.html" path="net/sf/jtreemap/ktreemap/package.html">
<result date="2006-10-23" statvalue="1" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="1" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_example_package.html" path="net/sf/jtreemap/ktreemap/example/package.html">
<result date="2006-10-23" statvalue="1" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="1" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_ITreeMapColorProvider.java" path="net/sf/jtreemap/ktreemap/ITreeMapColorProvider.java">
<result date="2006-10-23" statvalue="1" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="1" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_ITreeMapProvider.java" path="net/sf/jtreemap/ktreemap/ITreeMapProvider.java">
<result date="2006-10-23" statvalue="3" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="3" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_KTreeMap.java" path="net/sf/jtreemap/ktreemap/KTreeMap.java">
<result date="2006-10-23" statvalue="12" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="12" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_SplitSquarified.java" path="net/sf/jtreemap/ktreemap/SplitSquarified.java">
<result date="2006-10-23" statvalue="12" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="12" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_SplitStrategy.java" path="net/sf/jtreemap/ktreemap/SplitStrategy.java">
<result date="2006-10-23" statvalue="3" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="3" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_TreeMapNode.java" path="net/sf/jtreemap/ktreemap/TreeMapNode.java">
<result date="2006-10-23" statvalue="4" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="4" type="checkstyle"/>
</file>
<file id="net_sf_jtreemap_ktreemap_example_BuilderTM3.java" path="net/sf/jtreemap/ktreemap/example/BuilderTM3.java">
<result date="2006-10-23" statvalue="1" type="checkstyle"/>
<result date="2006-10-23" statvalue="1" type="findbugs"/>
+ <result date="2006-10-24" statvalue="1" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="1" type="findbugs"/>
</file>
<file id="net_sf_jtreemap_ktreemap_example_BuilderXML.java" path="net/sf/jtreemap/ktreemap/example/BuilderXML.java">
<result date="2006-10-23" statvalue="2" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="2" type="checkstyle"/>
</file>
<file
id="net_sf_jtreemap_ktreemap_example_HSBTreeMapColorProvider.java" path="net/sf/jtreemap/ktreemap/example/HSBTreeMapColorProvider.java">
@@ -124,18 +139,28 @@
<result date="2006-10-23" statvalue="47" type="checkstyle"/>
<result date="2006-10-23" statvalue="1" type="findbugs"/>
<result date="2006-10-23" statvalue="1" type="findbugs"/>
+ <result date="2006-10-24" statvalue="47" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="1" type="findbugs"/>
+ <result date="2006-10-24" statvalue="1" type="findbugs"/>
</file>
<file id="net_sf_jtreemap_ktreemap_example_KTreeMapView.java" path="net/sf/jtreemap/ktreemap/example/KTreeMapView.java">
<result date="2006-10-23" statvalue="15" type="checkstyle"/>
<result date="2006-10-23" statvalue="1" type="findbugs"/>
+ <result date="2006-10-24" statvalue="15" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="1" type="findbugs"/>
</file>
<file id="net_sf_jtreemap_ktreemap_example_ResourceManager.java" path="net/sf/jtreemap/ktreemap/example/ResourceManager.java">
<result date="2006-10-23" statvalue="32" type="checkstyle"/>
<result date="2006-10-23" statvalue="4" type="pmd"/>
<result date="2006-10-23" statvalue="1" type="findbugs"/>
+ <result date="2006-10-24" statvalue="32" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="4" type="pmd"/>
+ <result date="2006-10-24" statvalue="1" type="findbugs"/>
</file>
<file id="net_sf_jtreemap_ktreemap_example_TM3Bean.java" path="net/sf/jtreemap/ktreemap/example/TM3Bean.java">
<result date="2006-10-23" statvalue="2" type="checkstyle"/>
<result date="2006-10-23" statvalue="2" type="findbugs"/>
+ <result date="2006-10-24" statvalue="2" type="checkstyle"/>
+ <result date="2006-10-24" statvalue="2" type="findbugs"/>
</file>
</qalab>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|