Skip to content

Commit

Permalink
Rename LineUtilities --> LineUtils.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfree committed May 6, 2017
1 parent c7d2cb0 commit 0e91d34
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
Expand Up @@ -2,7 +2,7 @@
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2016, by Object Refinery Limited and Contributors.
* (C) Copyright 2000-2017, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
Expand All @@ -27,7 +27,7 @@
* --------------------------
* XYDataImageAnnotation.java
* --------------------------
* (C) Copyright 2008-2016, by Object Refinery Limited and Contributors.
* (C) Copyright 2008-2017, by Object Refinery Limited and Contributors.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): Peter Kolb (patch 2809117);
Expand Down Expand Up @@ -360,7 +360,7 @@ public Object clone() throws CloneNotSupportedException {
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
// FIXME
//SerialUtilities.writeImage(this.image, stream);
//SerialUtils.writeImage(this.image, stream);
}

/**
Expand All @@ -375,7 +375,7 @@ private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
// FIXME
//this.image = SerialUtilities.readImage(stream);
//this.image = SerialUtils.readImage(stream);
}

}
Expand Up @@ -302,7 +302,7 @@ public Object clone() throws CloneNotSupportedException {
*/
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
//SerialUtilities.writeImage(this.image, stream);
//SerialUtils.writeImage(this.image, stream);
}

/**
Expand All @@ -316,7 +316,7 @@ private void writeObject(ObjectOutputStream stream) throws IOException {
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
//this.image = SerialUtilities.readImage(stream);
//this.image = SerialUtils.readImage(stream);
}


Expand Down
Expand Up @@ -69,7 +69,7 @@
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.ui.RectangleEdge;
import org.jfree.chart.util.LineUtilities;
import org.jfree.chart.util.LineUtils;
import org.jfree.chart.util.ObjectUtils;
import org.jfree.chart.util.PaintUtils;
import org.jfree.chart.util.ParamChecks;
Expand Down Expand Up @@ -198,7 +198,7 @@ else if (orientation == PlotOrientation.HORIZONTAL) {
Line2D line = new Line2D.Float(j2DX1, j2DY1, j2DX2, j2DY2);
// line is clipped to avoid JRE bug 6574155, for more info
// see JFreeChart bug 2221495
boolean visible = LineUtilities.clipLine(line, dataArea);
boolean visible = LineUtils.clipLine(line, dataArea);
if (visible) {
g2.draw(line);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jfree/chart/plot/RingPlot.java
Expand Up @@ -78,7 +78,7 @@
import org.jfree.chart.ui.RectangleInsets;
import org.jfree.chart.ui.TextAnchor;
import org.jfree.chart.urls.PieURLGenerator;
import org.jfree.chart.util.LineUtilities;
import org.jfree.chart.util.LineUtils;
import org.jfree.chart.util.ObjectUtils;
import org.jfree.chart.util.PaintUtils;
import org.jfree.chart.util.ParamChecks;
Expand Down Expand Up @@ -625,7 +625,7 @@ dataset, getPieIndex(), section, key, tip,
}
else if (currentPass == 2) {
if (this.separatorsVisible) {
Line2D extendedSeparator = LineUtilities.extendLine(
Line2D extendedSeparator = LineUtils.extendLine(
separator, this.innerSeparatorExtension,
this.outerSeparatorExtension);
g2.setStroke(this.separatorStroke);
Expand Down
Expand Up @@ -95,7 +95,7 @@
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.ui.RectangleEdge;
import org.jfree.chart.util.BooleanList;
import org.jfree.chart.util.LineUtilities;
import org.jfree.chart.util.LineUtils;
import org.jfree.chart.util.ObjectUtils;
import org.jfree.chart.util.ParamChecks;
import org.jfree.chart.util.PublicCloneable;
Expand Down Expand Up @@ -856,7 +856,7 @@ protected void drawPrimaryLine(XYItemRendererState state,
else if (orientation == PlotOrientation.VERTICAL) {
state.workingLine.setLine(transX0, transY0, transX1, transY1);
}
visible = LineUtilities.clipLine(state.workingLine, dataArea);
visible = LineUtils.clipLine(state.workingLine, dataArea);
if (visible) {
drawFirstPassShape(g2, pass, series, item, state.workingLine);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jfree/chart/renderer/xy/XYStepRenderer.java
Expand Up @@ -91,7 +91,7 @@
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.ui.RectangleEdge;
import org.jfree.chart.urls.XYURLGenerator;
import org.jfree.chart.util.LineUtilities;
import org.jfree.chart.util.LineUtils;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.data.xy.XYDataset;

Expand Down Expand Up @@ -324,7 +324,7 @@ private void drawLine(Graphics2D g2, Line2D line, double x0, double y0,
return;
}
line.setLine(x0, y0, x1, y1);
boolean visible = LineUtilities.clipLine(line, dataArea);
boolean visible = LineUtils.clipLine(line, dataArea);
if (visible) {
g2.draw(line);
}
Expand Down
Expand Up @@ -2,7 +2,7 @@
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2016, by Object Refinery Limited and Contributors.
* (C) Copyright 2000-2017, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
Expand All @@ -27,7 +27,7 @@
* ------------------
* LineUtilities.java
* ------------------
* (C) Copyright 2008, 2014, by Object Refinery Limited and Contributors.
* (C) Copyright 2008-2017, by Object Refinery Limited and Contributors.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): -;
Expand All @@ -49,7 +49,7 @@
*
* @since 1.0.12
*/
public class LineUtilities {
public class LineUtils {

/**
* Clips the specified line to the given rectangle.
Expand Down
28 changes: 14 additions & 14 deletions src/test/java/org/jfree/chart/util/LineUtilitiesTest.java
Expand Up @@ -46,7 +46,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
/**
* Tests for the {@link LineUtilities} class.
* Tests for the {@link LineUtils} class.
*/
public class LineUtilitiesTest {

Expand All @@ -66,56 +66,56 @@ public void testClipLine() {
Rectangle2D rect = new Rectangle2D.Double(1.0, 1.0, 1.0, 1.0);
Line2D line = new Line2D.Double();

assertFalse(LineUtilities.clipLine(line, rect));
assertFalse(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 0.0, 0.0, 0.0, 0.0));

line.setLine(0.5, 0.5, 0.6, 0.6);
assertFalse(LineUtilities.clipLine(line, rect));
assertFalse(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 0.5, 0.5, 0.6, 0.6));

line.setLine(0.5, 0.5, 1.6, 0.6);
assertFalse(LineUtilities.clipLine(line, rect));
assertFalse(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 0.5, 0.5, 1.6, 0.6));

line.setLine(0.5, 0.5, 2.6, 0.6);
assertFalse(LineUtilities.clipLine(line, rect));
assertFalse(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 0.5, 0.5, 2.6, 0.6));

