use of com.biglybt.ui.swt.pif.PluginUISWTSkinObject in project BiglyBT by BiglySoftware.
the class SideBar method getEntryFromSkinObject.
// @see MultipleDocumentInterfaceSWT#getEntryFromSkinObject(com.biglybt.ui.swt.pif.PluginUISWTSkinObject)
@Override
public MdiEntrySWT getEntryFromSkinObject(PluginUISWTSkinObject pluginSkinObject) {
if (pluginSkinObject instanceof SWTSkinObject) {
Control control = ((SWTSkinObject) pluginSkinObject).getControl();
while (control != null && !control.isDisposed()) {
Object entry = control.getData("BaseMDIEntry");
if (entry instanceof BaseMdiEntry) {
BaseMdiEntry mdiEntry = (BaseMdiEntry) entry;
return mdiEntry;
}
control = control.getParent();
}
}
return null;
}
use of com.biglybt.ui.swt.pif.PluginUISWTSkinObject in project BiglyBT by BiglySoftware.
the class BaseMdiEntry method setPluginSkinObject.
/* (non-Javadoc)
* @see com.biglybt.ui.swt.pifimpl.UISWTViewImpl2#setPluginSkinObject(com.biglybt.ui.swt.pif.PluginUISWTSkinObject, org.eclipse.swt.widgets.Composite)
*/
@Override
public void setPluginSkinObject(PluginUISWTSkinObject skinObject) {
super.setPluginSkinObject(skinObject);
Object initialDataSource = (datasource == null || ((datasource instanceof Object[]) && ((Object[]) datasource).length == 0)) ? getInitialDataSource() : datasource;
if (initialDataSource != null) {
if (skinObject instanceof SWTSkinObject) {
((SWTSkinObject) skinObject).triggerListeners(SWTSkinObjectListener.EVENT_DATASOURCE_CHANGED, initialDataSource);
}
triggerEvent(UISWTViewEvent.TYPE_DATASOURCE_CHANGED, initialDataSource);
}
}
use of com.biglybt.ui.swt.pif.PluginUISWTSkinObject in project BiglyBT by BiglySoftware.
the class TabbedMDI method getEntryFromSkinObject.
// @see MultipleDocumentInterfaceSWT#getEntryFromSkinObject(com.biglybt.ui.swt.pif.PluginUISWTSkinObject)
@Override
public MdiEntrySWT getEntryFromSkinObject(PluginUISWTSkinObject pluginSkinObject) {
if (pluginSkinObject instanceof SWTSkinObject) {
Control control = ((SWTSkinObject) pluginSkinObject).getControl();
while (control != null && !control.isDisposed()) {
Object entry = control.getData("BaseMDIEntry");
if (entry instanceof BaseMdiEntry) {
BaseMdiEntry mdiEntry = (BaseMdiEntry) entry;
return mdiEntry;
}
control = control.getParent();
}
}
return null;
}
Aggregations