本文整理汇总了Java中com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl.getProductLogo方法的典型用法代码示例。如果您正苦于以下问题:Java BasicApplicationConfigurationImpl.getProductLogo方法的具体用法?Java BasicApplicationConfigurationImpl.getProductLogo怎么用?Java BasicApplicationConfigurationImpl.getProductLogo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl
的用法示例。
在下文中一共展示了BasicApplicationConfigurationImpl.getProductLogo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeBannerContent
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
@Override
protected void writeBannerContent(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
boolean hasChildren = c.getChildCount() > 0;
ITree appLinks = TreeImpl.get(configuration.getBannerApplicationLinks());
ITree utilityLinks = TreeImpl.get(configuration.getBannerUtilityLinks());
String productLogo = configuration.getProductLogo();
SearchBar searchBar = configuration.getSearchBar();
boolean bannerHasContent = hasChildren || appLinks != null || utilityLinks != null || productLogo != null || searchBar != null;
if(bannerHasContent) {
writeBannerLink(context, w, c, configuration);
}
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class", ExtLibUtil.concatStyleClasses((String)getProperty(PROP_BANNER_COLLAPSE_CLASS), "collapse navbar-toggleable-sm"), null); // $NON-NLS-1$ $NON-NLS-2$
writeBannerProductlogo(context, w, c, configuration);
writeBannerApplicationLinks(context, w, c, configuration);
writeBannerUtilityLinks(context, w, c, configuration);
w.endElement("div"); // $NON-NLS-1$
}
示例2: writeBannerProductlogo
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
@Override
protected void writeBannerProductlogo(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
String logoImg = configuration.getProductLogo();
String logoAlt = configuration.getProductLogoAlt();
//start brand div
w.startElement("div",c); // $NON-NLS-1$
String style = configuration.getProductLogoStyle();
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style",style,null); // $NON-NLS-1$
}
String clazz = ExtLibUtil.concatStyleClasses("navbar-brand", configuration.getProductLogoClass()); // $NON-NLS-1$
w.writeAttribute("class", clazz, null); // $NON-NLS-1$
if(StringUtil.isNotEmpty(logoImg)) {
String imgSrc = HtmlRendererUtil.getImageURL(context, logoImg);
w.startElement("img",c); // $NON-NLS-1$
w.writeURIAttribute("src",imgSrc,null); // $NON-NLS-1$
if(!isAltNotEmpty(logoAlt)) {
logoAlt = "Banner product logo"; // $NLS-AbstractApplicationLayoutRenderer.BannerProductLogo-1$
}
w.writeAttribute("alt",logoAlt,null); // $NON-NLS-1$
String width = configuration.getProductLogoWidth();
if(StringUtil.isNotEmpty(width)) {
w.writeAttribute("width",width,null); // $NON-NLS-1$
}
String height = configuration.getProductLogoHeight();
if(StringUtil.isNotEmpty(height)) {
w.writeAttribute("height",height,null); // $NON-NLS-1$
}
w.endElement("img"); // $NON-NLS-1$
} else if ( StringUtil.isNotEmpty( logoAlt) ) {
w.writeText(logoAlt, null); // $NON-NLS-1$
}
w.endElement("div"); // $NON-NLS-1$
}
示例3: writeBannerProductLogo
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writeBannerProductLogo(final FacesContext context, final ResponseWriter w, final UIApplicationLayout layout, final BasicApplicationConfigurationImpl config) throws IOException {
newLine(w);
w.startElement("div", layout);
w.writeAttribute("class", "navbar-header pull-left", null);
newLine(w);
w.startElement("a", layout);
w.writeURIAttribute("href", HtmlRendererUtil.getImageURL(context, "/"), null);
w.writeAttribute("class", "navbar-brand", null);
// Add the style here
String style = config.getProductLogoStyle();
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, null);
}
newLine(w);
w.startElement("small", layout);
String clazz = config.getProductLogoClass();
String logoAlt = config.getProductLogoAlt();
// If there's a specified image, use that - otherwise, use i with the class
String logoImg = config.getProductLogo();
if(StringUtil.isNotEmpty(logoImg)) {
String imgSrc = HtmlRendererUtil.getImageURL(context, logoImg);
w.startElement("img", layout);
w.writeURIAttribute("src", imgSrc, null);
if(StringUtil.isNotEmpty(clazz)) {
w.writeAttribute("class", clazz, null);
}
w.writeAttribute("alt", logoAlt == null ? "Application Logo" : logoAlt, null);
String width = config.getProductLogoWidth();
if(StringUtil.isNotEmpty(width)) {
w.writeAttribute("width", width, null);
} else {
w.writeAttribute("width", "23", null);
}
String height = config.getProductLogoHeight();
if(StringUtil.isNotEmpty(height)) {
w.writeAttribute("height", height, null);
} else {
w.writeAttribute("height", "23", null);
}
w.endElement("img");
newLine(w);
} else if(StringUtil.isNotEmpty(clazz)) {
w.startElement("i", layout);
w.writeAttribute("class", clazz, null);
w.endElement("i");
newLine(w);
}
// Use the alt text from the image for the app name
if(StringUtil.isNotEmpty(logoAlt)) {
w.writeText(logoAlt, null);
}
newLine(w);
w.endElement("small");
newLine(w);
w.endElement("a");
w.writeComment("/.navbar-brand");
newLine(w);
w.endElement("div");
w.writeComment("/.navbar-header.pull-left");
newLine(w);
}
示例4: writeBannerProductlogo
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writeBannerProductlogo(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
w.startElement("span",c); // $NON-NLS-1$
String clazz = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_PRODUCTLOGOCLASS),configuration.getProductLogoClass());
if(StringUtil.isNotEmpty(clazz)) {
w.writeAttribute("class",clazz,null); // $NON-NLS-1$
}
String style = ExtLibUtil.concatStyles((String)getProperty(PROP_PRODUCTLOGOSTYLE),configuration.getProductLogoStyle());
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style",style,null); // $NON-NLS-1$
}
String logoImg = configuration.getProductLogo();
if(StringUtil.isEmpty(logoImg)) {
logoImg = (String)getProperty(PROP_PRODUCTLOGO);
}
if(StringUtil.isNotEmpty(logoImg)) {
String imgSrc = HtmlRendererUtil.getImageURL(context, logoImg);
w.startElement("img",c); // $NON-NLS-1$
w.writeURIAttribute("src",imgSrc,null); // $NON-NLS-1$
String logoAlt = configuration.getProductLogoAlt();
if(StringUtil.isEmpty(logoAlt)) {
logoAlt = (String)getProperty(PROP_PRODUCTLOGOALT);
}
if(!isAltNotEmpty(logoAlt)) {
logoAlt = "Banner Product Logo"; // $NLS-AbstractApplicationLayoutRenderer.BannerProductLogo-1$
}
w.writeAttribute("alt",logoAlt,null); // $NON-NLS-1$
String width = configuration.getProductLogoWidth();
if(StringUtil.isEmpty(width)) {
width = (String)getProperty(PROP_PRODUCTLOGOWIDTH);
}
if(StringUtil.isNotEmpty(width)) {
w.writeAttribute("width",width,null); // $NON-NLS-1$
}
String height = configuration.getProductLogoHeight();
if(StringUtil.isEmpty(height)) {
height = (String)getProperty(PROP_PRODUCTLOGOHEIGHT);
}
if(StringUtil.isNotEmpty(height)) {
w.writeAttribute("height",height,null); // $NON-NLS-1$
}
w.endElement("img"); // $NON-NLS-1$
}
w.endElement("span"); // $NON-NLS-1$
}