本文整理汇总了Java中com.ibm.xsp.extlib.util.ExtLibUtil.concatStyles方法的典型用法代码示例。如果您正苦于以下问题:Java ExtLibUtil.concatStyles方法的具体用法?Java ExtLibUtil.concatStyles怎么用?Java ExtLibUtil.concatStyles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.extlib.util.ExtLibUtil
的用法示例。
在下文中一共展示了ExtLibUtil.concatStyles方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeButtonBar
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeButtonBar(FacesContext context, ResponseWriter w, UIDialogContent dialogContent) throws IOException {
String tag = (String)getProperty(PROP_PANELTAG);
if(StringUtil.isNotEmpty(tag)) {
w.startElement(tag,dialogContent);
String style = ExtLibUtil.concatStyles(dialogContent.getStyle(),(String)getProperty(PROP_PANELSTYLE));
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, "style"); // $NON-NLS-1$ $NON-NLS-2$
}
String styleClass = ExtLibUtil.concatStyleClasses(dialogContent.getStyleClass(),(String)getProperty(PROP_PANELSTYLECLASS));
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class", styleClass, "class"); // $NON-NLS-1$ $NON-NLS-2$
}
}
writeChildren(context, w, dialogContent);
if(StringUtil.isNotEmpty(tag)) {
w.endElement(tag);
}
}
示例2: writeSummaryTitleStyles
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void writeSummaryTitleStyles(FacesContext context, ResponseWriter w, AbstractDataView c, ViewDefinition viewDef, String hideStyle) throws IOException {
String style = viewDef.summaryColumn.getStyle();
if(StringUtil.isEmpty(style)) {
style = (String)getProperty(PROP_SUMMARYTITLESTYLE);
}
style = ExtLibUtil.concatStyles(style, hideStyle);
String styleClass = viewDef.summaryColumn.getStyleClass();
if(StringUtil.isEmpty(styleClass)) {
styleClass = (String)getProperty(PROP_SUMMARYTITLECLASS);
}
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class",styleClass,null); // $NON-NLS-1$
}
w.writeAttribute("style",style,null); // $NON-NLS-1$
}
示例3: writeSummaryTitleStyles
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeSummaryTitleStyles(FacesContext context, ResponseWriter w, AbstractDataView c, ViewDefinition viewDef, String hideStyle) throws IOException {
String style = viewDef.summaryColumn.getStyle();
if(StringUtil.isEmpty(style)) {
style = (String)getProperty(PROP_SUMMARYTITLESTYLE);
}
style = ExtLibUtil.concatStyles(style, hideStyle);
String styleClass = viewDef.summaryColumn.getStyleClass();
if(StringUtil.isEmpty(styleClass)) {
styleClass = (String)getProperty(PROP_SUMMARYTITLECLASS);
}
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class",styleClass,null); // $NON-NLS-1$
}
style = ExtLibUtil.concatStyles("margin: 0",style); // $NON-NLS-1$
w.writeAttribute("style",style,null); // $NON-NLS-1$
}
示例4: writeNodeBadge
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public void writeNodeBadge(FacesContext context, ResponseWriter w, UIDashboard c, DashNode node) throws IOException{
String badgeLabel = node.getBadgeLabel();
String badgeStyle = node.getBadgeStyle();
String badgeClass = node.getBadgeStyleClass();
w.startElement((String)getProperty(PROP_NODE_DEFAULT_BADGE_TAG), c);
String badgeClazz = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_NODE_DEFAULT_BADGE_CLASS), badgeClass);
if(StringUtil.isNotEmpty(badgeClazz)) {
w.writeAttribute("class", badgeClazz, null); // $NON-NLS-1$
}
String badgeMixinStyle = ExtLibUtil.concatStyles((String)getProperty(PROP_NODE_DEFAULT_BADGE_STYLE), badgeStyle);
if(StringUtil.isNotEmpty(badgeMixinStyle)) {
w.writeAttribute("style", badgeMixinStyle, null); // $NON-NLS-1$
}
if(StringUtil.isNotEmpty(badgeLabel)) {
w.writeText(badgeLabel, null);
}
w.endElement((String)getProperty(PROP_NODE_DEFAULT_BADGE_TAG));
}
示例5: writeLegalLogo
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeLegalLogo(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
String logoImg=configuration.getLegalLogo();
if(StringUtil.isNotEmpty(logoImg)) {
w.startElement("span", c); // $NON-NLS-1$
String clazz=configuration.getLegalLogoClass();
if(StringUtil.isNotEmpty(clazz)) {
w.writeAttribute("class", clazz, null); // $NON-NLS-1$
}
String style=ExtLibUtil.concatStyles("float:left;vertical-align:middle;margin-right: 5px;", configuration.getLegalLogoStyle()); // $NON-NLS-1$
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, null); // $NON-NLS-1$
}
String imgSrc=HtmlRendererUtil.getImageURL(context, logoImg);
w.startElement("img", c); // $NON-NLS-1$
w.writeURIAttribute("src", imgSrc, null); // $NON-NLS-1$
String logoAlt=configuration.getLegalLogoAlt();
if(!ExtLibRenderUtil.isAltPresent(logoAlt)) {
logoAlt = com.ibm.xsp.extlib.controls.ResourceHandler.getString("AbstractApplicationLayoutRenderer.LegalLogo"); // $NON-NLS-1$
}
w.writeAttribute("alt", logoAlt, null); // $NON-NLS-1$
String width=configuration.getLegalLogoWidth();
if(StringUtil.isNotEmpty(width)) {
w.writeAttribute("width", width, null); // $NON-NLS-1$
}
String height=configuration.getLegalLogoHeight();
if(StringUtil.isNotEmpty(height)) {
w.writeAttribute("height", height, null); // $NON-NLS-1$
}
w.endElement("img"); // $NON-NLS-1$
w.endElement("span"); // $NON-NLS-1$
}
}
示例6: writeContent
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
/**
* The superclass's method is hard-coded to be a UL, which we don't want
*/
@Override
protected void writeContent(final FacesContext context, final ResponseWriter w, final AbstractDataView c, final ViewDefinition viewDef) throws IOException {
w.startElement("div", c);
// styleClass
String userStyleClass = c.getStyleClass();
String defaultStyleClass = (String)getProperty(PROP_MAINLISTCLASS);
String styleClass = ExtLibUtil.concatStyleClasses(userStyleClass, defaultStyleClass);
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class", styleClass, null);
}
// style
String userStyle = c.getStyle();
String defaultStyle = (String)getProperty(PROP_MAINLISTSTYLE);
String style = ExtLibUtil.concatStyles(userStyle, defaultStyle);
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, null);
}
newLine(w);
// And the rows
int first = c.getFirst();
int count = c.getRows();
writeRows(context, w, c, viewDef, first, count);
w.endElement("div"); // div.dialogs
newLine(w);
}
示例7: writeSummary
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void writeSummary(FacesContext context, ResponseWriter w,
AbstractDataView c, ViewDefinition viewDef) throws IOException {
if (viewDef.summaryColumn == null && viewDef.summaryFacet == null) {
return;
}
// Add the enclosing tag
if (viewDef.summaryFacet == null) {
w.startElement("div", c); // $NON-NLS-1$
String styleClass = ExtLibUtil.concatStyleClasses(
(String) getProperty(PROP_SUMMARYCOLSTYLECLASS),
viewDef.summaryColumn.getStyleClass());
if (StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
}
String style = ExtLibUtil.concatStyles(
(String) getProperty(PROP_SUMMARYCOLSTYLE),
viewDef.summaryColumn.getStyle());
if (StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, null); // $NON-NLS-1$
}
writeColumnValue(context, w, c, viewDef, viewDef.summaryColumn);
w.endElement("div"); // $NON-NLS-1$
}
else {
// Write the content column
FacesUtil.renderChildren(context, viewDef.summaryFacet);
}
}
示例8: writeNodeLabel
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public void writeNodeLabel(FacesContext context, ResponseWriter w, UIDashboard c, DashNode node) throws IOException{
String labelText = node.getLabelText();
if(StringUtil.isNotEmpty(labelText)) {
String labelLink = node.getLabelHref();
String labelStyle = node.getLabelStyle();
String labelClass = node.getLabelStyleClass();
boolean badgeEnabled = node.isBadgeEnabled();
boolean isLink = StringUtil.isNotEmpty(labelLink);
boolean isDisplayAsLink = node.isDisplayNodeAsLink();
//Add link tag if href is set and node is not wrapped in a link
if(!isDisplayAsLink && isLink) {
//add anchor tag for title link
w.startElement("a", c);
RenderUtil.writeLinkAttribute(context,w, labelLink);
}
w.startElement((String)getProperty(PROP_NODE_TITLE_TAG), c);
String titleClazz = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_NODE_TITLE_CLASS), labelClass);
if(StringUtil.isNotEmpty(titleClazz)) {
w.writeAttribute("class", titleClazz, null); // $NON-NLS-1$
}
String titleMixinStyle = ExtLibUtil.concatStyles((String)getProperty(PROP_NODE_TITLE_STYLE), labelStyle);
if(StringUtil.isNotEmpty(titleMixinStyle)) {
w.writeAttribute("style", titleMixinStyle, null); // $NON-NLS-1$
}
w.writeText(labelText, null);
if(badgeEnabled){
writeNodeBadge(context, w, c, node);
}
w.endElement((String)getProperty(PROP_NODE_TITLE_TAG));
if(!isDisplayAsLink && isLink) {
w.endElement("a");
}
}
}
示例9: startRenderContainer
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void startRenderContainer(FacesContext context, ResponseWriter writer, TreeContextImpl tree) throws IOException {
String containerTag = getContainerTag();
if(StringUtil.isNotEmpty(containerTag)) {
writer.startElement(containerTag,null);
String style = null;
String styleClass = null;
if(tree.getDepth()==1) {
// ac: LHEY92PFY3 - A11Y | RPT | xc:viewMenu : ID values must be unique
if (!tree.isOuterTagEmitted()) {
String id = getClientId(context,tree);
if(StringUtil.isNotEmpty(id)) {
writer.writeAttribute("id",id,null); // $NON-NLS-1$
}
}
UIComponent c = tree.getComponent();
if(c!=null) {
style = (String)c.getAttributes().get("style"); //$NON-NLS-1$
styleClass = (String)c.getAttributes().get("styleClass");//$NON-NLS-1$
}
}
style = ExtLibUtil.concatStyles(style,getContainerStyle(tree));
if(StringUtil.isNotEmpty(style)) {
writer.writeAttribute("style",style,null); // $NON-NLS-1$
}
styleClass = ExtLibUtil.concatStyleClasses(styleClass,getContainerStyleClass(tree));
if(StringUtil.isNotEmpty(styleClass)) {
writer.writeAttribute("class",styleClass,null); // $NON-NLS-1$
}
writer.writeAttribute("role", "toolbar", null); // $NON-NLS-1$ $NON-NLS-2$
writer.writeAttribute("aria-label", "sort", null); // $NON-NLS-1$ $NLS-OneUIv302SortLinksRenderer.sort-2$
JSUtil.writeln(writer);
}
}
示例10: placeHolderEncodeBegin
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public void placeHolderEncodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
ResponseWriter w = context.getResponseWriter();
UIDialog dialog = (UIDialog)component;
// Add the dojo module
UIViewRootEx rootEx = (UIViewRootEx)context.getViewRoot();
ExtLibResources.addEncodeResource(rootEx, getDefaultDojoModule(context,dialog));
rootEx.setDojoParseOnLoad(true);
rootEx.setDojoTheme(true);
String clientId = component.getClientId(context);
w.startElement("span", component); // $NON-NLS-1$
Map<String,String> attrs = DojoRendererUtil.createMap(context);
String dojoType = getPlaceHolderWrapperType(); // $NON-NLS-1$
attrs.put("dialogId", clientId); // $NON-NLS-1$ $NON-NLS-2$
DojoRendererUtil.writeDojoHtmlAttributes(context, component, dojoType, attrs);
String style = ExtLibUtil.concatStyles("display:none", dialog.getStyle()); // $NON-NLS-1$
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, null); // $NON-NLS-1$
}
String styleClass = dialog.getStyleClass();
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
}
w.startElement("span", component); // $NON-NLS-1$
w.writeAttribute("id", clientId, "id"); // $NON-NLS-1$ $NON-NLS-2$
w.endElement("span"); // $NON-NLS-1$
w.endElement("span"); // $NON-NLS-1$
}
示例11: writeForumPost
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeForumPost(FacesContext context, ResponseWriter w, UIForumPost c) throws IOException {
w.startElement("div", c); // $NON-NLS-1$
String style = c.getStyle();
if(StringUtil.isEmpty(style)) {
style = (String)getProperty(PROP_MAINSTYLE);
}
// We add a fix to the style, in case it is embedded within a forum view
if(isInForumView(c)) {
style = ExtLibUtil.concatStyles(style,(String)getProperty(PROP_MAINSTYLEVIEWFIX));
}
if(StringUtil.isNotEmpty(style)) {
w.writeAttribute("style", style, null); // $NON-NLS-1$
}
String styleClass = c.getStyleClass();
if(StringUtil.isEmpty(styleClass)) {
styleClass = (String)getProperty(PROP_MAINCLASS);
}
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
}
writeAuthor(context, w, c);
writePost(context, w, c);
w.endElement("div"); // $NON-NLS-1$
}
示例12: 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);
}
}
示例13: getItemStyle
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected String getItemStyle(TreeContextImpl tree, boolean enabled, boolean selected) {
String style = super.getItemStyle();
return ExtLibUtil.concatStyles(style, "list-style-type: none;"); // $NON-NLS-1$
}
示例14: writeCategoryColumn
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeCategoryColumn(FacesContext context, ResponseWriter w, AbstractDataView c, ViewDefinition viewDef) throws IOException {
w.startElement("th",c); // $NON-NLS-1$
w.writeAttribute("scope", "row", null); // $NON-NLS-1$ $NON-NLS-2$
w.writeAttribute("role", "gridcell", null); // $NON-NLS-1$ $NON-NLS-2$
int colSpan = (viewDef.nColumns)*(viewDef.multiColumnCount);
if(colSpan>1) {
w.writeAttribute("colspan",colSpan,null); // $NON-NLS-1$
}
w.startElement("h4",c); // $NON-NLS-1$
int categoryListIndex = findCategoryListIndex(context, c, viewDef, viewDef.categoryColumns);
CategoryColumn categoryColumn = null;
if( -1 != categoryListIndex){
categoryColumn = viewDef.categoryColumns.get(categoryListIndex);
}
if(categoryColumn!=null) {
String styleClass = categoryColumn.getStyleClass();
if(StringUtil.isNotEmpty(styleClass)) {
w.writeAttribute("class",styleClass,null); // $NON-NLS-1$
}
int indentLevel = getIndentLevel(viewDef);
String indentStyle = getIndentStyle(context,c,viewDef,categoryListIndex, indentLevel);
String style = categoryColumn.getStyle();
style = ExtLibUtil.concatStyles(indentStyle,style);
// Ensure that the h4 margin is reset to 0
style = ExtLibUtil.concatStyles("margin:0;",style); // $NON-NLS-1$
w.writeAttribute("style",style,null); // $NON-NLS-1$
} else {
// Ensure that the h4 margin is reset to 0
w.writeAttribute("style","margin: 0",null); // $NON-NLS-1$ $NON-NLS-2$
}
// Expand/collapse icon
if(viewDef.collapsibleCategory) {
writeExpandCollapseIcon(context, w, c, viewDef);
}
if(categoryColumn!=null) {
UIComponent categoryFacet = getCategoryRowFacet(c,categoryListIndex);
if(categoryFacet!=null) {
FacesUtil.renderChildren(context, categoryFacet);
}else{
writeColumnValue(context, w, c, viewDef, categoryColumn);
}
}
w.endElement("h4"); // $NON-NLS-1$
w.endElement("th"); // $NON-NLS-1$
// We mark all the columns as being written
viewDef.currentColumn = viewDef.multiColumnCount;
}
示例15: writeFormLayout
import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void writeFormLayout(FacesContext context, ResponseWriter w, FormLayout c) throws IOException {
ComputedFormData formData = createFormData(context, c);
String style = c.getStyle();
String styleClass = c.getStyleClass();
boolean nested = formData.isNested();
if(!nested) {
w.startElement("fieldset", c); // $NON-NLS-1$
} else {
w.startElement("div", c); // $NON-NLS-1$
style = ExtLibUtil.concatStyles("margin-left: -25px; margin-right: 0px;", style); // $NON-NLS-1$
}
String clientId = c.getClientId(context);
w.writeAttribute("id", clientId, "clientId"); // $NON-NLS-1$ $NON-NLS-2$
if(!StringUtil.isEmpty(style)) {
w.writeAttribute("style", style, null); // $NON-NLS-1$
}
if(!StringUtil.isEmpty(styleClass)) {
w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
}
if(!nested){
String legend = c.getLegend();
if(StringUtil.isNotEmpty(legend)) {
w.startElement("legend", c); // $NON-NLS-1$
w.writeText(legend, "legend"); // $NON-NLS-1$
w.endElement("legend"); // $NON-NLS-1$
}
}
newLine(w);
// TODO the xe:formTable is using a HTML TABLE element, but the latest OneUI uses DIVs instead
// as they're better for accessibility. This implementation should be changed to use DIVs
// before the control is published. See http://rtpgsa.ibm.com/projects/o/oneui/development/OneUI_3.0.0_rc1/docPublic/components/forms.htm
// TODO the OneUI spec now has recommendations for subsections in the form control
// where as for the initial TeamRoom implementation
// we recommended using an inner xe:formTable control within an xe:formRow
// Should use the new recommended form table format, with support for sections,
// collapsible sections, and tabs.
// See http://rtpgsa.ibm.com/projects/o/oneui/development/OneUI_3.0.0_rc1/docPublic/components/forms.htm
// TODO the table summary, and other table accessibility attributes
w.startElement("table", c); // $NON-NLS-1$
writeMainTableTag(context, w, c);
w.startElement("tbody", c); // $NON-NLS-1$
newLine(w);
writeErrorSummary(context, w, c, formData);
writeHeader(context, w, c);
writeForm(context, w, c, formData);
writeFooter(context, w, c);
w.endElement("tbody"); // $NON-NLS-1$
newLine(w);
w.endElement("table"); // $NON-NLS-1$
newLine(w);
if(!nested) {
w.endElement("fieldset"); // $NON-NLS-1$
} else {
w.endElement("div"); // $NON-NLS-1$
}
newLine(w);
}