提交 295590ae 编写于 作者: K kohsuke

added color palette constant.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1325 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f346dcf4
......@@ -7,6 +7,7 @@ import hudson.model.Result;
import hudson.util.ChartUtil;
import hudson.util.DataSetBuilder;
import hudson.util.ShiftedCategoryAxis;
import hudson.util.ColorPalette;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
......@@ -176,8 +177,8 @@ public abstract class AbstractTestResultAction<T extends AbstractTestResultActio
AreaRenderer ar = (AreaRenderer) plot.getRenderer();
ar.setEndType(AreaRendererEndType.TRUNCATE);
ar.setSeriesPaint(0,new Color(0xEF,0x29,0x29));
ar.setSeriesPaint(1,new Color(0x72,0x9F,0xCF));
ar.setSeriesPaint(0,ColorPalette.RED);
ar.setSeriesPaint(1,ColorPalette.BLUE);
// crop extra space around the graph
plot.setInsets(new RectangleInsets(0,0,0,5.0));
......
package hudson.util;
import java.awt.Color;
/**
* Color constants consistend with the Hudson color palette.
*
* @author Kohsuke Kawaguchi
*/
public class ColorPalette {
public static final Color RED = new Color(0xEF,0x29,0x29);
public static final Color BLUE = new Color(0x72,0x9F,0xCF);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册