API Reference 0.3.24dart_web_toolkit_uiResizeLayoutPanelImpl

ResizeLayoutPanelImpl abstract class

abstract class ResizeLayoutPanelImpl {

 /**
  * Create instance of [ResizeLayoutPanelImpl] depends on broswer.
  */
 factory ResizeLayoutPanelImpl.browserDependent() {
   return new ResizeLayoutPanelImplStandard();
 }

 bool isAttached;
 dart_html.Element parent;
 ResizeDelegate delegate;

 ResizeLayoutPanelImpl();

 /**
  * Initialize the implementation.
  *
  * @param elem the element to listen for resize
  * @param delegate the {@link Delegate} to inform when resize occurs
  */
 void init(dart_html.Element elem, ResizeDelegate delegate) {
   this.parent = elem;
   this.delegate = delegate;
 }

 /**
  * Called on attach.
  */
 void onAttach() {
   isAttached = true;
 }

 /**
  * Called on detach.
  */
 void onDetach() {
   isAttached = false;
 }

 /**
  * Handle a resize event.
  */
 void handleResize() {
   if (isAttached && delegate != null) {
     delegate.onResize();
   }
 }
}

Subclasses

ResizeLayoutPanelImplStandard

Constructors

new ResizeLayoutPanelImpl() #

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
ResizeLayoutPanelImpl();

factory ResizeLayoutPanelImpl.browserDependent() #

Create instance of ResizeLayoutPanelImpl depends on broswer.

factory ResizeLayoutPanelImpl.browserDependent() {
 return new ResizeLayoutPanelImplStandard();
}

Properties

ResizeDelegate delegate #

ResizeDelegate delegate

bool isAttached #

bool isAttached

Element parent #

dart_html.Element parent

Methods

void handleResize() #

Handle a resize event.

void handleResize() {
 if (isAttached && delegate != null) {
   delegate.onResize();
 }
}

void init(Element elem, ResizeDelegate delegate) #

Initialize the implementation.

@param elem the element to listen for resize @param delegate the {@link Delegate} to inform when resize occurs

void init(dart_html.Element elem, ResizeDelegate delegate) {
 this.parent = elem;
 this.delegate = delegate;
}

void onAttach() #

Called on attach.

void onAttach() {
 isAttached = true;
}

void onDetach() #

Called on detach.

void onDetach() {
 isAttached = false;
}