本文整理汇总了Java中org.apache.wicket.markup.html.basic.MultiLineLabel类的典型用法代码示例。如果您正苦于以下问题:Java MultiLineLabel类的具体用法?Java MultiLineLabel怎么用?Java MultiLineLabel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultiLineLabel类属于org.apache.wicket.markup.html.basic包,在下文中一共展示了MultiLineLabel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AutosizePage
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public AutosizePage(PageParameters parameters) {
super(parameters);
addBreadCrumbElement(new BreadCrumbElement(new ResourceModel("widgets.menu.autosize"), AutosizePage.linkDescriptor()));
TextArea<String> defaultBehavior = new TextArea<String>("defaultBehavior");
defaultBehavior.add(new AutosizeBehavior());
add(defaultBehavior);
TextArea<String> withMaxHeight = new TextArea<String>("withMaxHeight");
withMaxHeight.add(new AutosizeBehavior());
add(withMaxHeight);
MultiLineLabel multiLineLabel = new MultiLineLabel("multiLineLabel", new ResourceModel("widgets.autosize.more.text"));
multiLineLabel.add(new MoreBehavior());
add(multiLineLabel);
}
示例2: initPanelLayout
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
private void initPanelLayout() {
MultiLineLabel realizator = new MultiLineLabel(ID_REALIZATOR, createRealizatorModel());
add(realizator);
MultiLineLabel project = new MultiLineLabel(ID_PROJECT, createProjectModel());
add(project);
Label from = new Label(ID_FROM,
createStringDateModel(new PropertyModel<Date>(getModel(), ReportSearchSummaryDto.F_FROM)));
add(from);
Label to = new Label(ID_TO,
createStringDateModel(new PropertyModel<Date>(getModel(), ReportSearchSummaryDto.F_TO)));
add(to);
Label invoice = new Label(ID_INVOICE,
createHourMDModel(new PropertyModel<Double>(getModelObject(), ReportSearchSummaryDto.F_INVOICE)));
invoice.setRenderBodyOnly(true);
add(invoice);
Label work = new Label(ID_WORK,
createHourMDModel(new PropertyModel<Double>(getModelObject(), ReportSearchSummaryDto.F_WORK)));
work.setRenderBodyOnly(true);
add(work);
}
示例3: SystemLogPage
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public SystemLogPage() {
super();
WebMarkupContainer cssContainer = new WebMarkupContainer("cssPath");
cssContainer.add(new AttributeModifier("href", ThemesManager.getInstance().getThemeRelativePathCss()));
add(cssContainer);
FileAppender appender = (FileAppender) LogManager.getRootLogger().getAppender("FILE");
File logFile = new File(appender.getFile());
String content;
try {
content = FileUtils.readFileToString(logFile);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
content = e.toString();
}
add(new Label("size", FileUtils.byteCountToDisplaySize(logFile.length())));
add(new Label("lastModified", new Date(logFile.lastModified()).toString()));
add(new MultiLineLabel("log", content));
}
示例4: RunHistoryQueryPanel
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public RunHistoryQueryPanel(String id, final RunReportHistory runHistory) {
super(id);
int index = runHistory.getPath().lastIndexOf("/runHistory");
String reportPath = runHistory.getPath().substring(0, index);
Report report;
String query = "NA";
try {
report = (Report)storageService.getEntity(reportPath);
if (ReportConstants.NEXT.equals(report.getType())) {
query = ro.nextreports.engine.util.ReportUtil.getSql(
NextUtil.getNextReport(settings.getSettings(), report), runHistory.getParametersValues());
}
} catch (NotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
add(new MultiLineLabel("query", new Model<String>(query)));
}
示例5: RunHistoryDetailPanel
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public RunHistoryDetailPanel(String id, final RunReportHistory runHistory) {
super(id);
add(new ContextImage("image", new LoadableDetachableModel<String>() {
@Override
protected String load() {
String theme = settings.getSettings().getColorTheme();
return runHistory.isSuccess() ? "images/" + ThemesManager.getTickImage(theme, (NextServerApplication)getApplication()) : "images/delete.gif";
}
}));
add(new Label("messageTitle", new Model<String>(getString("ActionContributor.RunHistory.message"))));
add(new MultiLineLabel("messageContent", new Model<String>(runHistory.getMessage())));
add(new Label("valuesTitle", new Model<String>(getString("ActionContributor.RunHistory.runtime"))));
String values = ReportUtil.getDebugParameters(runHistory.getParametersValues(), runHistory.getParametersDisplayNames());
//values = values.replaceAll("\r\n", "<br>");
add(new MultiLineLabel("valuesContent", new Model<String>(values)));
}
示例6: addMultilineLable
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
private void addMultilineLable(String id, String messageKey, Form<?> mainForm) {
MultiLineLabel welcome = new MultiLineLabel(id, createStringResource(messageKey));
welcome.setOutputMarkupId(true);
welcome.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return !submited;
}
});
mainForm.add(welcome);
}
示例7: UserGroupDescriptionPanel
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public UserGroupDescriptionPanel(String id, final IModel<UserGroup> userGroupModel) {
super(id, userGroupModel);
UserGroupPopup updatePopup = new UserGroupPopup("updatePopup", getModel());
add(
new WebMarkupContainer("lockedWarningContainer") {
private static final long serialVersionUID = 1L;
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(userGroupModel.getObject().isLocked());
}
},
new MultiLineLabel("description", BindingModel.of(userGroupModel, Bindings.userGroup().description())),
new SequenceView<Authority>("authorities", new RoleDataProvider()) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(final Item<Authority> item) {
item.add(
new Label("authorityName", item.getModel()),
new BooleanIcon(
"authorityCheck",
Condition.contains(
BindingModel.of(userGroupModel, Bindings.userGroup().authorities()),
item.getModel()
)
)
);
}
},
updatePopup,
new BlankLink("updateButton")
.add(new AjaxModalOpenBehavior(updatePopup, MouseEvent.CLICK))
);
}
示例8: LoginForm
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public LoginForm(String id)
{
super(id);
setModel(new CompoundPropertyModel<>(this));
add(new RequiredTextField<String>("username"));
add(new PasswordTextField("password"));
add(new HiddenField<>("urlfragment"));
Properties settings = SettingsUtil.getSettings();
String loginMessage = settings.getProperty(SettingsUtil.CFG_LOGIN_MESSAGE);
add(new MultiLineLabel("loginMessage", loginMessage).setEscapeModelStrings(false));
}
示例9: initComponents
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
private void initComponents() {
entries = new ArrayList<DetailedConfigEntry>();
createConfigEntryList();
List<IColumn<DetailedConfigEntry, String>> columns = new ArrayList<IColumn<DetailedConfigEntry, String>>();
columns.add(new PropertyColumn<DetailedConfigEntry, String>(getStringResourceModel("portal.designer.config.summary.header.execNodeName"), "execNodeName"));
columns.add(new PropertyColumn<DetailedConfigEntry, String>(getStringResourceModel("portal.designer.config.summary.header.configSetName"), "configSetName"));
columns.add(new PropertyColumn<DetailedConfigEntry, String>(getStringResourceModel("portal.designer.config.summary.header.key"), "key"));
columns.add(new PropertyColumn<DetailedConfigEntry, String>(getStringResourceModel("portal.designer.config.summary.header.value"), "value"));
columns.add(new PropertyColumn<DetailedConfigEntry, String>(getStringResourceModel("portal.designer.config.summary.header.comment"), "comment") {
private static final long serialVersionUID = 1321984147078227956L;
@Override
public void populateItem(Item<ICellPopulator<DetailedConfigEntry>> item, String componentId, IModel<DetailedConfigEntry> rowModel) {
MultiLineLabel label = new MultiLineLabel(componentId, getDataModel(rowModel));
label.add(new AttributeAppender("class", "preserve_whitespace"));
item.add(label);
}
});
AjaxFallbackCustomDataTable<DetailedConfigEntry, String> table = new AjaxFallbackCustomDataTable<>("configList", columns, new ConfigEntryProvider(), PageTemplate.ROWS_PER_PAGE);
add(table);
if (entries.size() == 0) {
this.setVisible(false);
}
}
示例10: HistoryItemPanel
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public HistoryItemPanel(String id, IModel<ScriptResult> model,final Component inpitField,final Component engineSelect)
{
super(id, model instanceof CompoundPropertyModel?model:new CompoundPropertyModel<ScriptResult>(model));
add(engine = new MultiLineLabel("engine").add(HideIfObjectIsEmptyBehavior.INSTANCE));
add(script = new MultiLineLabel("script").add(HideIfObjectIsEmptyBehavior.INSTANCE));
add(new AjaxLink("reuse"){
@Override
public void onClick(AjaxRequestTarget target) {
inpitField.setDefaultModelObject(script.getDefaultModelObject());
engineSelect.setDefaultModelObject(engine.getDefaultModelObject());
target.add(engineSelect);
target.add(inpitField);
}
});
}
示例11: onInitialize
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
@Override
protected void onInitialize() {
super.onInitialize();
ScriptResult historyItem = getModelObject();
ScriptResultRendererManager renderer = ScriptResultRendererManager.INSTANCE;
add(new MultiLineLabel("out").add(HideIfObjectIsEmptyBehavior.INSTANCE));
add(new MultiLineLabel("error").add(HideIfObjectIsEmptyBehavior.INSTANCE));
add(renderer.render("result",historyItem.getResultModel()));
}
示例12: createMessageLabel
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
/**
* Creates a Label without model string escaping if the text to display is
* introduced by <HTML>. In this case the intro is removed and also a
* potential </HTML> outro. This concept is stolen from Swing. Otherwise,
* the method returns a MultiLineLabel
*
* @param message the message
* @return the web component
*/
protected WebComponent createMessageLabel(String message) {
String strippedMessage = stripHTMLIntroOutro(message);
if (strippedMessage.length() == message.length()) {
return new MultiLineLabel("message.label", new Model<String>(message));
}
Label messageLabel = new Label("message.label", message);
messageLabel.setEscapeModelStrings(false);
return messageLabel;
}
示例13: ViewInfoPanel
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public ViewInfoPanel(String id, final Report report, final Report original, String versionName) {
super(id, new Model<Report>(report));
String name = report.getName();
if (versionName != null) {
name += " (" + getString("ActionContributor.Info.version") + ": " + versionName + ")";
}
add(new Label("legend", getString("ActionContributor.Info.reportInfo")));
add(new Label("entityId", getString("ActionContributor.Info.id")));
add(new Label("reportId", report.getId()));
add(new Label("entityName", getString("ActionContributor.Info.entityName")));
add(new Label("reportName", name));
add(new Label("descLabel", getString("ActionContributor.Info.description")));
add(new TextArea<String>("description", new Model<String>(report.getDescription())));
addParametersTable(report);
String sql = "NA";
if (ReportConstants.NEXT.equals(report.getType())) {
sql = ReportUtil.getSql(NextUtil.getNextReport(settings.getSettings(), report));
} else if (ReportConstants.JASPER.equals(report.getType())) {
sql = JasperReportsUtil.getMasterQuery(report);
}
add(new MultiLineLabel("sql", new Model<String>(sql)));
add(new AjaxLink<Void>("cancel") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
EntityBrowserPanel panel = findParent(EntityBrowserPanel.class);
panel.backwardWorkspace(target);
}
});
}
示例14: QueryEditorHelpModal
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public QueryEditorHelpModal(final String id, final String helpText) {
super(id, "Help: Query Editor");
this.add(new MultiLineLabel("helpTextLabel", helpText));
}
示例15: Popup
import org.apache.wicket.markup.html.basic.MultiLineLabel; //导入依赖的package包/类
public Popup(final String id, final String messageText) {
super(id);
this.add(new MultiLineLabel("helpText", messageText));
}