Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–268 unchanged (268 lines)
269 return false;
270 }
271 if (p1.getWindingRule() != p2.getWindingRule()) {
272 return false;
273 }
274 PathIterator iterator1 = p1.getPathIterator(null);
275 PathIterator iterator2 = p1.getPathIterator(null);
276 double[] d1 = new double[6];
277 double[] d2 = new double[6];
278 boolean done = iterator1.isDone() && iterator2.isDone();
279 while (!done) {
280 if (iterator1.isDone() != iterator2.isDone()) {
281 return false;
…lines 282–598 unchanged (317 lines)

After

…lines 1–268 unchanged (268 lines)
269 return false;
270 }
271 if (p1.getWindingRule() != p2.getWindingRule()) {
272 return false;
273 }
274 PathIterator iterator1 = p1.getPathIterator(null);
275 PathIterator iterator2 = p2.getPathIterator(null);
276 double[] d1 = new double[6];
277 double[] d2 = new double[6];
278 boolean done = iterator1.isDone() && iterator2.isDone();
279 while (!done) {
280 if (iterator1.isDone() != iterator2.isDone()) {
281 return false;
…lines 282–598 unchanged (317 lines)

Before

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Graphics2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Polygon"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Shape"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "AffineTransform"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Arc2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Ellipse2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "GeneralPath"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Line2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "PathIterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Point2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Rectangle2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
block_comment "/**\n * Utility methods for {@link Shape} objects.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "ShapeUtilities"
class_body
{ "{"
block_comment "/**\n * Prevents instantiation.\n */"
constructor_declaration
modifiers
private "private"
identifier "ShapeUtilities"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * Returns a clone of the specified shape, or <code>"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Tests two shapes for equality. If both shapes ar"...
method_declaration (+226 nodes collapsed)
block_comment "/**\n * Compares two lines are returns <code>true</code> "...
method_declaration (+129 nodes collapsed)
block_comment "/**\n * Compares two ellipses and returns <code>true</cod"...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Compares two arcs and returns <code>true</code> i"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n * Tests two polygons for equality. If both are <co"...
method_declaration (+143 nodes collapsed)
block_comment "/**\n * Tests two polygons for equality. If both are <co"...
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "equal"
formal_parameters
( "("
formal_parameter
type_identifier "GeneralPath"
identifier "p1"
, ","
formal_parameter
type_identifier "GeneralPath"
identifier "p2"
) ")"
block
{ "{"
if_statement (+22 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "p2"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
if_statement (+28 nodes collapsed)
local_variable_declaration
type_identifier "PathIterator"
variable_declarator
identifier "iterator1"
= "="
method_invocation
identifier "p1"
. "."
identifier "getPathIterator"
argument_list
( "("
null_literal "null"
) ")"
; ";"
local_variable_declaration
type_identifier "PathIterator"
variable_declarator
identifier "iterator2"
= "="
method_invocation
identifier "p1"
. "."
identifier "getPathIterator"
argument_list
( "("
null_literal "null"
) ")"
; ";"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "d1"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "6"
] "]"
; ";"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "d2"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "6"
] "]"
; ";"
local_variable_declaration (+22 nodes collapsed)
while_statement (+148 nodes collapsed)
return_statement
return "return"
true "true"
; ";"
} "}"
block_comment "/**\n * Creates and returns a translated shape.\n *\n "...
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Translates a shape to a new location such that th"...
method_declaration (+146 nodes collapsed)
block_comment "/**\n * Rotates a shape about the specified coordinates.\n"...
method_declaration (+82 nodes collapsed)
block_comment "/**\n * Draws a shape with the specified rotation about <"...
method_declaration (+95 nodes collapsed)
block_comment "/** A useful constant used internally. */"
field_declaration (+26 nodes collapsed)
block_comment "/**\n * Creates a diagonal cross shape.\n *\n * @pa"...
method_declaration (+270 nodes collapsed)
block_comment "/**\n * Creates a diagonal cross shape.\n *\n * @pa"...
method_declaration (+214 nodes collapsed)
block_comment "/**\n * Creates a diamond shape.\n *\n * @param s "...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Creates a triangle shape that points upwards.\n "...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * Creates a triangle shape that points downwards.\n "...
method_declaration (+83 nodes collapsed)
block_comment "/**\n * Creates a region surrounding a line segment by 'w"...
method_declaration (+373 nodes collapsed)
block_comment "/**\n * Returns a point based on (x, y) but constrained t"...
method_declaration (+112 nodes collapsed)
block_comment "/**\n * Checks, whether the given rectangle1 fully contai"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n * Checks, whether the given rectangle1 fully contai"...
method_declaration (+155 nodes collapsed)
} "}"

After

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Graphics2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Polygon"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Shape"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "AffineTransform"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Arc2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Ellipse2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "GeneralPath"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Line2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "PathIterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Point2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "geom"
. "."
identifier "Rectangle2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
block_comment "/**\n * Utility methods for {@link Shape} objects.\n */"
class_declaration
modifiers
public "public"
class "class"
identifier "ShapeUtilities"
class_body
{ "{"
block_comment "/**\n * Prevents instantiation.\n */"
constructor_declaration
modifiers
private "private"
identifier "ShapeUtilities"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * Returns a clone of the specified shape, or <code>"...
method_declaration (+69 nodes collapsed)
block_comment "/**\n * Tests two shapes for equality. If both shapes ar"...
method_declaration (+226 nodes collapsed)
block_comment "/**\n * Compares two lines are returns <code>true</code> "...
method_declaration (+129 nodes collapsed)
block_comment "/**\n * Compares two ellipses and returns <code>true</cod"...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * Compares two arcs and returns <code>true</code> i"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n * Tests two polygons for equality. If both are <co"...
method_declaration (+143 nodes collapsed)
block_comment "/**\n * Tests two polygons for equality. If both are <co"...
method_declaration
modifiers
public "public"
static "static"
boolean_type "boolean"
identifier "equal"
formal_parameters
( "("
formal_parameter
type_identifier "GeneralPath"
identifier "p1"
, ","
formal_parameter
type_identifier "GeneralPath"
identifier "p2"
) ")"
block
{ "{"
if_statement (+22 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "p2"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
if_statement (+28 nodes collapsed)
local_variable_declaration
type_identifier "PathIterator"
variable_declarator
identifier "iterator1"
= "="
method_invocation
identifier "p1"
. "."
identifier "getPathIterator"
argument_list
( "("
null_literal "null"
) ")"
; ";"
local_variable_declaration
type_identifier "PathIterator"
variable_declarator
identifier "iterator2"
= "="
method_invocation
identifier "p2"
. "."
identifier "getPathIterator"
argument_list
( "("
null_literal "null"
) ")"
; ";"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "d1"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "6"
] "]"
; ";"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "d2"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "6"
] "]"
; ";"
local_variable_declaration (+22 nodes collapsed)
while_statement (+148 nodes collapsed)
return_statement
return "return"
true "true"
; ";"
} "}"
block_comment "/**\n * Creates and returns a translated shape.\n *\n "...
method_declaration (+77 nodes collapsed)
block_comment "/**\n * Translates a shape to a new location such that th"...
method_declaration (+146 nodes collapsed)
block_comment "/**\n * Rotates a shape about the specified coordinates.\n"...
method_declaration (+82 nodes collapsed)
block_comment "/**\n * Draws a shape with the specified rotation about <"...
method_declaration (+95 nodes collapsed)
block_comment "/** A useful constant used internally. */"
field_declaration (+26 nodes collapsed)
block_comment "/**\n * Creates a diagonal cross shape.\n *\n * @pa"...
method_declaration (+270 nodes collapsed)
block_comment "/**\n * Creates a diagonal cross shape.\n *\n * @pa"...
method_declaration (+214 nodes collapsed)
block_comment "/**\n * Creates a diamond shape.\n *\n * @param s "...
method_declaration (+93 nodes collapsed)
block_comment "/**\n * Creates a triangle shape that points upwards.\n "...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * Creates a triangle shape that points downwards.\n "...
method_declaration (+83 nodes collapsed)
block_comment "/**\n * Creates a region surrounding a line segment by 'w"...
method_declaration (+373 nodes collapsed)
block_comment "/**\n * Returns a point based on (x, y) but constrained t"...
method_declaration (+112 nodes collapsed)
block_comment "/**\n * Checks, whether the given rectangle1 fully contai"...
method_declaration (+179 nodes collapsed)
block_comment "/**\n * Checks, whether the given rectangle1 fully contai"...
method_declaration (+155 nodes collapsed)
} "}"