本文整理匯總了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);
}