line.setLine(0.5, 0.5, 0.6, 1.6);
assertFalse(LineUtilities.clipLine(line, rect));
assertFalse(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 0.5, 0.5, 0.6, 1.6));

line.setLine(0.5, 0.5, 1.6, 1.6);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 1.0, 1.0, 1.6, 1.6));

line.setLine(0.5, 0.5, 2.6, 1.6);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 1.4545454545454546, 1.0, 2.0,
1.2857142857142858));

line.setLine(0.5, 0.5, 0.5, 2.6);
assertFalse(LineUtilities.clipLine(line, rect));
assertFalse(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 0.5, 0.5, 0.5, 2.6));

line.setLine(0.5, 0.5, 1.5, 2.6);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 1.0, 1.55, 1.2142857142857142, 2.0));

line.setLine(0.5, 0.5, 2.5, 2.6);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 1.0, 1.025, 1.9285714285714284, 2.0));

line.setLine(0.5, 0.5, 1.5, 1.5);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 1.0, 1.0, 1.5, 1.5));

line.setLine(2.5, 1.0, 1.5, 1.5);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 2.0, 1.25, 1.5, 1.5));

line.setLine(1.5, 1.5, 2.5, 1.0);
assertTrue(LineUtilities.clipLine(line, rect));
assertTrue(LineUtils.clipLine(line, rect));
assertTrue(lineEquals(line, 1.5, 1.5, 2.0, 1.25));
}

Expand Down

0 comments on commit 0e91d34

Please sign in to comment.