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();
}
Aggregations