本文整理汇总了Java中org.apache.wicket.extensions.markup.html.tabs.TabbedPanel类的典型用法代码示例。如果您正苦于以下问题:Java TabbedPanel类的具体用法?Java TabbedPanel怎么用?Java TabbedPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TabbedPanel类属于org.apache.wicket.extensions.markup.html.tabs包,在下文中一共展示了TabbedPanel类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setSelectedTab
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
@Override
public TabbedPanel<ITab> setSelectedTab(final int index) {
if (isTabVisible(index)) {
//only switch if visible, this prevents an empty tab to be seen
return super.setSelectedTab(index);
} else {
return super.setSelectedTab(getSelectedTab());
}
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:10,代码来源:ModelTabbedPanel.java
示例2: updateAllComponents
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
private void updateAllComponents(final Component component) {
final AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
final Form<?> form = Components.findForm(component);
if (target != null && form != null) {
final MarkupContainer root = (MarkupContainer) Components.findRoot(form);
try {
root.visitChildren(new IVisitor<Component, Void>() {
@Override
public void component(final Component object, final IVisit<Void> visit) {
if (object instanceof Form || object instanceof TabbedPanel
|| object instanceof ModalContainer) {
target.add(object);
}
if (!object.isVisible()) {
final List<ModelComponentBehavior> modelComponentBehaviors = object
.getBehaviors(ModelComponentBehavior.class);
for (final ModelComponentBehavior behavior : modelComponentBehaviors) {
//update visibility manually since onConfigure() will be skipped
behavior.onConfigure(object);
}
}
}
});
} catch (final Throwable t) {
if (t.getMessage().contains("longer be added")) {
if (LOG.isDebugEnabled()) {
LOG.warn(FROZEN_COMPONENTS_LOG_MESSAGE, Throwables.getFullStackTrace(t));
} else if (LOG.isWarnEnabled()) {
LOG.warn(FROZEN_COMPONENTS_LOG_MESSAGE, Throwables.concatMessages(t));
}
} else {
throw t;
}
}
}
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:37,代码来源:SessionGuiService.java
示例3: setSelectedTab
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
@Override
public TabbedPanel setSelectedTab(int index) {
setDefaultModelObject(index);
ITab tab = getTabs().get(index);
final Component component = tab.getPanel(TAB_PANEL_ID);
component.add(new ScrollDivBehavior());
addOrReplace(component);
return this;
}
开发者ID:alancnet,项目名称:artifactory,代码行数:10,代码来源:RepoTabbedPanel.java
示例4: HomePage
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
public HomePage() {
List<ITab> tabs = new ArrayList<>();
tabs.add(new DataTableTab());
tabs.add(new DatePickerTab());
tabs.add(new DialogTab());
tabs.add(new DropDownMenuTab());
tabs.add(new LinkTab());
tabs.add(new TabsTab());
add(new TabbedPanel<ITab>("tabs", tabs));
}
开发者ID:jkrasnay,项目名称:panelized,代码行数:14,代码来源:HomePage.java
示例5: onClickDetailsLink
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
@Override
protected void onClickDetailsLink(IModel entityModel, AjaxRequestTarget target, ModalWindow detailsModal,
int index) {
RecordCollection collection = (RecordCollection) entityModel.getObject();
if (!collection.isOpenSearch()) {
AdminTopMenuPanel adminTabsPanel = (AdminTopMenuPanel) findParent(AdminTopMenuPanel.class);
AdminCollectionPanel adminCollectionPanel = new AdminCollectionPanel(TabbedPanel.TAB_PANEL_ID, collection);
adminTabsPanel.replaceTabContent(adminCollectionPanel);
adminCollectionPanel.setSelectedTab(0);
if (target != null) {
target.addComponent(adminTabsPanel);
}
}
}
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:15,代码来源:CollectionListPanel.java
示例6: defaultReturnAction
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
@Override
protected void defaultReturnAction() {
RecordCollection collection = collectionModel.getObject();
AdminTopMenuPanel adminTabsPanel = (AdminTopMenuPanel) findParent(AdminTopMenuPanel.class);
if (collection.getId() != null && !collection.isOpenSearch() && !edit) {
AdminCollectionPanel adminCollectionPanel = new AdminCollectionPanel(TabbedPanel.TAB_PANEL_ID, collection);
adminTabsPanel.replaceTabContent(adminCollectionPanel);
adminCollectionPanel.setSelectedTab(0);
} else {
super.defaultReturnAction();
}
}
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:13,代码来源:AddEditCollectionPanel.java
示例7: setBreadCrumbs
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
private void setBreadCrumbs() {
AdminTopMenuPanel topMenuPanel = (AdminTopMenuPanel) findParent(AdminTopMenuPanel.class);
BreadCrumbBar breadCrumbBar = topMenuPanel.getBreadCrumbBar();
int breadCrumbCount = breadCrumbBar.allBreadCrumbParticipants().size();
if (breadCrumbCount == 2) {
breadCrumbBar.allBreadCrumbParticipants().remove(1);
}
breadCrumbBar.setActive(new IBreadCrumbParticipant() {
@Override
public void onActivate(IBreadCrumbParticipant previous) {
// Nothing to do
}
@Override
public String getTitle() {
int selectedTab = getSelectedTab();
if (selectedTab == -1) {
selectedTab = 0;
}
ITab leftMenuTab = (ITab) getTabs().get(selectedTab);
String leftMenuTitle = leftMenuTab.getTitle().getObject().toString();
AdminTopMenuPanel adminTopMenuPanel = (AdminTopMenuPanel) findParent(AdminTopMenuPanel.class);
if (adminTopMenuPanel.getSelectedTab() == 0) {
Component currentTabContent = adminTopMenuPanel.get(TAB_PANEL_ID);
if (currentTabContent instanceof AdminCollectionPanel) {
AdminCollectionPanel adminCollectionPanel = (AdminCollectionPanel) currentTabContent;
RecordCollection collection = adminCollectionPanel.getCollection();
Locale displayLocale = collection.getDisplayLocale(getLocale());
String collectionTitle = collection.getTitle(displayLocale);
leftMenuTitle = collectionTitle + " > " + leftMenuTitle;
}
}
return leftMenuTitle;
}
@Override
public Component getComponent() {
return get(TabbedPanel.TAB_PANEL_ID);
}
});
}
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:43,代码来源:AdminLeftMenuPanel.java
示例8: replaceTabContent
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel; //导入依赖的package包/类
public void replaceTabContent(Panel newTabContent) {
Panel tabContentPanel = (Panel) get(TabbedPanel.TAB_PANEL_ID);
tabContentPanel.replaceWith(newTabContent);
setBreadCrumbs();
}
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:6,代码来源:AdminTopMenuPanel.java
注:本文中的org.apache.wicket.extensions.markup.html.tabs.TabbedPanel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论