本文整理汇总了Java中org.apache.wicket.markup.html.basic.Label.setDefaultModel方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setDefaultModel方法的具体用法?Java Label.setDefaultModel怎么用?Java Label.setDefaultModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.basic.Label
的用法示例。
在下文中一共展示了Label.setDefaultModel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AsyncDashboardPanel
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
public AsyncDashboardPanel(String id, IModel<String> title, String icon, IModel<V> callableParameterModel,
Duration durationSecs, String boxCssClasses, boolean noPadding) {
super(id, callableParameterModel, durationSecs);
initLayout(noPadding);
WebMarkupContainer dashboardTitle = (WebMarkupContainer) get(
createComponentPath(ID_DASHBOARD_PARENT, ID_DASHBOARD_TITLE));
Label label = (Label) dashboardTitle.get(ID_TITLE);
label.setDefaultModel(title);
if (boxCssClasses == null) {
boxCssClasses = GuiStyleConstants.CLASS_BOX_DEFAULT;
}
Component dashboardParent = get(ID_DASHBOARD_PARENT);
dashboardParent.add(new AttributeAppender("class", " " + boxCssClasses));
WebMarkupContainer iconI = new WebMarkupContainer(ID_ICON);
iconI.add(AttributeModifier.replace("class", icon));
dashboardTitle.add(iconI);
}
示例2: 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);
}
示例3: setMessage
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
public void setMessage(IModel<String> message) {
Label label = (Label) get(ID_PANEL).get(ID_CONFIRM_TEXT);
label.setDefaultModel(message);
}