API Reference 0.3.24dart_web_toolkit_uiShowPositionCallback

ShowPositionCallback class

Set the position of the popup right before it is shown.

class ShowPositionCallback implements PopupPanelPositionCallback {

 PopupPanel _panel;
 UiObject _target;

 ShowPositionCallback(_panel, this._target);

   /**
    * Provides the opportunity to set the position of the PopupPanel right
    * before the PopupPanel is shown. The offsetWidth and offsetHeight values
    * of the PopupPanel are made available to allow for positioning based on
    * its size.
   *
    * @param offsetWidth the offsetWidth of the PopupPanel
    * @param offsetHeight the offsetHeight of the PopupPanel
    * @see PopupPanel#setPopupPositionAndShow(PositionCallback)
    */
 void setPosition(int offsetWidth, int offsetHeight) {
   _panel.position(_target, offsetWidth, offsetHeight);
 }
}

Implements

PopupPanelPositionCallback

Constructors

new ShowPositionCallback(_panel, UiObject _target) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
ShowPositionCallback(_panel, this._target);

Methods

void setPosition(int offsetWidth, int offsetHeight) #

Provides the opportunity to set the position of the PopupPanel right before the PopupPanel is shown. The offsetWidth and offsetHeight values of the PopupPanel are made available to allow for positioning based on its size.

@param offsetWidth the offsetWidth of the PopupPanel @param offsetHeight the offsetHeight of the PopupPanel @see PopupPanel#setPopupPositionAndShow(PositionCallback)

void setPosition(int offsetWidth, int offsetHeight) {
 _panel.position(_target, offsetWidth, offsetHeight);
}