当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
ResizeStrategy (Visual Library API) - NetBeans API Javadoc (Current Development Version)
org.netbeans.api.visual.action
Interface ResizeStrategy
public interface ResizeStrategy
This interface provides a resizing strategy.
boundsSuggested
Rectangle boundsSuggested(Widget widget,
Rectangle originalBounds,
Rectangle suggestedBounds,
ResizeProvider.ControlPoint controlPoint)
- Called after an user suggests a new boundary and before the suggested boundary is stored to a specified widget.
This allows to manipulate with a suggested boundary to perform snap-to-grid, locked-axis on any other resizing strategy.
- Parameters:
widget
- the resized widgetoriginalBounds
- the original bounds of the resizing widgetsuggestedBounds
- the bounds of the resizing widget suggested by an user (usually by a mouse cursor position)controlPoint
- the control point that is used by an user for resizing
- Returns:
- the new (optionally modified) boundary processed by the strategy