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–448 unchanged (448 lines)
449 Size2D size = this.leftBlock.arrange(g2, c3);
450 w[2] = size.width;
451 }
452 h[3] = h[2];
453 if (this.rightBlock != null) {
454 RectangleConstraint c4 = new RectangleConstraint(0.0,
455 new Range(0.0, constraint.getWidth() - w[2]),
456 LengthConstraintType.RANGE, h[2], null,
457 LengthConstraintType.FIXED);
458 Size2D size = this.rightBlock.arrange(g2, c4);
459 w[3] = size.width;
460 }
461 h[4] = h[2];
…lines 462–535 unchanged (74 lines)

After

…lines 1–448 unchanged (448 lines)
449 Size2D size = this.leftBlock.arrange(g2, c3);
450 w[2] = size.width;
451 }
452 h[3] = h[2];
453 if (this.rightBlock != null) {
454 RectangleConstraint c4 = new RectangleConstraint(0.0,
455 new Range(0.0, Math.max(constraint.getWidth() - w[2], 0.0)),
456 LengthConstraintType.RANGE, h[2], null,
457 LengthConstraintType.FIXED);
458 Size2D size = this.rightBlock.arrange(g2, c4);
459 w[3] = size.width;
460 }
461 h[4] = h[2];
…lines 462–535 unchanged (74 lines)

Before

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "block"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Graphics2D"
; ";"
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 "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "ObjectUtilities"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "RectangleEdge"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "Size2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "Range"
; ";"
block_comment "/**\r\n * An arrangement manager that lays out blocks in a sim"...
class_declaration
modifiers
public "public"
class "class"
identifier "BorderArrangement"
super_interfaces
implements "implements"
type_list
type_identifier "Arrangement"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** For serialization. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "506071142274883745L"
; ";"
block_comment "/** The block (if any) at the center of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "centerBlock"
; ";"
block_comment "/** The block (if any) at the top of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "topBlock"
; ";"
block_comment "/** The block (if any) at the bottom of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "bottomBlock"
; ";"
block_comment "/** The block (if any) at the left of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "leftBlock"
; ";"
block_comment "/** The block (if any) at the right of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "rightBlock"
; ";"
block_comment "/**\r\n * Creates a new instance.\r\n */"
constructor_declaration
modifiers
public "public"
identifier "BorderArrangement"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\r\n * Adds a block to the arrangement manager at the s"...
method_declaration (+153 nodes collapsed)
block_comment "/**\r\n * Arranges the items in the specified container, s"...
method_declaration (+440 nodes collapsed)
block_comment "/**\r\n * Performs an arrangement without constraints.\r\n "...
method_declaration (+811 nodes collapsed)
block_comment "/**\r\n * Performs an arrangement with a fixed width and a"...
method_declaration (+134 nodes collapsed)
block_comment "/**\r\n * Arranges the container width a fixed width and n"...
method_declaration (+658 nodes collapsed)
block_comment "/**\r\n * Performs an arrangement with range constraints o"...
method_declaration (+1010 nodes collapsed)
block_comment "/**\r\n * Arranges the items within a container.\r\n *\r\n"...
method_declaration
modifiers
protected "protected"
type_identifier "Size2D"
identifier "arrangeFF"
formal_parameters
( "("
formal_parameter
type_identifier "BlockContainer"
identifier "container"
, ","
formal_parameter
type_identifier "Graphics2D"
identifier "g2"
, ","
formal_parameter
type_identifier "RectangleConstraint"
identifier "constraint"
) ")"
block
{ "{"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "w"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "5"
] "]"
; ";"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "h"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "5"
] "]"
; ";"
expression_statement
assignment_expression
array_access
identifier "w"
[ "["
decimal_integer_literal "0"
] "]"
= "="
method_invocation
identifier "constraint"
. "."
identifier "getWidth"
argument_list
( "("
) ")"
; ";"
if_statement (+94 nodes collapsed)
expression_statement
assignment_expression
array_access
identifier "w"
[ "["
decimal_integer_literal "1"
] "]"
= "="
array_access
identifier "w"
[ "["
decimal_integer_literal "0"
] "]"
; ";"
if_statement (+101 nodes collapsed)
expression_statement (+30 nodes collapsed)
if_statement (+94 nodes collapsed)
expression_statement
assignment_expression
array_access
identifier "h"
[ "["
decimal_integer_literal "3"
] "]"
= "="
array_access
identifier "h"
[ "["
decimal_integer_literal "2"
] "]"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
this "this"
. "."
identifier "rightBlock"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "RectangleConstraint"
variable_declarator
identifier "c4"
= "="
object_creation_expression
new "new"
type_identifier "RectangleConstraint"
argument_list
( "("
decimal_floating_point_literal "0.0"
, ","
object_creation_expression
new "new"
type_identifier "Range"
argument_list
( "("
decimal_floating_point_literal "0.0"
, ","
binary_expression
method_invocation
identifier "constraint"
. "."
identifier "getWidth"
argument_list
( "("
) ")"
- "-"
array_access
identifier "w"
[ "["
decimal_integer_literal "2"
] "]"
) ")"
, ","
field_access
identifier "LengthConstraintType"
. "."
identifier "RANGE"
, ","
array_access
identifier "h"
[ "["
decimal_integer_literal "2"
] "]"
, ","
null_literal "null"
, ","
field_access
identifier "LengthConstraintType"
. "."
identifier "FIXED"
) ")"
; ";"
local_variable_declaration
type_identifier "Size2D"
variable_declarator
identifier "size"
= "="
method_invocation
field_access
this "this"
. "."
identifier "rightBlock"
. "."
identifier "arrange"
argument_list
( "("
identifier "g2"
, ","
identifier "c4"
) ")"
; ";"
expression_statement
assignment_expression
array_access
identifier "w"
[ "["
decimal_integer_literal "3"
] "]"
= "="
field_access
identifier "size"
. "."
identifier "width"
; ";"
} "}"
expression_statement
assignment_expression
array_access
identifier "h"
[ "["
decimal_integer_literal "4"
] "]"
= "="
array_access
identifier "h"
[ "["
decimal_integer_literal "2"
] "]"
; ";"
expression_statement (+30 nodes collapsed)
local_variable_declaration (+23 nodes collapsed)
if_statement (+30 nodes collapsed)
if_statement (+51 nodes collapsed)
if_statement (+62 nodes collapsed)
if_statement (+55 nodes collapsed)
if_statement (+66 nodes collapsed)
if_statement (+59 nodes collapsed)
return_statement (+24 nodes collapsed)
} "}"
block_comment "/**\r\n * Clears the layout.\r\n */"
method_declaration (+56 nodes collapsed)
block_comment "/**\r\n * Tests this arrangement for equality with an arbi"...
method_declaration (+216 nodes collapsed)
} "}"

