use of net.heartsome.cat.ts.websearch.ui.browser.BrowserTab in project translationstudio8 by heartsome.
the class BrowserViewPart method dispose.
/**
* (non-Javadoc)
* @see org.eclipse.ui.part.WorkbenchPart#dispose()
*/
@Override
public void dispose() {
if (browserTabs != null && browserTabs.length != 0) {
for (BrowserTab tab : browserTabs) {
tab.close();
}
}
disposeCacheImage();
if (null != font) {
font.dispose();
}
WebSearchPreferencStore.getIns().removeProperChangeListener(urlChangelistener);
if (null != refreshContentJob) {
refreshContentJob.setStop(true);
}
super.dispose();
}
use of net.heartsome.cat.ts.websearch.ui.browser.BrowserTab in project translationstudio8 by heartsome.
the class BrowserViewPart method refreshTabContent.
public void refreshTabContent() {
if (browserTabs != null && browserTabs.length != 0) {
for (BrowserTab tab : browserTabs) {
tab.close();
}
}
browserTabs = new BrowserTab[urls.size()];
for (int i = 0; i < urls.size(); i++) {
SearchEntry searchEntry = urls.get(i);
browserTabs[i] = new BrowserTab(searchEntry);
CTabItem item = new CTabItem(tabFolder, SWT.NONE);
browserTabs[i].setItem(item);
item.setText(searchEntry.getSearchName().replaceAll("&", "&&"));
item.setControl(browserTabs[i].createTabFolderPage(tabFolder));
item.setData(browserTabs[i]);
Image image = getImage(searchEntry.getSearchUrl());
if (null != image) {
item.setImage(image);
}
browserTabs[i].searchKeyWord(keyWordForSearch.getText());
}
tabFolder.setSelection(0);
tabFolder.layout();
}
Aggregations