Search in sources :

Example 1 with UIToolBarEnablerBase

use of com.biglybt.pif.ui.toolbar.UIToolBarEnablerBase in project BiglyBT by BiglySoftware.

the class UISWTViewImpl method refreshToolBarItems.

@Override
public void refreshToolBarItems(Map<String, Long> list) {
    UIToolBarEnablerBase[] toolbarEnablers = getToolbarEnablers();
    for (UIToolBarEnablerBase tbEnablerBase : toolbarEnablers) {
        if (tbEnablerBase instanceof UIPluginViewToolBarListener) {
            UIPluginViewToolBarListener tbEnabler = (UIPluginViewToolBarListener) tbEnablerBase;
            tbEnabler.refreshToolBarItems(list);
        }
    }
}
Also used : UIToolBarEnablerBase(com.biglybt.pif.ui.toolbar.UIToolBarEnablerBase) UIPluginViewToolBarListener(com.biglybt.pif.ui.UIPluginViewToolBarListener)

Example 2 with UIToolBarEnablerBase

use of com.biglybt.pif.ui.toolbar.UIToolBarEnablerBase in project BiglyBT by BiglySoftware.

the class BaseMdiEntry method setEventListener.

/* (non-Javadoc)
	 * @see com.biglybt.ui.swt.pifimpl.UISWTViewImpl2#setEventListener(com.biglybt.ui.swt.pif.UISWTViewEventListener, boolean)
	 */
@Override
public void setEventListener(UISWTViewEventListener _eventListener, boolean doCreate) throws UISWTViewEventCancelledException {
    UISWTViewEventListener eventListener = getEventListener();
    if (eventListener instanceof UIToolBarEnablerBase) {
        removeToolbarEnabler((UIToolBarEnablerBase) eventListener);
    }
    if ((eventListener instanceof ViewTitleInfo) && viewTitleInfo == eventListener) {
        setViewTitleInfo(null);
    }
    if (_eventListener instanceof UISWTViewEventListenerHolder) {
        UISWTViewEventListenerHolder h = (UISWTViewEventListenerHolder) _eventListener;
        UISWTViewEventListener delegatedEventListener = h.getDelegatedEventListener(this);
        if (delegatedEventListener != null) {
            _eventListener = delegatedEventListener;
        }
    }
    if (_eventListener instanceof UIToolBarEnablerBase) {
        addToolbarEnabler((UIToolBarEnablerBase) _eventListener);
    }
    if ((_eventListener instanceof ViewTitleInfo) && viewTitleInfo == null) {
        setViewTitleInfo((ViewTitleInfo) _eventListener);
    }
    if (_eventListener instanceof BasicPluginViewImpl) {
        String existing_id = getImageLeftID();
        if (existing_id == null || "image.sidebar.plugin".equals(existing_id)) {
            setImageLeftID("image.sidebar.logview");
        }
    }
    super.setEventListener(_eventListener, doCreate);
}
Also used : UIToolBarEnablerBase(com.biglybt.pif.ui.toolbar.UIToolBarEnablerBase) UISWTViewEventListener(com.biglybt.ui.swt.pif.UISWTViewEventListener) ViewTitleInfo(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo)

Aggregations

UIToolBarEnablerBase (com.biglybt.pif.ui.toolbar.UIToolBarEnablerBase)2 UIPluginViewToolBarListener (com.biglybt.pif.ui.UIPluginViewToolBarListener)1 ViewTitleInfo (com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo)1 UISWTViewEventListener (com.biglybt.ui.swt.pif.UISWTViewEventListener)1