本文整理汇总了Java中org.apache.wicket.markup.html.basic.Label.setRenderBodyOnly方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setRenderBodyOnly方法的具体用法?Java Label.setRenderBodyOnly怎么用?Java Label.setRenderBodyOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.basic.Label
的用法示例。
在下文中一共展示了Label.setRenderBodyOnly方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(IModel<String> titleModel, String icon, String boxCssClasses) {
if (boxCssClasses == null) {
boxCssClasses = GuiStyleConstants.CLASS_BOX_DEFAULT;
}
WebMarkupContainer dashboardParent = new WebMarkupContainer(ID_DASHBOARD_PARENT);
dashboardParent.add(new AttributeAppender("class", " " + boxCssClasses));
add(dashboardParent);
WebMarkupContainer dashboardTitle = new WebMarkupContainer(ID_DASHBOARD_TITLE);
dashboardParent.add(dashboardTitle);
Label title = new Label(ID_TITLE);
title.setRenderBodyOnly(true);
title.setDefaultModel(titleModel);
dashboardTitle.add(title);
WebMarkupContainer dashboardContent = new WebMarkupContainer(ID_DASHBOARD_CONTENT);
dashboardContent.add(getMainComponent(ID_CONTENT));
dashboardParent.add(dashboardContent);
WebMarkupContainer iconI = new WebMarkupContainer(ID_ICON);
iconI.add(AttributeModifier.replace("class", icon));
dashboardTitle.add(iconI);
}
示例2: onInitialize
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
@Override
protected void onInitialize() {
super.onInitialize();
WebMarkupContainer td = new WebMarkupContainer(ID_TD);
td.add(AttributeModifier.replace("colspan", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return String.valueOf(getTable().getColumns().size());
}
}));
add(td);
Label count = new Label(ID_COUNT, createModel());
count.setRenderBodyOnly(true);
td.add(count);
PageSizePopover popover = new PageSizePopover(ID_PAGE_SIZE) {
@Override
protected void pageSizeChanged(AjaxRequestTarget target) {
CountToolbar.this.pageSizeChanged(target);
}
};
popover.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return CountToolbar.this.isPageSizePopupVisible();
}
});
td.add(popover);
}
示例3: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(boolean noPadding) {
WebMarkupContainer dashboardParent = new WebMarkupContainer(ID_DASHBOARD_PARENT);
add(dashboardParent);
WebMarkupContainer dashboardTitle = new WebMarkupContainer(ID_DASHBOARD_TITLE);
dashboardParent.add(dashboardTitle);
Label title = new Label(ID_TITLE);
title.setRenderBodyOnly(true);
dashboardTitle.add(title);
WebMarkupContainer dashboardContent = new WebMarkupContainer(ID_DASHBOARD_CONTENT);
dashboardParent.add(dashboardContent);
if (noPadding) {
dashboardContent.add(AttributeAppender.append("class", "no-padding"));
}
dashboardContent.add(new Label(ID_CONTENT));
WebMarkupContainer preloaderContainer = new WebMarkupContainer(ID_PRELOADER_CONTAINER);
preloaderContainer.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return isLoadingVisible();
}
});
dashboardContent.add(preloaderContainer);
preloaderContainer.add(getLoadingComponent(ID_PRELOADER));
}
示例4: addLabel
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void addLabel(String id, String propertyName) {
Label label = new Label(id, new PropertyModel<String>(repoDiagModel, propertyName));
label.setRenderBodyOnly(true);
add(label);
}
示例5: newTitle
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
/**
* Factory method for tab titles. Returned component can be anything that can attach to span
* tags such as a fragment, panel, or a label
*
* @param titleId id of tiatle component
* @param titleModel model containing tab title
* @param index index of tab
* @return title component
*/
protected Component newTitle(final String titleId, final IModel<?> titleModel, final int index) {
Label label = new Label(titleId, titleModel);
label.setRenderBodyOnly(true);
return label;
}