站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ResizeStrategy (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.action
Interface ResizeStrategy


public interface ResizeStrategy

This interface provides a resizing strategy.


Method Summary
 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.
 

Method Detail

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 widget
originalBounds - the original bounds of the resizing widget
suggestedBounds - 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

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.