本文整理汇总了Java中org.jfree.util.PaintList类的典型用法代码示例。如果您正苦于以下问题:Java PaintList类的具体用法?Java PaintList怎么用?Java PaintList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PaintList类属于org.jfree.util包,在下文中一共展示了PaintList类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hashCode
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Computes a hash code for a {@link PaintList}. In the latest version
* of JCommon, the {@link PaintList} class should implement the hashCode()
* method correctly, but we compute it here anyway so that we can work with
* older versions of JCommon (back to 1.0.0).
*
* @param pre the seed value.
* @param list the list (<code>null</code> permitted).
*
* @return The hash code.
*
* @since 1.0.9
*/
public static int hashCode(int pre, PaintList list) {
if (list == null) {
return pre;
}
int result = 127;
int size = list.size();
result = HashUtilities.hashCode(result, size);
// for efficiency, we just use the first, last and middle items to
// compute a hashCode...
if (size > 0) {
result = HashUtilities.hashCode(result, list.getPaint(0));
if (size > 1) {
result = HashUtilities.hashCode(result,
list.getPaint(size - 1));
if (size > 2) {
result = HashUtilities.hashCode(result,
list.getPaint(size / 2));
}
}
}
return 37 * pre + result;
}
示例2: testEquals
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Tests the equals() method.
*/
public void testEquals() {
final PaintList l1 = new PaintList();
l1.setPaint(0, Color.red);
l1.setPaint(1, Color.blue);
l1.setPaint(2, null);
final PaintList l2 = new PaintList();
l2.setPaint(0, Color.red);
l2.setPaint(1, Color.blue);
l2.setPaint(2, null);
assertTrue(l1.equals(l2));
assertTrue(l2.equals(l2));
assertFalse(l1.equals("XYZ"));
}
示例3: addFunction
import org.jfree.util.PaintList; //导入依赖的package包/类
public void addFunction(final XYFunctionInterface theFunction, boolean baseShapeVisible) {
functionList.add(theFunction);
int index = functionList.size()-1;
shapeFillPaintList.add(new PaintList());
Paint seriesColor = (index >= 3)? defaultColors[index]:reservedColors[index];
setFunctionPaint(index, seriesColor);
functionDefaultFillPaintList.setPaint(index, Color.GREEN);
functionHighlightFillPaintList.setPaint(index, Color.BLACK);
for (int i=0; i<theFunction.getNumberOfPoints(); i++)
shapeFillPaintList.get(index).setPaint(i, Color.GREEN);
Shape circle = new Ellipse2D.Float(-3, -3, 6, 6);
setSeriesShape(index, circle);// all series
setSeriesShapesVisible(index, baseShapeVisible);
setSeriesStroke(index, new BasicStroke(1.5f));
setSeriesOutlineStroke(index, new BasicStroke(1.0f));
setFunctionDefaultFillPaint(index, Color.WHITE);
setFunctionHighlightFillPaint(index, Color.BLUE);
}
示例4: PiePlot
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Creates a plot that will draw a pie chart for the specified dataset.
*
* @param dataset the dataset (<code>null</code> permitted).
*/
public PiePlot(PieDataset dataset) {
super();
this.dataset = dataset;
if (dataset != null) {
dataset.addChangeListener(this);
}
this.pieIndex = 0;
this.interiorGap = DEFAULT_INTERIOR_GAP;
this.circular = true;
this.startAngle = DEFAULT_START_ANGLE;
this.direction = Rotation.CLOCKWISE;
this.minimumArcAngleToDraw = DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW;
this.sectionPaint = null;
this.sectionPaintList = new PaintList();
this.baseSectionPaint = null;
this.sectionOutlinePaint = null;
this.sectionOutlinePaintList = new PaintList();
this.baseSectionOutlinePaint = DEFAULT_OUTLINE_PAINT;
this.sectionOutlineStroke = null;
this.sectionOutlineStrokeList = new StrokeList();
this.baseSectionOutlineStroke = DEFAULT_OUTLINE_STROKE;
this.explodePercentages = new ObjectList();
this.labelGenerator = new StandardPieItemLabelGenerator();
this.labelFont = DEFAULT_LABEL_FONT;
this.labelPaint = DEFAULT_LABEL_PAINT;
this.labelBackgroundPaint = DEFAULT_LABEL_BACKGROUND_PAINT;
this.labelOutlinePaint = DEFAULT_LABEL_OUTLINE_PAINT;
this.labelOutlineStroke = DEFAULT_LABEL_OUTLINE_STROKE;
this.labelShadowPaint = DEFAULT_LABEL_SHADOW_PAINT;
this.toolTipGenerator = null;
this.urlGenerator = null;
}
示例5: SpiderWebPlot
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Creates a new spider web plot with the given dataset.
*
* @param dataset the dataset.
* @param extract controls how data is extracted ({@link TableOrder#BY_ROW}
* or {@link TableOrder#BY_COLUMN}).
*/
public SpiderWebPlot(CategoryDataset dataset, TableOrder extract) {
super();
if (extract == null) {
throw new IllegalArgumentException("Null 'extract' argument.");
}
this.dataset = dataset;
if (dataset != null) {
dataset.addChangeListener(this);
}
this.dataExtractOrder = extract;
this.headPercent = DEFAULT_HEAD;
this.axisLabelGap = DEFAULT_AXIS_LABEL_GAP;
this.axisLinePaint = Color.black;
this.axisLineStroke = new BasicStroke(1.0f);
this.interiorGap = DEFAULT_INTERIOR_GAP;
this.startAngle = DEFAULT_START_ANGLE;
this.direction = Rotation.CLOCKWISE;
this.maxValue = DEFAULT_MAX_VALUE;
this.seriesPaint = null;
this.seriesPaintList = new PaintList();
this.baseSeriesPaint = null;
this.seriesOutlinePaint = null;
this.seriesOutlinePaintList = new PaintList();
this.baseSeriesOutlinePaint = DEFAULT_OUTLINE_PAINT;
this.seriesOutlineStroke = null;
this.seriesOutlineStrokeList = new StrokeList();
this.baseSeriesOutlineStroke = DEFAULT_OUTLINE_STROKE;
this.labelFont = DEFAULT_LABEL_FONT;
this.labelPaint = DEFAULT_LABEL_PAINT;
this.labelGenerator = new StandardCategoryItemLabelGenerator();
this.legendItemShape = DEFAULT_LEGEND_ITEM_CIRCLE;
}
示例6: SpiderWebPlot
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Creates a new spider web plot with the given dataset.
*
* @param dataset the dataset.
* @param extract controls how data is extracted ({@link TableOrder#BY_ROW}
* or {@link TableOrder#BY_COLUMN}).
*/
public SpiderWebPlot(CategoryDataset dataset, TableOrder extract) {
super();
ParamChecks.nullNotPermitted(extract, "extract");
this.dataset = dataset;
if (dataset != null) {
dataset.addChangeListener(this);
}
this.dataExtractOrder = extract;
this.headPercent = DEFAULT_HEAD;
this.axisLabelGap = DEFAULT_AXIS_LABEL_GAP;
this.axisLinePaint = Color.black;
this.axisLineStroke = new BasicStroke(1.0f);
this.interiorGap = DEFAULT_INTERIOR_GAP;
this.startAngle = DEFAULT_START_ANGLE;
this.direction = Rotation.CLOCKWISE;
this.maxValue = DEFAULT_MAX_VALUE;
this.seriesPaint = null;
this.seriesPaintList = new PaintList();
this.baseSeriesPaint = null;
this.seriesOutlinePaint = null;
this.seriesOutlinePaintList = new PaintList();
this.baseSeriesOutlinePaint = DEFAULT_OUTLINE_PAINT;
this.seriesOutlineStroke = null;
this.seriesOutlineStrokeList = new StrokeList();
this.baseSeriesOutlineStroke = DEFAULT_OUTLINE_STROKE;
this.labelFont = DEFAULT_LABEL_FONT;
this.labelPaint = DEFAULT_LABEL_PAINT;
this.labelGenerator = new StandardCategoryItemLabelGenerator();
this.legendItemShape = DEFAULT_LEGEND_ITEM_CIRCLE;
}
示例7: testEquals2
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Tests the equals method.
*/
public void testEquals2() {
// check two separate (but equal) colors
final PaintList l1 = new PaintList();
final Color color1 = new Color(200, 200, 200);
l1.setPaint(0, color1);
final PaintList l2 = new PaintList();
final Color color2 = new Color(200, 200, 200);
l2.setPaint(0, color2);
assertEquals(l1, l2);
}
示例8: testEquals3
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Tests the equals() method when the list contains a GradientPaint
* instance.
*/
public void testEquals3() {
// check two separate (but equal) colors
PaintList l1 = new PaintList();
Paint p1 = new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.blue);
l1.setPaint(0, p1);
PaintList l2 = new PaintList();
Paint p2 = new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.blue);
l2.setPaint(0, p2);
assertEquals(l1, l2);
}
示例9: SpiderWebPlot
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Creates a new spider web plot with the given dataset.
*
* @param dataset the dataset.
* @param extract controls how data is extracted ({@link TableOrder#BY_ROW}
* or {@link TableOrder#BY_COLUMN}).
*/
public SpiderWebPlot(CategoryDataset dataset, TableOrder extract) {
super();
if (extract == null) {
throw new IllegalArgumentException("Null 'extract' argument.");
}
this.dataset = dataset;
if (dataset != null) {
dataset.addChangeListener(this);
}
this.dataExtractOrder = extract;
this.headPercent = DEFAULT_HEAD;
this.axisLabelGap = DEFAULT_AXIS_LABEL_GAP;
this.axisLinePaint = Color.black;
this.axisLineStroke = new BasicStroke(1.0f);
this.interiorGap = DEFAULT_INTERIOR_GAP;
this.startAngle = DEFAULT_START_ANGLE;
this.direction = Rotation.CLOCKWISE;
this.maxValue = DEFAULT_MAX_VALUE;
this.seriesPaint = null;
this.seriesPaintList = new PaintList();
this.baseSeriesPaint = null;
this.seriesOutlinePaint = null;
this.seriesOutlinePaintList = new PaintList();
this.baseSeriesOutlinePaint = DEFAULT_OUTLINE_PAINT;
this.seriesOutlineStroke = null;
this.seriesOutlineStrokeList = new StrokeList();
this.baseSeriesOutlineStroke = DEFAULT_OUTLINE_STROKE;
this.labelFont = DEFAULT_LABEL_FONT;
this.labelPaint = DEFAULT_LABEL_PAINT;
this.labelGenerator = new StandardCategoryItemLabelGenerator();
this.legendItemShape = DEFAULT_LEGEND_ITEM_CIRCLE;
}
示例10: testEquals
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Tests the equals() method.
*/
public void testEquals() {
final PaintList l1 = new PaintList();
l1.setPaint(0, Color.red);
l1.setPaint(1, Color.blue);
l1.setPaint(2, null);
final PaintList l2 = new PaintList();
l2.setPaint(0, Color.red);
l2.setPaint(1, Color.blue);
l2.setPaint(2, null);
assertTrue(l1.equals(l2));
assertTrue(l2.equals(l2));
}
示例11: AbstractRenderer
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Default constructor.
*/
public AbstractRenderer() {
this.seriesVisible = null;
this.seriesVisibleList = new BooleanList();
this.baseSeriesVisible = true;
this.paint = null;
this.paintList = new PaintList();
this.basePaint = DEFAULT_PAINT;
this.outlinePaint = null;
this.outlinePaintList = new PaintList();
this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
this.stroke = null;
this.strokeList = new StrokeList();
this.baseStroke = DEFAULT_STROKE;
this.outlineStroke = null;
this.outlineStrokeList = new StrokeList();
this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
this.shape = null;
this.shapeList = new ShapeList();
this.baseShape = DEFAULT_SHAPE;
this.itemLabelsVisible = null;
this.itemLabelsVisibleList = new BooleanList();
this.baseItemLabelsVisible = Boolean.FALSE;
this.itemLabelFont = null;
this.itemLabelFontList = new ObjectList();
this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);
this.itemLabelPaint = null;
this.itemLabelPaintList = new PaintList();
this.baseItemLabelPaint = Color.black;
this.positiveItemLabelPosition = null;
this.positiveItemLabelPositionList = new ObjectList();
this.basePositiveItemLabelPosition = new ItemLabelPosition(
ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER
);
this.negativeItemLabelPosition = null;
this.negativeItemLabelPositionList = new ObjectList();
this.baseNegativeItemLabelPosition = new ItemLabelPosition(
ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER
);
this.listenerList = new EventListenerList();
}
示例12: AbstractRenderer
import org.jfree.util.PaintList; //导入依赖的package包/类
/**
* Default constructor.
*/
public AbstractRenderer() {
this.seriesVisible = null;
this.seriesVisibleList = new BooleanList();
this.baseSeriesVisible = true;
this.seriesVisibleInLegend = null;
this.seriesVisibleInLegendList = new BooleanList();
this.baseSeriesVisibleInLegend = true;
this.paint = null;
this.paintList = new PaintList();
this.basePaint = DEFAULT_PAINT;
this.fillPaint = null;
this.fillPaintList = new PaintList();
this.baseFillPaint = Color.white;
this.outlinePaint = null;
this.outlinePaintList = new PaintList();
this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
this.stroke = null;
this.strokeList = new StrokeList();
this.baseStroke = DEFAULT_STROKE;
this.outlineStroke = null;
this.outlineStrokeList = new StrokeList();
this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
this.shape = null;
this.shapeList = new ShapeList();
this.baseShape = DEFAULT_SHAPE;
this.itemLabelsVisible = null;
this.itemLabelsVisibleList = new BooleanList();
this.baseItemLabelsVisible = Boolean.FALSE;
this.itemLabelFont = null;
this.itemLabelFontList = new ObjectList();
this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);
this.itemLabelPaint = null;
this.itemLabelPaintList = new PaintList();
this.baseItemLabelPaint = Color.black;
this.positiveItemLabelPosition = null;
this.positiveItemLabelPositionList = new ObjectList();
this.basePositiveItemLabelPosition = new ItemLabelPosition(
ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);
this.negativeItemLabelPosition = null;
this.negativeItemLabelPositionList = new ObjectList();
this.baseNegativeItemLabelPosition = new ItemLabelPosition(
ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);
this.createEntities = null;
this.createEntitiesList = new BooleanList();
this.baseCreateEntities = true;
this.listenerList = new EventListenerList();
}