Example usage for com.badlogic.gdx.scenes.scene2d Actor removeListener

List of usage examples for com.badlogic.gdx.scenes.scene2d Actor removeListener

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d Actor removeListener.

Prototype

public boolean removeListener(EventListener listener) 

Source Link

Usage

From source file:com.kotcrab.vis.ui.widget.Tooltip.java

License:Apache License

/**
 * Remove any attached tooltip from target actor
 * @param target that tooltips will be removed
 *///from  w ww. ja  va  2  s.  c o m
public static void removeTooltip(Actor target) {
    Array<EventListener> listeners = target.getListeners();
    for (EventListener listener : listeners) {
        if (listener instanceof TooltipInputListener)
            target.removeListener(listener);
    }
}

From source file:de.longri.cachebox3.gui.activities.Settings_Activity.java

License:Open Source License

private void layoutActListView(boolean itemCountChanged) {
    //get act listView
    WidgetGroup widgetGroup = listViews.get(listViews.size - 1);
    ListView actListView = null;/*  w w w.  j  a v a2s .  com*/
    for (Actor actor : widgetGroup.getChildren()) {
        if (actor instanceof ListView) {
            actListView = (ListView) actor;
            break;
        }
    }

    if (itemCountChanged) {
        Object object = actListView.getUserObject();
        if (object instanceof de.longri.cachebox3.settings.types.SettingCategory) {
            WidgetGroup group = listViews.pop();
            listViewsNames.pop();

            //remove all Listener
            for (Actor actor : group.getChildren())
                for (EventListener listener : actor.getListeners())
                    actor.removeListener(listener);

            this.removeActor(group);
            showCategory((de.longri.cachebox3.settings.types.SettingCategory) object, false);
        }
    }

}