本文整理汇总了Java中com.ibm.xsp.extlib.util.ExtLibUtil.concatStyleClasses方法的典型用法代码示例。如果您正苦于以下问题:Java ExtLibUtil.concatStyleClasses方法的具体用法?Java ExtLibUtil.concatStyleClasses怎么用?Java ExtLibUtil.concatStyleClasses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.extlib.util.ExtLibUtil
的用法示例。
在下文中一共展示了ExtLibUtil.concatStyleClasses方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeSlideHeading
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public void writeSlideHeading(FacesContext context, ResponseWriter w, UICarousel c, SlideNode slide, String headingText) throws IOException {
if(StringUtil.isNotEmpty(headingText)) {
String headingStyle = slide.getHeadingStyle();
String headingClass = slide.getHeadingStyleClass();
String headingTag = slide.getHeadingTag();
String tag = StringUtil.isNotEmpty(headingTag) ? headingTag : (String)getProperty(PROP_SLIDE_HEADING_TAG);
w.startElement(tag, c);
String classMixin = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_SLIDE_HEADING_CLASS), headingClass);
if(StringUtil.isNotEmpty(classMixin)) {
w.writeAttribute("class", classMixin, null); // $NON-NLS-1$
}
String styleMixin = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_SLIDE_HEADING_STYLE), headingStyle);
if(StringUtil.isNotEmpty(styleMixin)) {
w.writeAttribute("style", styleMixin, null); // $NON-NLS-1$
}
//write the heading text
w.writeText(headingText, null);
// end img tag
w.endElement(tag);
}
}
示例2: getItemStyleClass
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected String getItemStyleClass(TreeContextImpl tree, boolean enabled, boolean selected) {
String clazz=null;
clazz = ExtLibUtil.concatStyleClasses(clazz, "menu-item"); // $NON-NLS-1$
if(tree.getNode().getType()==ITreeNode.NODE_SEPARATOR) {
clazz = ExtLibUtil.concatStyleClasses(clazz, "divider"); // $NON-NLS-1$
return clazz;
}
if(tree.getNode().getType()==ITreeNode.NODE_CONTAINER) {
if(tree.getDepth()>2) {
clazz = ExtLibUtil.concatStyleClasses(clazz, "dropdown dropdown-submenu"); // $NON-NLS-1$
} else {
clazz = ExtLibUtil.concatStyleClasses(clazz, "dropdown"); // $NON-NLS-1$
}
}
if(!enabled) {
clazz = ExtLibUtil.concatStyleClasses(clazz, "disabled"); // $NON-NLS-1$
}
if(selected && makeSelectedActive(tree)) {
clazz = ExtLibUtil.concatStyleClasses(clazz, "active"); // $NON-NLS-1$
}
return clazz;
}
示例3: getItemStyleClass
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected String getItemStyleClass(TreeContextImpl tree, boolean enabled, boolean selected) {
String clazz = super.getItemStyleClass(tree, enabled, selected);
if(tree.getNode().getType()==ITreeNode.NODE_CONTAINER) {
//clazz = "nav-header";
} else if(tree.getNode().getType()==ITreeNode.NODE_SEPARATOR) {
clazz = "divider"; // $NON-NLS-1$
}
if(!enabled) {
clazz = ExtLibUtil.concatStyleClasses(clazz, "disabled"); // $NON-NLS-1$
}
if(selected) {
clazz = ExtLibUtil.concatStyleClasses(clazz, "active"); // $NON-NLS-1$
}
return clazz;
}
示例4: writeContentColumn
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
//TODO the small size fix has been applied to super class
// if that is delivered, we can delete this method
protected void writeContentColumn(FacesContext context, ResponseWriter w, UIApplicationLayout c, int size, BasicApplicationConfigurationImpl configuration) throws IOException {
if (!isEmptyChildren(c)) {
w.startElement("div", c); // $NON-NLS-1$
String mdCol = (String)getProperty(PROP_COLUMN_MEDIUM);
String smCol = (String)getProperty(PROP_COLUMN_SMALL);
int smallSize = isEmptyComponent(c.getLeftColumn()) ? size : size-1;
smallSize = isEmptyComponent(c.getRightColumn()) ? smallSize : smallSize-1;
String contentClass = ExtLibUtil.concatStyleClasses(mdCol + size, smCol + smallSize);
w.writeAttribute("class", ExtLibUtil.concatStyleClasses(contentClass, "applayout-content"), null); // $NON-NLS-1$ $NON-NLS-2$
renderChildren(context, c);
w.endElement("div"); // $NON-NLS-1$
}
}
示例5: writePagerContent
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void writePagerContent(FacesContext context, ResponseWriter w, AbstractPager _pager, FacesDataIterator dataIterator) throws IOException {
UIPagerExpand pager = (UIPagerExpand) _pager;
w.startElement("div", null); // $NON-NLS-1$
w.startElement("ul", null); // $NON-NLS-1$
String styleClass = pager.getStyleClass();
String pgClass = ExtLibUtil.concatStyleClasses("pagination", styleClass); // $NON-NLS-1$
if (StringUtil.isNotEmpty(pgClass)) {
w.writeAttribute("class", pgClass, null); // $NON-NLS-1$
}
writeCollapseAll(context, w, pager, dataIterator);
writeSeparator(context, w, pager, dataIterator);
writeExpandAll(context, w, pager, dataIterator);
w.endElement("ul"); // $NON-NLS-1$
w.endElement("div"); // $NON-NLS-1$
}
示例6: writeBannerProductlogo
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的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$
}
示例7: writeBanner
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void writeBanner(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration,
String pageWidthClass, boolean navbarInverted, String navbarFixed) throws IOException {
String navbarFixedClass = "";
if(!StringUtil.isEmpty(navbarFixed)){
if(navbarFixed.equals(ResponsiveApplicationConfiguration.NAVBAR_FIXED_TOP)) {
navbarFixedClass = "navbar-fixed-top"; // $NON-NLS-1$
}else if(navbarFixed.equals(ResponsiveApplicationConfiguration.NAVBAR_FIXED_BOTTOM)) {
navbarFixedClass = "navbar-fixed-bottom"; // $NON-NLS-1$
}else if(navbarFixed.equals(ResponsiveApplicationConfiguration.NAVBAR_UNFIXED_TOP)) {
navbarFixedClass = "navbar-static-top"; // $NON-NLS-1$
}
}
w.startElement("div", c); // $NON-NLS-1$
String navClass = ExtLibUtil.concatStyleClasses("navbar", navbarFixedClass); // $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
String invertedClass = navbarInverted ? "navbar-dark bg-inverse" : "navbar-default"; // $NON-NLS-1$ $NON-NLS-2$
navClass = ExtLibUtil.concatStyleClasses(navClass, invertedClass); // $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
navClass = ExtLibUtil.concatStyleClasses(navClass, "applayout-banner"); // $NON-NLS-1$
if(StringUtil.isNotEmpty(navClass)) {
w.writeAttribute("class", navClass, null); // $NON-NLS-1$
}
//container div
w.startElement("div",c); // $NON-NLS-1$
String navbarClass = ExtLibUtil.concatStyleClasses(pageWidthClass, "applayout-banner-container"); // $NON-NLS-1$
w.writeAttribute("class", navbarClass, null); // $NON-NLS-1$
writeBannerContent(context, w, c, configuration);
w.endElement("div"); // $NON-NLS-1$
w.endElement("div"); // $NON-NLS-1$
}
示例8: getItemStyleClass
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected String getItemStyleClass(TreeContextImpl tree, boolean enabled, boolean selected) {
String s = super.getItemStyleClass(tree, enabled, selected);
if(selected) {
return ExtLibUtil.concatStyleClasses(s,(String)getProperty(PROP_MENU_SELECTED));
}
if(!tree.getNode().isEnabled()){
return ExtLibUtil.concatStyleClasses(s,(String)getProperty(PROP_MENU_INACTIVE));
}
return s;
}
示例9: writeGlyphicon
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public void writeGlyphicon(FacesContext context, ResponseWriter w, UIDashboard c, DashNode node) throws IOException{
String glyphicon = node.getIcon();
if(StringUtil.isNotEmpty(glyphicon)) {
String glyphiconTag = node.getIconTag();
String glyphSize = node.getIconSize();
String glyphStyle = node.getIconStyle();
String glyphTitle = node.getIconTitle();
String tag = StringUtil.isNotEmpty(glyphiconTag) ? glyphiconTag : (String)getProperty(PROP_NODE_DEFAULT_GLYPH_TAG);
String size = StringUtil.isNotEmpty(glyphSize) ? (glyphSize.contains("font-size:") ? glyphSize : "font-size:"+glyphSize) : (String)getProperty(PROP_NODE_DEFAULT_GLYPH_SIZE); // $NON-NLS-1$ $NON-NLS-2$
w.startElement(tag, c);
String glyphClazz = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_NODE_DEFAULT_GLYPH_CLASS), glyphicon);
if(StringUtil.isNotEmpty(glyphClazz)) {
w.writeAttribute("class", glyphClazz, null); // $NON-NLS-1$
}
if(StringUtil.isNotEmpty(glyphTitle)) {
w.writeAttribute("title", glyphTitle, null); // $NON-NLS-1$
}
String iconStyle = StringUtil.isNotEmpty(glyphStyle) ? ExtLibUtil.concatStyles(size, glyphStyle) : size;
if(StringUtil.isNotEmpty(iconStyle)) {
w.writeAttribute("style", iconStyle, null); // $NON-NLS-1$
}
w.endElement(tag);
}
}
示例10: getItemStyleClass
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected String getItemStyleClass(TreeContextImpl tree, boolean enabled, boolean selected) {
String value = null;
if (tree.getNodeContext().isFirstNode()) {
value = "lotusFirst"; // $NON-NLS-1$
}
if (tree.getNode() instanceof UserTreeNode) {
value = ExtLibUtil.concatStyleClasses(value, "lotusUser"); // $NON-NLS-1$
}
//value = ExtLibUtil.concatStyleClasses(value, super.getItemStyleClass(tree, enabled, selected));
return value;
}
示例11: writeContentColumn
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeContentColumn(FacesContext context, ResponseWriter w, UIApplicationLayout c, int size, BasicApplicationConfigurationImpl configuration) throws IOException {
if (!isEmptyChildren(c)) {
if (DEBUG) {
w.writeComment("Start Content Column"); // $NON-NLS-1$
newLine(w);
}
w.startElement("div", c); // $NON-NLS-1$
boolean left = !isEmptyComponent(c.getLeftColumn());
boolean right = !isEmptyComponent(c.getRightColumn());
String mdCol = (String)getProperty(PROP_COLUMN_MEDIUM) + size;
String smCol = (String)getProperty(PROP_COLUMN_SMALL) + (size + (left ? -1 : 0) + (right ? -1 : 0)) ;
String contentColClass = "applayout-content"; // $NON-NLS-1$
String colClass = ExtLibUtil.concatStyleClasses(mdCol, smCol);
colClass = ExtLibUtil.concatStyleClasses(colClass, contentColClass);
if (StringUtil.isNotEmpty(colClass)) {
w.writeAttribute("class", colClass, null); // $NON-NLS-1$
}
renderChildren(context, c);
w.endElement("div"); // $NON-NLS-1$
newLine(w); // $NON-NLS-1$
if (DEBUG) {
w.writeComment("End Content Column"); // $NON-NLS-1$
newLine(w);
}
}
}
示例12: getRightColumnClasses
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected String getRightColumnClasses(boolean isLeftCol, boolean isLeftColCollapsible) {
String colClasses = "";
if(isLeftCol) {
colClasses = isLeftColCollapsible ? colClasses : ExtLibUtil.concatStyleClasses(colClasses, COLUMN_SMALL_OFFSET + (Integer)getProperty(PROP_SMALL_LEFT_SIZE));
colClasses = ExtLibUtil.concatStyleClasses(colClasses, COLUMN_SMALL + ((Integer)getProperty(PROP_CONTENT_SIZE) - (isLeftColCollapsible ? 0 : (Integer)getProperty(PROP_SMALL_LEFT_SIZE))));
colClasses = ExtLibUtil.concatStyleClasses(colClasses, COLUMN_MEDIUM_OFFSET + 0);
}else{
colClasses = ExtLibUtil.concatStyleClasses(colClasses, COLUMN_SMALL + (Integer)getProperty(PROP_SMALL_RIGHT_SIZE));
}
colClasses = ExtLibUtil.concatStyleClasses(colClasses, COLUMN_MEDIUM + (Integer)getProperty(PROP_RIGHT_SIZE));
return colClasses;
}
示例13: getContainerStyleClass
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected String getContainerStyleClass(TreeContextImpl node) {
String value = super.getContainerStyleClass(node);
if(StringUtil.isNotEmpty(value)) {
value = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_LINKSLIST_INLINELIST),value);
return value;
}
return (String)getProperty(PROP_LINKSLIST_INLINELIST);
}
示例14: writeTitleBar
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void writeTitleBar(FacesContext context, ResponseWriter w, UIApplicationLayout c,
BasicApplicationConfigurationImpl configuration, String pageWidthClass) throws IOException {
ITree tree = TreeImpl.get(configuration.getTitleBarTabs());
SearchBar searchBar = configuration.getSearchBar();
String titleBarName = configuration.getTitleBarName();
//If there is no titleBarName, seachbar or tabs to be displayed, dont render the titleBar
if (StringUtil.isNotEmpty(titleBarName) || tree != null || (searchBar != null && searchBar.isRendered())) {
w.startElement("div", c); // $NON-NLS-1$
//Check if the titlebar has tabs. If none, add bottom border
if (tree != null) {
w.writeAttribute("class", "navbar navbar-static-top applayout-titlebar", null); // $NON-NLS-1$ $NON-NLS-2$
}else{
w.writeAttribute("class", "navbar navbar-static-top applayout-titlebar applayout-titlebar-border", null); // $NON-NLS-1$ $NON-NLS-2$
}
newLine(w);
//container div
w.startElement("div", c); // $NON-NLS-1$
String titleClass = ExtLibUtil.concatStyleClasses(pageWidthClass, "applayout-titlebar-inner"); // $NON-NLS-1$
w.writeAttribute("class", titleClass , null); // $NON-NLS-1$
writeSearchBar(context, w, c, configuration);
if( StringUtil.isNotEmpty(titleBarName)) {
// #Bootstrap4 Add navbar-brand div around TitleBarName
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class","navbar-brand",null); // $NON-NLS-1$ $NON-NLS-2$
w.startElement("h4",c); //$NON-NLS-1$
if (tree != null) {
w.writeAttribute("class","applayout-titlebar-name",null); // $NON-NLS-1$ $NON-NLS-2$
}else{
w.writeAttribute("class","applayout-titlebar-name applayout-titlebar-name-padding",null); // $NON-NLS-1$ $NON-NLS-2$
}
w.writeAttribute("title",titleBarName,null); // $NON-NLS-1$
w.write(titleBarName);
w.endElement("h4"); //$NON-NLS-1$
w.endElement("div"); // $NON-NLS-1$
}
writeTitleBarTabsArea(context, w, c, configuration);
// Close the banner
w.endElement("div"); // $NON-NLS-1$
w.endElement("div"); // $NON-NLS-1$
}
}
示例15: renderPopupButton
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void renderPopupButton(FacesContext context, ResponseWriter writer, TreeContextImpl tree, boolean enabled, boolean selected) throws IOException {
String clientId = tree.getClientId(context,"ab",1); // $NON-NLS-1$
writer.startElement("button",null); // $NON-NLS-1$
String style = tree.getNode().getStyle();
if(StringUtil.isNotEmpty(style)) {
writer.writeAttribute("style", style, null); // $NON-NLS-1$
}
String styleClass = ExtLibUtil.concatStyleClasses(tree.getNode().getStyleClass(),(String)getProperty(PROP_DROPDOWN_BUTTON_CLASS));
if(StringUtil.isNotEmpty(styleClass)) {
writer.writeAttribute("class", styleClass, null); // $NON-NLS-1$
}
writer.writeAttribute("aria-owns", clientId+MENUID_SUFFIX, null); // $NON-NLS-1$
writer.writeAttribute("aria-haspopup", "true", null); // $NON-NLS-1$ $NON-NLS-2$
writer.writeAttribute("role", "button", null); // $NON-NLS-1$ $NON-NLS-2$
//A popup button requires an id
writer.writeAttribute("id", clientId, null); // $NON-NLS-1$
String image = tree.getNode().getImage();
boolean hasImage = StringUtil.isNotEmpty(image);
if(hasImage) {
writer.startElement("img",null); // $NON-NLS-1$
if(StringUtil.isNotEmpty(image)) {
image = HtmlRendererUtil.getImageURL(context, image);
writer.writeAttribute("src",image,null); // $NON-NLS-1$
String imageAlt = tree.getNode().getImageAlt();
if ( ExtLibRenderUtil.isAltPresent(imageAlt) ) {
writer.writeAttribute("alt",imageAlt,null); // $NON-NLS-1$
}
String imageHeight = tree.getNode().getImageHeight();
if (StringUtil.isNotEmpty(imageHeight)) {
writer.writeAttribute("height",imageHeight,null); // $NON-NLS-1$
}
String imageWidth = tree.getNode().getImageWidth();
if (StringUtil.isNotEmpty(imageWidth)) {
writer.writeAttribute("width",imageWidth,null); // $NON-NLS-1$
}
}
writer.endElement("img"); // $NON-NLS-1$
}
// Render the text
String label = tree.getNode().getLabel();
if(StringUtil.isNotEmpty(label)) {
writer.writeText(label, "label"); // $NON-NLS-1$
}
writer.writeText(" ",null); // $NON-NLS-1$
// Render the popup image (down arrow)
writePopupImage(context, writer, tree);
//writer.endElement("a");
writer.endElement("button"); // $NON-NLS-1$
JSUtil.writeln(writer);
}