Top Description Methods
impl.org.controlsfx.tools.rectangle.change

public Interface Rectangle2DChangeStrategy

Known Direct Implementers
impl.org.controlsfx.tools.rectangle.change.AbstractBeginEndCheckingChangeStrategy
Imports
javafx.geometry.Point2D, .Rectangle2D

A Rectangle2DChangeStrategy creates instances of Rectangle2D based on the coordinates of the begin, continuation and end of an action. The behavior is undefined if these three methods are not called on the following order:
(begin -> continue* -> end )*

Most implementations will be creating new rectangles based on an existing one. If the created ones constantly replace the original, this effectively "changes" the rectangle's appearance (note that Rectangle2D instances themselves are immutable !). This interface and its implementations were created to easily allow a GUI user to change an existing rectangle by typical resize and move operations.

Method Summary

Modifier and TypeMethod and Description
public Rectangle2D

Returns:

the new rectangle
beginChange
(Point2D
a point
point
)

Begins the change at the specified point.

public Rectangle2D

Returns:

the new rectangle
continueChange
(Point2D
a point
point
)

Continues the change to the specified point.

public Rectangle2D

Returns:

the new rectangle
endChange
(Point2D
a point
point
)

Ends the change at the specified point.

Method Detail

beginChangeback to summary
public Rectangle2D beginChange(Point2D point)

Begins the change at the specified point.

Parameters
point:Point2D

a point

Returns:Rectangle2D

the new rectangle

continueChangeback to summary
public Rectangle2D continueChange(Point2D point)

Continues the change to the specified point. Must not be called before a call to beginChange.

Parameters
point:Point2D

a point

Returns:Rectangle2D

the new rectangle

endChangeback to summary
public Rectangle2D endChange(Point2D point)

Ends the change at the specified point. Must not be called before a call to beginChange.

Parameters
point:Point2D

a point

Returns:Rectangle2D

the new rectangle