本文整理汇总了Java中org.apache.wicket.extensions.markup.html.tabs.AbstractTab类的典型用法代码示例。如果您正苦于以下问题:Java AbstractTab类的具体用法?Java AbstractTab怎么用?Java AbstractTab使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractTab类属于org.apache.wicket.extensions.markup.html.tabs包,在下文中一共展示了AbstractTab类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateConfigurationTabs
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void updateConfigurationTabs() {
final com.evolveum.midpoint.web.component.form.Form form = getForm();
TabbedPanel<ITab> tabbedPanel = getConfigurationTabbedPanel();
List<ITab> tabs = tabbedPanel.getTabs().getObject();
tabs.clear();
List<ContainerWrapper> wrappers = configurationPropertiesModel.getObject();
for (final ContainerWrapper wrapper : wrappers) {
String tabName = getString(wrapper.getDisplayName(), null, wrapper.getDisplayName());
tabs.add(new AbstractTab(new Model<>(tabName)) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new PrismContainerPanel(panelId, new Model<>(wrapper), true, form, parentPage);
}
});
}
int i = tabbedPanel.getSelectedTab();
if (i < 0 || i > tabs.size()) {
i = 0;
}
tabbedPanel.setSelectedTab(i);
}
示例2: initLayout
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void initLayout() {
Form<?> mainForm = new Form<>(ID_MAIN_FORM);
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(createStringResource("PageSelfCredentials.tabs.password")) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new ChangePasswordPanel(panelId, isCheckOldPassword(), model, model.getObject());
}
});
TabbedPanel<ITab> credentialsTabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
credentialsTabPanel.setOutputMarkupId(true);
mainForm.add(credentialsTabPanel);
initButtons(mainForm);
add(mainForm);
}
示例3: addScenarioTabs
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void addScenarioTabs() {
tabs = new ArrayList<ITab>();
// tabs.add(new AbstractTab(new Model<String>("GET Scenario 3")) {
// @Override
// public Panel getPanel(final String panelId) {
// return new Scenario3Panel(panelId, panel);
// }
// });
final Map<String, List<ReplayFileBean>> fileBeans = ReplayerContainer.getFileBeans();
for (final String category : fileBeans.keySet()) {
tabs.add(new AbstractTab(new Model<String>(category)) {
@Override
public Panel getPanel(final String panelId) {
return new CategoryPanel(panelId, panel, category, fileBeans.get(category));
}
});
}
this.layoutForm.addOrReplace(new Collapsible("collapsible", tabs, Model.of(-1)));
}
示例4: setSelectedTab
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
public void setSelectedTab(int selectedTab, boolean showTabContents) {
if(selectedTab < 0 || selectedTab >= tabs.size()){
throw new IndexOutOfBoundsException();
}
setDefaultModelObject(Integer.valueOf(selectedTab));
AbstractTab tab = getTabs().get(selectedTab);
WebMarkupContainer tabContents = null;
if(showTabContents) {
tabContents = tab.getPanel("tabContents");
}else{
tabContents = new WebMarkupContainer("tabContents");
}
if(get("tabContents") == null){
add(tabContents);
}else{
replace(tabContents);
}
}
示例5: MetaDataSettingsPage
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
public MetaDataSettingsPage(PageParameters pageParameters) {
super(pageParameters);
List<ITab> tabs = new ArrayList<>();
for (final Class clazz : MetaData.getAllClasses()) {
tabs.add(new AbstractTab(Model.of(MetaData.getLabel(clazz))) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new MetaDataEditPanel<>(panelId, clazz, serviceBroker.getService(clazz), feedbackPanel);
}
});
}
AjaxBootstrapTabbedPillsPanel tmp = new AjaxBootstrapTabbedPillsPanel<>("tabs", tabs);
tmp.setAdjustPillsForMobile(true);
tabPanel = tmp;
add(tabPanel);
}
示例6: updateConfigurationTabs
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void updateConfigurationTabs() {
final com.evolveum.midpoint.web.component.form.Form form = getForm();
TabbedPanel<ITab> tabbedPanel = getConfigurationTabbedPanel();
List<ITab> tabs = tabbedPanel.getTabs().getObject();
tabs.clear();
List<ContainerWrapper> wrappers = configurationPropertiesModel.getObject();
for (final ContainerWrapper wrapper : wrappers) {
String tabName = getString(wrapper.getDisplayName(), null, wrapper.getDisplayName());
tabs.add(new AbstractTab(new Model<>(tabName)) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new PrismContainerPanel(panelId, new Model<>(wrapper), true, form, null, parentPage);
}
});
}
int i = tabbedPanel.getSelectedTab();
if (i < 0 || i > tabs.size()) {
i = 0;
}
tabbedPanel.setSelectedTab(i);
}
示例7: initLayout
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void initLayout() {
Form<?> mainForm = new com.evolveum.midpoint.web.component.form.Form<>(ID_MAIN_FORM);
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(createStringResource("PageSelfCredentials.tabs.password")) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new ChangePasswordPanel(panelId, isCheckOldPassword(), model, model.getObject());
}
});
TabbedPanel<ITab> credentialsTabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
credentialsTabPanel.setOutputMarkupId(true);
mainForm.add(credentialsTabPanel);
initButtons(mainForm);
add(mainForm);
}
示例8: buildTabList
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private List<ITab> buildTabList() {
final List<ITab> tabs = new ArrayList<>();
for (final SchemaType schemaType : SchemaType.values()) {
tabs.add(new AbstractTab(new Model<>(schemaType.name())) {
private static final long serialVersionUID = 1037272333056449378L;
@Override
public Panel getPanel(final String panelId) {
return new SchemaTypePanel(panelId, schemaType, pageReference);
}
});
}
return tabs;
}
示例9: Details
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
public Details(final RoleWrapper modelObject) {
add(new AjaxTextFieldPanel(
"key", "key", new PropertyModel<>(modelObject.getInnerObject(), "key"), false).
setEnabled(StringUtils.isEmpty(modelObject.getInnerObject().getKey())));
// ------------------------
// dynMembershipCond
// ------------------------
add(new Accordion("dynMembershipCond", Collections.<ITab>singletonList(
new AbstractTab(new ResourceModel("dynMembershipCond", "Dynamic USER Membership Conditions")) {
private static final long serialVersionUID = 1037272333056449378L;
@Override
public Panel getPanel(final String panelId) {
return new UserSearchPanel.Builder(
new PropertyModel<>(modelObject, "dynClauses")).
required(true).build(panelId);
}
}), Model.of(StringUtils.isBlank(modelObject.getDynMembershipCond()) ? -1 : 0)).setOutputMarkupId(true));
// ------------------------
}
示例10: createSchemaEditor
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private ITab createSchemaEditor() {
return new AbstractTab(createStringModel("SchemaStep.xml")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
XmlEditorPanel xmlEditorPanel = new XmlEditorPanel(panelId, createXmlEditorModel());
// quick fix: now changes from XmlEditorPanel are not saved anyhow
//(e.g. by clicking Finish button in wizard). For now,
//panel is made disabled for editing
AceEditor aceEditor = (AceEditor) xmlEditorPanel.get(ID_ACE_EDITOR);
aceEditor.setReadonly(true);
return xmlEditorPanel;
}
};
}
示例11: createSimpleSchemaView
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private ITab createSimpleSchemaView() {
return new AbstractTab(createStringModel("SchemaStep.schema")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new SchemaListPanel(panelId, model, parentPage);
}
};
}
示例12: nameClickPerformed
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void nameClickPerformed(AjaxRequestTarget target) {
TabbedPanel tabbedPanel = this.findParent(TabbedPanel.class);
IModel<List<ITab>> tabsModel = tabbedPanel.getTabs();
List<ITab> tabsList = tabsModel.getObject();
PropertyModel<String> tabNameModel;
if (getModel().getObject().getName() == null || getModel().getObject().getName().trim().equals("")){
tabNameModel = new PropertyModel<>(getModel(), StageDefinitionDto.F_NUMBER);
} else {
tabNameModel = new PropertyModel<>(getModel(), StageDefinitionDto.F_NAME);
}
for (ITab tab : tabsList){
if (tab.getTitle().getObject().equals(tabNameModel.getObject())){
int i = tabsList.indexOf(tab);
tabbedPanel.setSelectedTab(i);
target.add(tabbedPanel);
return;
}
}
tabsList.add(new AbstractTab(tabNameModel) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new DefinitionStagePanel(panelId, getModel(), getPageBase());
}
});
tabbedPanel.setSelectedTab(tabsList.size() - 1);
target.add(tabbedPanel);
}
示例13: createTab
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
@NotNull
private AbstractTab createTab(final StageDefinitionDto definitionDto, final PageCertDefinition parentPage) {
return new AbstractTab(new Model<>(definitionDto.getName())) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new DefinitionStagePanel(panelId, new Model(definitionDto), parentPage);
}
};
}
示例14: addUnexpectedEventPanel
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
@Override
protected void addUnexpectedEventPanel(final List<ITab> tabs) {
tabs.add(new AbstractTab(new Model<String>("Unexpected Events (instance-dependent)")) {
@Override
public Panel getPanel(final String panelId) {
SimpleSimulationPanel.this.unexpectedEventPanel = new UnexpectedEventPanel(panelId, SimpleSimulationPanel.this.simulationPanel);
return SimpleSimulationPanel.this.unexpectedEventPanel;
}
});
}
示例15: addAdvancedValuesPanel
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; //导入依赖的package包/类
private void addAdvancedValuesPanel(final List<ITab> tabs) {
tabs.add(new AbstractTab(new Model<String>("Advanced values for attributes")) {
@Override
public Panel getPanel(final String panelId) {
SimulationPanel.this.advancedValuesPanel = new AdvancedValuesPanel(panelId, SimulationPanel.this.simulationPanel);
return SimulationPanel.this.advancedValuesPanel;
}
});
}