Example usage for com.google.gwt.event.logical.shared AttachEvent fire

List of usage examples for com.google.gwt.event.logical.shared AttachEvent fire

Introduction

In this page you can find the example usage for com.google.gwt.event.logical.shared AttachEvent fire.

Prototype

public static <S extends HasAttachHandlers> void fire(S source, boolean attached) 

Source Link

Document

Fires an AttachEvent on all registered handlers in the handler source.

Usage

From source file:com.dianaui.universal.core.client.ui.html.Text.java

License:Apache License

@Override
protected void onAttach() {
    if (isAttached()) {
        throw new IllegalStateException("Text is already attached!");
    }//  w  ww.  ja va 2s  .  c om
    isAttached = true;
    onLoad();
    AttachEvent.fire(this, isAttached);
}

From source file:com.dianaui.universal.core.client.ui.html.Text.java

License:Apache License

@Override
protected void onDetach() {
    if (!isAttached()) {
        throw new IllegalStateException("Text is not attached!");
    }//  w  w w.j av  a  2 s . c om
    isAttached = false;
    AttachEvent.fire(this, false);
}

From source file:com.sencha.gxt.widget.core.client.Composite.java

License:sencha.com license

@Override
protected void onAttach() {
    ComponentHelper.doAttach(widget);//from   w  ww.  j av a  2 s .c  o m

    // Clobber the widget's call to setEventListener(), causing all events to
    // be routed to this composite, which will delegate back to the widget by
    // default (note: it's not necessary to clear this in onDetach(), because
    // the widget's onDetach will do so).
    DOM.setEventListener(getElement(), this);

    // Call onLoad() directly, because we're not calling super.onAttach().
    onLoad();
    AttachEvent.fire(this, true);
}

From source file:com.sencha.gxt.widget.core.client.Composite.java

License:sencha.com license

@Override
protected void onDetach() {
    try {/*from   w w w  .  j  av  a  2  s  . c  o  m*/
        onUnload();
        AttachEvent.fire(this, false);
    } finally {
        // We don't want an exception in user code to keep us from calling the
        // super implementation (or event listeners won't get cleaned up and
        // the attached flag will be wrong).
        // widget.onDetach();
        ComponentHelper.doDetach(widget);
    }
}

From source file:com.wfairclough.foundation4gwt.client.ui.base.TextNode.java

License:Apache License

@Override
protected void onAttach() {
    if (isAttached()) {
        throw new IllegalStateException("already added");
    }/*  w  w w .jav a 2 s  .c o m*/

    this.attached = true;

    onLoad();

    AttachEvent.fire(this, attached);
}

From source file:com.wfairclough.foundation4gwt.client.ui.base.TextNode.java

License:Apache License

@Override
protected void onDetach() {
    if (!isAttached()) {
        throw new IllegalStateException("is not attached");
    }//from ww w.j a  v a  2  s  . c o m

    this.attached = false;

    AttachEvent.fire(this, attached);
}

From source file:org.gwtbootstrap3.client.ui.Text.java

License:Apache License

@Override
protected void onDetach() {
    if (!isAttached()) {
        throw new IllegalStateException("Text is not attached!");
    }//from   w ww .j  ava  2s .com
    isAttached = false;
    AttachEvent.fire(this, isAttached);
}