After

program
block_comment "/* ========================================================="...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "block"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "awt"
. "."
identifier "Graphics2D"
; ";"
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 "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "ObjectUtilities"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "RectangleEdge"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "chart"
. "."
identifier "util"
. "."
identifier "Size2D"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jfree"
. "."
identifier "data"
. "."
identifier "Range"
; ";"
block_comment "/**\r\n * An arrangement manager that lays out blocks in a sim"...
class_declaration
modifiers
public "public"
class "class"
identifier "BorderArrangement"
super_interfaces
implements "implements"
type_list
type_identifier "Arrangement"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** For serialization. */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "506071142274883745L"
; ";"
block_comment "/** The block (if any) at the center of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "centerBlock"
; ";"
block_comment "/** The block (if any) at the top of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "topBlock"
; ";"
block_comment "/** The block (if any) at the bottom of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "bottomBlock"
; ";"
block_comment "/** The block (if any) at the left of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "leftBlock"
; ";"
block_comment "/** The block (if any) at the right of the layout. */"
field_declaration
modifiers
private "private"
type_identifier "Block"
variable_declarator
identifier "rightBlock"
; ";"
block_comment "/**\r\n * Creates a new instance.\r\n */"
constructor_declaration
modifiers
public "public"
identifier "BorderArrangement"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\r\n * Adds a block to the arrangement manager at the s"...
method_declaration (+153 nodes collapsed)
block_comment "/**\r\n * Arranges the items in the specified container, s"...
method_declaration (+440 nodes collapsed)
block_comment "/**\r\n * Performs an arrangement without constraints.\r\n "...
method_declaration (+811 nodes collapsed)
block_comment "/**\r\n * Performs an arrangement with a fixed width and a"...
method_declaration (+134 nodes collapsed)
block_comment "/**\r\n * Arranges the container width a fixed width and n"...
method_declaration (+658 nodes collapsed)
block_comment "/**\r\n * Performs an arrangement with range constraints o"...
method_declaration (+1010 nodes collapsed)
block_comment "/**\r\n * Arranges the items within a container.\r\n *\r\n"...
method_declaration
modifiers
protected "protected"
type_identifier "Size2D"
identifier "arrangeFF"
formal_parameters
( "("
formal_parameter
type_identifier "BlockContainer"
identifier "container"
, ","
formal_parameter
type_identifier "Graphics2D"
identifier "g2"
, ","
formal_parameter
type_identifier "RectangleConstraint"
identifier "constraint"
) ")"
block
{ "{"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "w"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "5"
] "]"
; ";"
local_variable_declaration
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "h"
= "="
array_creation_expression
new "new"
floating_point_type
double "double"
dimensions_expr
[ "["
decimal_integer_literal "5"
] "]"
; ";"
expression_statement
assignment_expression
array_access
identifier "w"
[ "["
decimal_integer_literal "0"
] "]"
= "="
method_invocation
identifier "constraint"
. "."
identifier "getWidth"
argument_list
( "("
) ")"
; ";"
if_statement (+94 nodes collapsed)
expression_statement
assignment_expression
array_access
identifier "w"
[ "["
decimal_integer_literal "1"
] "]"
= "="
array_access
identifier "w"
[ "["
decimal_integer_literal "0"
] "]"
; ";"
if_statement (+101 nodes collapsed)
expression_statement (+30 nodes collapsed)
if_statement (+94 nodes collapsed)
expression_statement
assignment_expression
array_access
identifier "h"
[ "["
decimal_integer_literal "3"
] "]"
= "="
array_access
identifier "h"
[ "["
decimal_integer_literal "2"
] "]"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
this "this"
. "."
identifier "rightBlock"
!= "!="
null_literal "null"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "RectangleConstraint"
variable_declarator
identifier "c4"
= "="
object_creation_expression
new "new"
type_identifier "RectangleConstraint"
argument_list
( "("
decimal_floating_point_literal "0.0"
, ","
object_creation_expression
new "new"
type_identifier "Range"
argument_list
( "("
decimal_floating_point_literal "0.0"
, ","
method_invocation
identifier "Math"
. "."
identifier "max"
argument_list
( "("
binary_expression
method_invocation
identifier "constraint"
. "."
identifier "getWidth"
argument_list
( "("
) ")"
- "-"
array_access
identifier "w"
[ "["
decimal_integer_literal "2"
] "]"
, ","
decimal_floating_point_literal "0.0"
) ")"
) ")"
, ","
field_access
identifier "LengthConstraintType"
. "."
identifier "RANGE"
, ","
array_access
identifier "h"
[ "["
decimal_integer_literal "2"
] "]"
, ","
null_literal "null"
, ","
field_access
identifier "LengthConstraintType"
. "."
identifier "FIXED"
) ")"
; ";"
local_variable_declaration
type_identifier "Size2D"
variable_declarator
identifier "size"
= "="
method_invocation
field_access
this "this"
. "."
identifier "rightBlock"
. "."
identifier "arrange"
argument_list
( "("
identifier "g2"
, ","
identifier "c4"
) ")"
; ";"
expression_statement
assignment_expression
array_access
identifier "w"
[ "["
decimal_integer_literal "3"
] "]"
= "="
field_access
identifier "size"
. "."
identifier "width"
; ";"
} "}"
expression_statement
assignment_expression
array_access
identifier "h"
[ "["
decimal_integer_literal "4"
] "]"
= "="
array_access
identifier "h"
[ "["
decimal_integer_literal "2"
] "]"
; ";"
expression_statement (+30 nodes collapsed)
local_variable_declaration (+23 nodes collapsed)
if_statement (+30 nodes collapsed)
if_statement (+51 nodes collapsed)
if_statement (+62 nodes collapsed)
if_statement (+55 nodes collapsed)
if_statement (+66 nodes collapsed)
if_statement (+59 nodes collapsed)
return_statement (+24 nodes collapsed)
} "}"
block_comment "/**\r\n * Clears the layout.\r\n */"
method_declaration (+56 nodes collapsed)
block_comment "/**\r\n * Tests this arrangement for equality with an arbi"...
method_declaration (+216 nodes collapsed)
} "}"