本文整理汇总了Java中com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl.getTitleBarName方法的典型用法代码示例。如果您正苦于以下问题:Java BasicApplicationConfigurationImpl.getTitleBarName方法的具体用法?Java BasicApplicationConfigurationImpl.getTitleBarName怎么用?Java BasicApplicationConfigurationImpl.getTitleBarName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl
的用法示例。
在下文中一共展示了BasicApplicationConfigurationImpl.getTitleBarName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writeTitleBar(final FacesContext context, final ResponseWriter w, final UIApplicationLayout layout, final BasicApplicationConfigurationImpl config) throws IOException {
List<ITreeNode> placeBarActions = config.getPlaceBarActions();
String title = config.getTitleBarName();
String subtitle = config.getPlaceBarName();
if(!(placeBarActions == null || placeBarActions.isEmpty()) || StringUtil.isNotEmpty(title) || StringUtil.isNotEmpty(subtitle)) {
w.startElement("div", layout);
w.writeAttribute("class", "page-header", null);
// Write out any placebar actions
ITree tree = TreeImpl.get(placeBarActions);
if(tree != null) {
newLine(w);
w.startElement("div", layout);
w.writeAttribute("class", "pull-right", null);
newLine(w);
AbstractTreeRenderer renderer = new AcePlaceBarLinksRenderer();
renderer.render(context, layout, "al", tree, w);
newLine(w);
w.endElement("div");
}
// Write out the titles
if(StringUtil.isNotEmpty(title) || StringUtil.isNotEmpty(subtitle)) {
w.startElement("h1", layout);
if(StringUtil.isNotEmpty(title)) {
w.writeText(title, null);
}
if(StringUtil.isNotEmpty(subtitle)) {
newLine(w);
w.startElement("small", null);
newLine(w);
w.startElement("i", null);
w.writeAttribute("class", "ace-icon fa fa-double-angle-right", null);
w.endElement("i");
newLine(w);
w.writeText(subtitle, null);
w.endElement("small");
}
w.endElement("h1");
}
w.endElement("div");
}
}
示例2: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writeTitleBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
// <div class="lotusTitleBar"> or <header class="lotusTitleBar">
String titleBarTag = (String)getProperty(PROP_TITLEBARTAG);
String titleBarClass = null;
String titleBarName = configuration.getTitleBarName();
if( StringUtil.isNotEmpty(titleBarTag) ){
w.startElement(titleBarTag,c); // $NON-NLS-1$
if( StringUtil.isNotEmpty(titleBarName)) {
w.writeAttribute("role", "region", null); // $NON-NLS-1$ $NON-NLS-2$
String tbName_id = StringUtil.format("{0}_tbName", c.getClientId(context)); // $NON-NLS-1$
w.writeAttribute("aria-labelledby", tbName_id, null); // $NON-NLS-1$
}
titleBarClass = (String)getProperty(PROP_TITLEBARCLASS);
if( StringUtil.isNotEmpty(titleBarClass) ){
w.writeAttribute("class",titleBarClass,null); // $NON-NLS-1$
}
newLine(w);
}
// <div class="lotusRightCorner">
w.startElement("div",c); // $NON-NLS-1$
String titleBarTrailingCornerClass = (String)getProperty(PROP_TITLEBARTRAILINGCORNERCLASS);
if( StringUtil.isNotEmpty(titleBarTrailingCornerClass) ){
w.writeAttribute("class",titleBarTrailingCornerClass,null); // $NON-NLS-1$
}
newLine(w);
// <div class="lotusInner">
w.startElement("div",c); // $NON-NLS-1$
String titleBarInnerClass = (String)getProperty(PROP_TITLEBARINNERCLASS);
if( StringUtil.isNotEmpty(titleBarInnerClass) ){
w.writeAttribute("class",titleBarInnerClass,null); // $NON-NLS-1$
}
newLine(w);
// (2012-05-22 updated to wrap the h2 tag as well as the tabs)
// <div class="lotusTitleBarContent">
w.startElement("div", null); //$NON-NLS-1$
// TODO this is using a OneUI v3 style class in a OneUI v2 renderer
w.writeAttribute("class", "lotusTitleBarContent", null); // $NON-NLS-1$ //$NON-NLS-2$
if( StringUtil.isNotEmpty(titleBarName)) {
w.startElement("h2",c); //$NON-NLS-1$
String id = StringUtil.format("{0}_tbName", c.getClientId(context)); // $NON-NLS-1$
w.writeAttribute("id", id, null); // $NON-NLS-1$
String titleBarNameClass = (String)getProperty(PROP_TITLEBARNAMECLASS);
if( StringUtil.isNotEmpty(titleBarNameClass) ){
w.writeAttribute("class",titleBarNameClass,null); // $NON-NLS-1$
}
if(ThemeUtil.isOneUIVersionAtLeast(context, 2, 1)) {
// We need this because we have <h2> under <form>
// TODO hard-coded style should be in a .css file.
w.writeAttribute("style","margin: 0",null); // $NON-NLS-1$ $NON-NLS-2$
}
w.write(titleBarName);
w.endElement("h2"); //$NON-NLS-1$
newLine(w);
}
writeTitleBarTabsArea(context, w, c, configuration);
// </div> <!-- end lotusTitleBarContent -->
w.endElement("div"); //$NON-NLS-1$
// And the search bar
writeSearchBar(context, w, c, configuration);
// Close the titlebar
// </div> <!-- end lotusInner -->
w.endElement("div"); newLine(w,titleBarInnerClass); // $NON-NLS-1$
// </div> <!-- end lotusRightCorner -->
w.endElement("div"); newLine(w,titleBarTrailingCornerClass); // $NON-NLS-1$
// </div> <!-- end lotusTitleBar -->
if( StringUtil.isNotEmpty(titleBarTag) ){
w.endElement(titleBarTag); newLine(w,titleBarClass); // $NON-NLS-1$
}
}
示例3: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
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();
UIComponent searchBarFacet = c.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()) || null != searchBarFacet) {
String titleBarTag = (String)getProperty(PROP_TITLEBARTAG);
w.startElement(titleBarTag,c); // $NON-NLS-1$
w.writeAttribute("role", "region", null); // $NON-NLS-1$ $NON-NLS-2$
// Set A11y properties for the title bar
String tbName_id = StringUtil.format("{0}_tbName", c.getClientId(context)); // $NON-NLS-1$
if( StringUtil.isNotEmpty(titleBarName) ) {
// if titleBarName has been set = add aria-labelledby prop with id of titleBarName
w.writeAttribute("aria-labelledby", tbName_id, null); // $NON-NLS-1$
}
String titleBarLabel = configuration.getTitleBarLabel();
// if aria label has been set on title bar = add aria-label prop
// if no aria label set, but titleBarName is set = add aria-label prop with titleBarName text value
// if no aira label set, and no titleBarName set = add aria-label prop with default value
String titleBarAriaLabel = (StringUtil.isNotEmpty(titleBarLabel) ? titleBarLabel
: (StringUtil.isNotEmpty(titleBarName) ? ""
: (String)getProperty(PROP_TITLEBARARIALABEL)));
if( StringUtil.isNotEmpty(titleBarAriaLabel)) {
w.writeAttribute("aria-label", titleBarAriaLabel, null); // $NON-NLS-1$
}
//Check if the titlebar has tabs. If none, add bottom border
String titleBarClass = (String)getProperty(PROP_TITLEBARCLASS);
if(tree == null){
titleBarClass = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_TITLEBARCLASS), "applayout-titlebar-border"); // $NON-NLS-1$
}
if( StringUtil.isNotEmpty(titleBarClass) ){
w.writeAttribute("class",titleBarClass,null); // $NON-NLS-1$
}
//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)) {
w.startElement("h4",c); //$NON-NLS-1$
w.writeAttribute("id", tbName_id, null); // $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$
newLine(w);
}
writeTitleBarTabsArea(context, w, c, configuration);
// Close the banner
w.endElement("div"); // $NON-NLS-1$
w.endElement("div"); // $NON-NLS-1$
}
}
示例4: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
@Override
protected void writeTitleBar(FacesContext context, ResponseWriter w,
UIApplicationLayout c,
BasicApplicationConfigurationImpl configuration) throws IOException {
// <div class="lotusTitleBar"> or <header class="lotusTitleBar">
String titleBarTag = (String)getProperty(PROP_TITLEBARTAG);
String titleBarClass = null;
if( StringUtil.isNotEmpty(titleBarTag) ){
w.startElement(titleBarTag,c); // $NON-NLS-1$
titleBarClass = (String)getProperty(PROP_TITLEBARCLASS);
if( StringUtil.isNotEmpty(titleBarClass) ){
w.writeAttribute("class",titleBarClass,null); // $NON-NLS-1$
}
newLine(w);
}
// <div class="lotusRightCorner">
w.startElement("div",c); // $NON-NLS-1$
String titleBarTrailingCornerClass = (String)getProperty(PROP_TITLEBARTRAILINGCORNERCLASS);
if( StringUtil.isNotEmpty(titleBarTrailingCornerClass) ){
w.writeAttribute("class",titleBarTrailingCornerClass,null); // $NON-NLS-1$
}
newLine(w);
// <div class="lotusInner">
w.startElement("div",c); // $NON-NLS-1$
String titleBarInnerClass = (String)getProperty(PROP_TITLEBARINNERCLASS);
if( StringUtil.isNotEmpty(titleBarInnerClass) ){
w.writeAttribute("class",titleBarInnerClass,null); // $NON-NLS-1$
}
newLine(w);
String titleBarName = configuration.getTitleBarName();
if( StringUtil.isNotEmpty(titleBarName)) {
w.startElement("h2",c);//$NON-NLS-1$
String titleBarNameClass = (String)getProperty(PROP_TITLEBARNAMECLASS);
if( StringUtil.isNotEmpty(titleBarNameClass) ){
w.writeAttribute("class",titleBarNameClass,null); // $NON-NLS-1$
}
String titleHeaderImg = (String)getProperty(PROP_BLANKIMG);
w.startElement("img", c); // $NON-NLS-1$
w.writeAttribute("alt","", null); // note, empty differs from absent //$NON-NLS-1$ //$NON-NLS-2$
w.writeAttribute("class", "lotusIcon yourProductSprite yourProductSprite-iconPlaceholder16", null); // $NON-NLS-1$ // $NON-NLS-2$
w.writeAttribute("src", HtmlRendererUtil.getImageURL(context,titleHeaderImg), null); // $NON-NLS-1$
w.startElement("span", c); // $NON-NLS-1$
w.writeAttribute("class", "lotusText", null); // $NON-NLS-1$ // $NON-NLS-2$
w.write(titleBarName);
w.endElement("span"); // $NON-NLS-1$
w.endElement("h2"); // $NON-NLS-1$
newLine(w);
}
writeTitleBarTabsArea(context, w, c, configuration);
// And the search bar
writeSearchBar(context, w, c, configuration);
// Close the titlebar
// </div> <!-- end lotusInner -->
w.endElement("div"); newLine(w,titleBarInnerClass); // $NON-NLS-1$
// </div> <!-- end lotusRightCorner -->
w.endElement("div"); newLine(w,titleBarTrailingCornerClass); // $NON-NLS-1$
// </div> <!-- end lotusTitleBar -->
if( StringUtil.isNotEmpty(titleBarTag) ){
w.endElement(titleBarTag); newLine(w,titleBarClass); // $NON-NLS-1$
}
}
示例5: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的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$
}
}