本文整理汇总了Java中org.apache.wicket.markup.html.link.ExternalLink.add方法的典型用法代码示例。如果您正苦于以下问题:Java ExternalLink.add方法的具体用法?Java ExternalLink.add怎么用?Java ExternalLink.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.link.ExternalLink
的用法示例。
在下文中一共展示了ExternalLink.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FooterPanel
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public FooterPanel(String id) {
super(id);
ExternalLink link = new ExternalLink("home", ReleaseInfo.getHome()) {
protected void onComponentTag(ComponentTag componentTag) {
super.onComponentTag(componentTag);
componentTag.put("target", "_blank");
}
};
link.add(new Label("company", ReleaseInfo.getCompany()));
add(link);
Label version = new Label("version", getVersion());
version.add(new SimpleTooltipBehavior(getBuildDate()));
add(version);
}
示例2: initMonitoringBtn
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initMonitoringBtn() {
monitoringUrlSpan = new WebMarkupContainer("monitoringUrlImg");
if (getModelObject() != null) {
monitoringUrl = getModelObject().getURLLinkFromType(LinkDto.LinkTypeEnum.METRICS_LINK);
}
monitoringUrlBtn = new ExternalLink("cell-monitoringUrl", (monitoringUrl != null) ? monitoringUrl.toString() : "") {
private static final long serialVersionUID = 5630633258734623659L;
@Override
public boolean isVisible() {
return monitoringUrl != null;
}
};
monitoringUrlSpan.add(new AttributeAppender("class", new Model<String>((monitoringUrl != null) ? "monitoringUrl-enable" : "monitoringUrl-disable"), " "));
monitoringUrlBtn.add(new AttributeModifier("id", new Model<String>("monitoringURL")));
monitoringUrlBtn.add(new AttributeModifier("title", new Model<String>(getString("portal.environment.details.overalls.monitor.tooltip"))));
monitoringUrlBtn.add(monitoringUrlSpan);
addOrReplace(monitoringUrlBtn);
}
示例3: initComponents
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public void initComponents() {
ExternalLink contactUsLink = new ExternalLink ("contactUsLink", "mailto:" + contactUsBean.getMailTo());
contactUsLink.add (new Label ("contactUsLabel", getStringResourceModel("portal.design.footer.contact.us")));
add (contactUsLink);
ExternalLink helpLink = new ExternalLink("helpLink", getStringResourceModel("portal.design.footer.help.link"));
Label helpLinkLabel = new Label("helpLinkLabel", getStringResourceModel("portal.design.footer.help"));
helpLink.add(helpLinkLabel);
add(helpLink);
boolean mock = Boolean.valueOf(WicketApplication.get().getInitParameter("mockMode"));
String version = "version " + getString("portal.build.version");
String completeVersion = mock ? version + " (mock)" : version;
Label versionLabel = new Label("version", completeVersion);
versionLabel.add(new AttributeModifier("title",getString("portal.build.timestamp") + " " + getString("portal.build.user")));
add(versionLabel);
}
示例4: initMonitoringUtlBtn
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initMonitoringUtlBtn() {
/* monitoring icon*/
monitoringUrlSpan = new WebMarkupContainer("monitoringUrlImg");
monitoringUrl = null;
monitoringUrlBtn = new ExternalLink("cell-monitoringUrl", (monitoringUrl != null) ? monitoringUrl.toString() : "") {
private static final long serialVersionUID = 5630633258734623659L;
@Override
public boolean isVisible() {
// TODO : when monitoring will be integrated this condition will have to change
return monitoringUrl != null;
}
};
monitoringUrlSpan.add(new AttributeAppender("class", new Model<String>((monitoringUrl != null) ? "monitoringUrl-enable" : "monitoringUrl-disable"), " "));
//monitoringUrlBtn.add(new AttributeAppender("target", new Model<String>("_blank"), " " ));
monitoringUrlBtn.add(new AttributeModifier("id", new Model<String>("monitoringURL")));
monitoringUrlBtn.add(monitoringUrlSpan);
add(monitoringUrlBtn);
}
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:25,代码来源:DesignerArchitectureMatrixCellButtonPanel.java
示例5: linkToJSON
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
/**
* @return a link to JSON response in order to test the query
*/
private ExternalLink linkToJSON() {
ExternalLink link = new ExternalLink("linkCubesQuery", query) {
private static final long serialVersionUID = 1L;
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("target", "_blank");
}
};
link.add(new Label("query", query));
return link;
}
示例6: linkCubesQuery
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
/**
* @return
*/
private ExternalLink linkCubesQuery(
final CubesMetricMeasurement cubesMetricMeasurement) {
ExternalLink link = new ExternalLink("linkCubesQuery", cubesMetricMeasurement.getSelf()){
private static final long serialVersionUID = 1L;
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("target","_blank");
}
};
link.add(new Label("cubesMetric", new PropertyModel<String>(
cubesMetricMeasurement, "cubesMetric")));
// tooltip config
TooltipConfig confConfig = new TooltipConfig()
.withPlacement(TooltipConfig.Placement.top);
link.add(new TooltipBehavior(new PropertyModel<String>(cubesMetricMeasurement,
"self"), confConfig));
return link;
}
示例7: ResetPasswordHtmlNotificationPanel
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public ResetPasswordHtmlNotificationPanel(String id, IModel<User> userModel) {
super(id, userModel);
WebMarkupContainer title = new WebMarkupContainer("title");
title.add(new StyleAttributeAppender(STYLE_TITLE));
add(title);
WebMarkupContainer contentContainer = new CustomWebMarkupContainer("contentContainer", STYLE_CONTENT);
add(contentContainer);
contentContainer.add(new Label("text", new StringResourceModel("notification.panel.resetPassword.text", getModel())));
contentContainer.add(new Label("confirmText", new ResourceModel("notification.panel.resetPassword.confirm")));
ExternalLink confirmLink = new ExternalLink("confirmLink", getResetPasswordUrl());
confirmLink.add(new StyleAttributeAppender(STYLE_LINK));
confirmLink.add(new Label("confirmLabel", new ResourceModel("notification.panel.resetPassword.confirm.label")));
contentContainer.add(confirmLink);
}
示例8: AbstractHtmlNotificationPanel
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public AbstractHtmlNotificationPanel(String id, IModel<T> model) {
super(id, model);
WebMarkupContainer root = new TransparentWebMarkupContainer("root");
root.add(new StyleAttributeAppender(STYLE_ROOT));
add(root);
WebMarkupContainer mainContainer = new TransparentWebMarkupContainer("mainContainer");
mainContainer.add(new StyleAttributeAppender(STYLE_MAIN_CONTAINER));
root.add(mainContainer);
mainContainer.add(new CustomWebMarkupContainer("mainTitle", STYLE_MAIN_TITLE));
WebMarkupContainer footer = new CustomWebMarkupContainer("footer", STYLE_FOOTER);
mainContainer.add(footer);
ExternalLink aboutLink = new ExternalLink("aboutLink", notificationUrlBuilderService.getAboutUrl());
aboutLink.add(new StyleAttributeAppender(STYLE_LINK_FOOTER));
footer.add(aboutLink);
}
示例9: ConfirmRegistrationHtmlNotificationPanel
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public ConfirmRegistrationHtmlNotificationPanel(String id, IModel<User> userModel) {
super(id, userModel);
WebMarkupContainer title = new WebMarkupContainer("title");
title.add(new StyleAttributeAppender(STYLE_TITLE));
add(title);
WebMarkupContainer contentContainer = new CustomWebMarkupContainer("contentContainer", STYLE_CONTENT);
add(contentContainer);
contentContainer.add(new Label("text", new StringResourceModel("notification.panel.confirmRegistration.text", getModel())));
contentContainer.add(new Label("confirmText", new ResourceModel("notification.panel.confirmRegistration.confirm")));
ExternalLink confirmLink = new ExternalLink("confirmLink", getConfirmUrl());
confirmLink.add(new StyleAttributeAppender(STYLE_LINK));
confirmLink.add(new Label("confirmLabel", new ResourceModel("notification.panel.confirmRegistration.confirm.label")));
contentContainer.add(confirmLink);
}
开发者ID:openwide-java,项目名称:artifact-listener,代码行数:20,代码来源:ConfirmRegistrationHtmlNotificationPanel.java
示例10: ImageLink
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public ImageLink(String aId, ResourceReference aImageRes, IModel<String> aUrl)
{
super(aId, aUrl);
ExternalLink link = new ExternalLink("link", aUrl);
link.add(new Image("image", aImageRes));
add(link);
}
示例11: initLogUrlBtn
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initLogUrlBtn() {
/** log icon */
logsUrlSpan = new WebMarkupContainer("logsUrlImg");
if (getModelObject() != null) {
LinkDto overallsLinkDto = getModelObject().getEnvironmentOverallsLinkDto();
if (overallsLinkDto != null) {
logsUrl = overallsLinkDto.getUrl();
}
}
logsUrlBtn = new ExternalLink("cell-logsUrl", (logsUrl != null) ? logsUrl.toString() : "") {
private static final long serialVersionUID = -7297970012605590790L;
@Override
public boolean isVisible() {
return logsUrl != null;
}
};
logsUrlSpan.add(new AttributeAppender("class", new Model<String>((logsUrl != null) ? "logsUrl-enable" : "logsUrl-disable"), " "));
//logsUrlBtn.add(new AttributeAppender("target", new Model<String>("_blank"), " " ));
logsUrlBtn.add(new AttributeModifier("id", new Model<String>("logsURL")));
logsUrlBtn.add(new AttributeModifier("title", new Model<String>(getString("portal.environment.details.overalls.log.tooltip"))));
logsUrlBtn.add(logsUrlSpan);
addOrReplace(logsUrlBtn);
}
示例12: getHypericExternalLink
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private ExternalLink getHypericExternalLink() {
String hypericPortalUrl = hypericBean.getServerURL();
ExternalLink hypericPortalLink = new ExternalLink("hyperic-portal-url", hypericPortalUrl);
hypericPortalLink.add(new CacheActivatedImage("image.monitoring_info_icon", getString("monitoring_info_icon")));
hypericPortalLink.add(new AttributeModifier("title", new Model<String>(getString("portal.design.fun.monitorinfo.title"))));
hypericPortalLink.add(new AttributeModifier("alt", new Model<String>(getString("portal.design.fun.monitorinfo.title"))));
return hypericPortalLink;
}
示例13: getSplunkExternalLink
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private ExternalLink getSplunkExternalLink() {
String splunkServerUrl = splunkBean.getServerURL();
ExternalLink externalLink = new ExternalLink("splunk-access-url", splunkServerUrl);
externalLink.add(new CacheActivatedImage("image.splunk_info_icon", getString("splunk_info_icon")));
externalLink.add(new AttributeModifier("title", new Model<String>(getString("portal.design.fun.logsinfo.title"))));
externalLink.add(new AttributeModifier("alt", new Model<String>(getString("portal.design.fun.logsinfo.alt"))));
return externalLink;
}
示例14: initLogUrlBtn
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initLogUrlBtn() {
/** log icon */
logsUrlSpan = new WebMarkupContainer("logsUrlImg");
logsUrl = getUrlFromLinkDto(LinkDto.LinkTypeEnum.LOGS_LINK, getModelObject());
logsUrlBtn = new ExternalLink("cell-logsUrl", (logsUrl != null) ? logsUrl.toString() : "") {
private static final long serialVersionUID = -7297970012605590790L;
@Override
public boolean isVisible() {
return logsUrl != null;
}
};
logsUrlSpan.add(new AttributeAppender("class", new Model<String>((logsUrl != null) ? "logsUrl-enable" : "logsUrl-disable"), " "));
//logsUrlBtn.add(new AttributeAppender("target", new Model<String>("_blank"), " " ));
logsUrlBtn.add(new AttributeModifier("id", new Model<String>("logsURL")));
Model<String[]> labelModel = new Model<String[]>(new String[]{ getModelObject().getLabel() });
StringResourceModel tooltipValue = new StringResourceModel("portal.designer.matrix.logs.tooltip", labelModel);
logsUrlBtn.add(new AttributeModifier("title", tooltipValue));
logsUrlBtn.add(logsUrlSpan);
add(logsUrlBtn);
}
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:30,代码来源:DesignerArchitectureMatrixCellButtonPanel.java
示例15: initAccessUrlBtn
import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initAccessUrlBtn() {
/* accessUrl icon */
accessUrlSpan = new WebMarkupContainer("accessUrlImg");
accessUrl = getUrlFromLinkDto(LinkDto.LinkTypeEnum.ACCESS_LINK, getModelObject());
accessUrlBtn = new ExternalLink("cell-accessUrl", (accessUrl != null) ? accessUrl.toString() : "") {
private static final long serialVersionUID = -6833152311086936880L;
@Override
public boolean isVisible() {
return accessUrl != null;
}
};
accessUrlSpan.add(new AttributeAppender("class", new Model<String>((accessUrl != null) ? "accessUrl-enable" : "accessUrl-disable"), " "));
//accessUrlBtn.add(new AttributeAppender("target", new Model<String>("_blank"), " " ));
accessUrlBtn.add(accessUrlSpan);
accessUrlBtn.add(new AttributeModifier("id", new Model<String>("webURL")));
Model<String[]> labelModel = new Model<String[]>(new String[]{ getModelObject().getLabel() });
StringResourceModel tooltipValue = new StringResourceModel("portal.designer.matrix.accessurl.tooltip", labelModel);
accessUrlBtn.add(new AttributeModifier("title", tooltipValue));
add(accessUrlBtn);
}
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:30,代码来源:DesignerArchitectureMatrixCellButtonPanel.java