use of com.biglybt.ui.swt.skin.SWTSkinObjectText in project BiglyBT by BiglySoftware.
the class SimplePluginInstallWindow method open.
public void open() {
box = new VuzeMessageBox("", "", null, 0);
box.setSubTitle(MessageText.getString(resource_prefix + ".subtitle"));
box.addResourceBundle(SimplePluginInstallWindow.class, SkinPropertiesImpl.PATH_SKIN_DEFS, "skin3_dlg_register");
box.setIconResource(resource_prefix + ".image");
this.progressText = MessageText.getString(resource_prefix + ".description");
box.setListener(new VuzeMessageBoxListener() {
@Override
public void shellReady(Shell shell, SWTSkinObjectContainer soExtra) {
SWTSkin skin = soExtra.getSkin();
skin.createSkinObject("dlg.register.install", "dlg.register.install", soExtra);
SWTSkinObjectContainer soProgressBar = (SWTSkinObjectContainer) skin.getSkinObject("progress-bar");
if (soProgressBar != null) {
progressBar = new ProgressBar(soProgressBar.getComposite(), SWT.HORIZONTAL);
progressBar.setMinimum(0);
progressBar.setMaximum(100);
progressBar.setLayoutData(Utils.getFilledFormData());
}
soInstallPct = (SWTSkinObjectText) skin.getSkinObject("install-pct");
soProgressText = (SWTSkinObjectText) skin.getSkinObject("progress-text");
if (soProgressText != null && progressText != null) {
soProgressText.setText(progressText);
}
}
});
box.open(new UserPrompterResultListener() {
@Override
public void prompterClosed(int result) {
installer.setListener(null);
try {
installer.cancel();
} catch (Exception e) {
Debug.out(e);
}
}
});
}
use of com.biglybt.ui.swt.skin.SWTSkinObjectText in project BiglyBT by BiglySoftware.
the class ToolBarView method initSO.
private void initSO(SWTSkinObject so, ToolBarItemSO itemSO) {
ToolBarItem item = itemSO.getBase();
itemSO.setSO(so);
String toolTip = item.getToolTip();
if (toolTip != null) {
so.setTooltipID("!" + toolTip + "!");
} else {
so.setTooltipID(item.getToolTipID());
}
so.setData("toolbaritem", item);
SWTSkinButtonUtility btn = (SWTSkinButtonUtility) so.getData("btn");
if (btn == null) {
btn = new SWTSkinButtonUtility(so, "toolbar-item-image");
so.setData("btn", btn);
}
btn.setImage(item.getImageID());
btn.addSelectionListener(buttonListener);
itemSO.setSkinButton(btn);
SWTSkinObject soTitle = skin.getSkinObject("toolbar-item-title", so);
if (soTitle instanceof SWTSkinObjectText) {
((SWTSkinObjectText) soTitle).setTextID(item.getTextID());
itemSO.setSkinTitle((SWTSkinObjectText) soTitle);
}
synchronized (mapToolBarItemToSO) {
mapToolBarItemToSO.put(item, itemSO);
}
}
Aggregations