Search in sources :

Example 1 with ViewTitleInfo2

use of com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo2 in project BiglyBT by BiglySoftware.

the class BaseMdiEntry method setViewTitleInfo.

/* (non-Javadoc)
	 * @see MdiEntry#setViewTitleInfo(ViewTitleInfo)
	 */
@Override
public void setViewTitleInfo(ViewTitleInfo viewTitleInfo) {
    if (this.viewTitleInfo == viewTitleInfo) {
        return;
    }
    this.viewTitleInfo = viewTitleInfo;
    // TODO: Need to listen for viewTitleInfo triggers so we can refresh items below
    if (viewTitleInfo != null) {
        if (viewTitleInfo instanceof ViewTitleInfo2) {
            ViewTitleInfo2 vti2 = (ViewTitleInfo2) viewTitleInfo;
            try {
                vti2.titleInfoLinked(mdi, this);
            } catch (Exception e) {
                Debug.out(e);
            }
        }
        String imageID = (String) viewTitleInfo.getTitleInfoProperty(ViewTitleInfo.TITLE_IMAGEID);
        if (imageID != null) {
            setImageLeftID(imageID.length() == 0 ? null : imageID);
        }
        ViewTitleInfoManager.addListener(this);
        if (getEventListener() == null && (viewTitleInfo instanceof UISWTViewEventListener)) {
            try {
                setEventListener((UISWTViewEventListener) viewTitleInfo, true);
            } catch (UISWTViewEventCancelledException e) {
            }
        }
    }
    redraw();
}
Also used : ViewTitleInfo2(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo2) UISWTViewEventListener(com.biglybt.ui.swt.pif.UISWTViewEventListener) ConfigurationParameterNotFoundException(com.biglybt.core.config.impl.ConfigurationParameterNotFoundException)

Aggregations

ConfigurationParameterNotFoundException (com.biglybt.core.config.impl.ConfigurationParameterNotFoundException)1 ViewTitleInfo2 (com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo2)1 UISWTViewEventListener (com.biglybt.ui.swt.pif.UISWTViewEventListener)1