本文整理汇总了Java中org.apache.pivot.wtk.TabPane类的典型用法代码示例。如果您正苦于以下问题:Java TabPane类的具体用法?Java TabPane怎么用?Java TabPane使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TabPane类属于org.apache.pivot.wtk包,在下文中一共展示了TabPane类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openSearchTab
import org.apache.pivot.wtk.TabPane; //导入依赖的package包/类
public void openSearchTab(final SearchParameter searchParameter) {
int idx = findSearchResultPane(searchParameter);
if (idx < 0) {
final SearchResultPane searchResultPane = createSearchResultPane();
if (searchResultPane != null) {
searchResultPane.setSearchParameter(searchParameter);
idx = tabPane.getTabs().add(searchResultPane);
TabPane.setTabData(searchResultPane, searchResultPane.getShortLabel());
tabPane.setSelectedIndex(idx);
if (tabPane.getTabs().getLength() > 1)
searchResultPane.startSearch();
else {
// workaround for GUI glitch: if this is the first tab that has been added,
// paint the activity indicator only after 600ms, otherwise a strange redraw
// error will occur
ApplicationContext.scheduleCallback(new Runnable() {
@Override
public void run() {
searchResultPane.startSearch();
}
}, 600);
}
}
searchField.requestFocus();
} else {
tabPane.setSelectedIndex(idx);
}
display.getHostWindow().toFront();
}
示例2: addTab
import org.apache.pivot.wtk.TabPane; //导入依赖的package包/类
private void addTab(String contentResource, String tabTitle) {
try {
LazyLoadingPane lazyLoadingPane = createNewLazyLoadingPane();
lazyLoadingPane.setContentResource(contentResource);
tabPane.getTabs().add(lazyLoadingPane);
TabPane.setTabData(lazyLoadingPane, new ButtonData(tabTitle));
} catch (Exception ex) {
main.showError("could not add tab " + tabTitle + " using " + contentResource, ex);
}
}
示例3: createTabPane
import org.apache.pivot.wtk.TabPane; //导入依赖的package包/类
@Bean
@Lazy
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
@Override
public TabPane createTabPane() {
return new TabPane();
}
示例4: createTabPane
import org.apache.pivot.wtk.TabPane; //导入依赖的package包/类
public TabPane createTabPane();