当前位置: 首页>>代码示例>>Java>>正文


Java AbstractOutline类代码示例

本文整理汇总了Java中com.ibm.xsp.extlib.component.outline.AbstractOutline的典型用法代码示例。如果您正苦于以下问题:Java AbstractOutline类的具体用法?Java AbstractOutline怎么用?Java AbstractOutline使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AbstractOutline类属于com.ibm.xsp.extlib.component.outline包,在下文中一共展示了AbstractOutline类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preRenderTree

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected void preRenderTree(FacesContext context, ResponseWriter writer, TreeContextImpl tree) throws IOException {
    AbstractOutline outline = (AbstractOutline)tree.getComponent();
    
    writer.startElement("div", null); // $NON-NLS-1$
    String id = getClientId();
    if(StringUtil.isNotEmpty(id)) {
        writer.writeAttribute("id",id,null); // $NON-NLS-1$
    }
    writer.writeAttribute("role", "tablist", null);  // $NON-NLS-1$ $NON-NLS-2$
    String style = outline.getStyle();
    if(StringUtil.isNotEmpty(style)) {
        writer.writeAttribute("style",style,null); // $NON-NLS-1$
    }
    String styleClass = outline.getStyleClass();
    if(StringUtil.isNotEmpty(styleClass)) {
        writer.writeAttribute("class",styleClass,null); // $NON-NLS-1$
    }

    writer.startElement("div", null); // $NON-NLS-1$
    writer.writeAttribute("id",getInnerId(),null); // $NON-NLS-1$
    writer.writeAttribute("class","xspAccordion panel-group",null); // $NON-NLS-1$ $NON-NLS-2$
    
    writer.write('\n');
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:AccordionRenderer.java

示例2: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(final FacesContext context, final AbstractOutline outline) {
	AceMenuRenderer r = createMenuRenderer(context, outline);
	if(outline instanceof UIOutlineNavigator) {
		UIOutlineNavigator nav = (UIOutlineNavigator)outline;
		r.setExpandable(nav.isExpandable());
		r.setExpandEffect(nav.getExpandEffect());
		//r.setKeepState(nav.isKeepState());
		r.setExpandLevel(nav.getExpandLevel());
	}
	return r;
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:13,代码来源:AceOutlineMenuRenderer.java

示例3: createMenuRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
protected AceMenuRenderer createMenuRenderer(final FacesContext context, final AbstractOutline outline) {
	int type = AceMenuRenderer.TYPE_PILL;
	if(outline!=null) {
		String styleClass = outline.getStyleClass();
		if(StringUtil.isNotEmpty(styleClass) && styleClass.contains("nav-list")) {
			type = AceMenuRenderer.TYPE_LIST;
		}
	}
	return new AceMenuRenderer(outline,type);
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:11,代码来源:AceOutlineMenuRenderer.java

示例4: encodeEnd

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
    super.encodeEnd(context, component);

    ResponseWriter writer = context.getResponseWriter();
    AbstractOutline outline = (AbstractOutline)component;

    // Generate an empty div for the menu to make the event working (partial refresh..)
    JSUtil.writeln(writer);
    writer.startElement("div", outline); // $NON-NLS-1$
    writer.writeAttribute("id", outline.getClientId(context),null); // $NON-NLS-1$
    writer.endElement("div"); // $NON-NLS-1$
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:14,代码来源:DojoOutlineMenuRenderer.java

示例5: preRenderTree

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected void preRenderTree(FacesContext context, ResponseWriter writer, TreeContextImpl tree) throws IOException {
    AbstractOutline outline = (AbstractOutline)tree.getComponent();
    
    UIViewRootEx rootEx = (UIViewRootEx) context.getViewRoot();
    rootEx.setDojoTheme(true);
    rootEx.setDojoParseOnLoad(true);
    
    writer.startElement("div", null); // $NON-NLS-1$
    String id = getClientId();
    if(StringUtil.isNotEmpty(id)) {
        writer.writeAttribute("id",id,null); // $NON-NLS-1$
    }
    
    String dojoType = outline.getDojoType();
    if(StringUtil.isEmpty(dojoType)) {
        dojoType = "dijit.layout.AccordionContainer"; // $NON-NLS-1$
        ExtLibResources.addEncodeResource(rootEx, ExtLibResources.dijitLayoutAccordion);
    }

    String style = outline.getStyle();
    if(StringUtil.isNotEmpty(style)) {
        writer.writeAttribute("style",style,null); // $NON-NLS-1$
    }
    String styleClass = outline.getStyleClass();
    if(StringUtil.isNotEmpty(styleClass)) {
        writer.writeAttribute("class",styleClass,null); // $NON-NLS-1$
    }

    Map<String,String> attrs = DojoRendererUtil.createMap(context);
    DojoRendererUtil.getDojoAttributeMap(outline,attrs);
    initDojoAttributes(context, outline, attrs);
    DojoUtil.addDojoHtmlAttributes(context,dojoType,null,attrs);
    
    writer.write('\n');
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:37,代码来源:DojoAccordionRenderer.java

示例6: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(FacesContext context, AbstractOutline outline) {
	DojoToolbarRenderer r = new DojoToolbarRenderer(outline,outline.getClientId(context));
	if(outline instanceof UIOutlineToolbar) {
		UIOutlineToolbar c = (UIOutlineToolbar)outline;
		r.setShowButtonLabels(c.isShowButtonLabels());
	}
	return r;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:DojoOutlineToolbarRenderer.java

示例7: encodeEnd

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
public void encodeEnd(FacesContext context, UIComponent component)
		throws IOException {
	ResponseWriter writer = context.getResponseWriter();
       if( AjaxUtil.isAjaxNullResponseWriter(writer) ) {
       	return;
       }
	
	AbstractOutline outline = (AbstractOutline)component;
	render(context, outline, writer);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:12,代码来源:AbstractOutlineRenderer.java

示例8: render

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
protected void render(FacesContext context, AbstractOutline outline, ResponseWriter writer) throws IOException {
	ITreeRenderer renderer = findTreeRenderer(context, outline);
	if(renderer != null){
		ITree tree = outline.findTree();
		renderer.render(context, outline, tree, writer);
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:8,代码来源:AbstractOutlineRenderer.java

示例9: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(FacesContext context, AbstractOutline outline) {
    MenuRenderer r = createMenuRenderer(context, outline);
    if(outline instanceof UIOutlineNavigator) {
        UIOutlineNavigator nav = (UIOutlineNavigator)outline;
        r.setExpandable(nav.isExpandable());
        r.setExpandEffect(nav.getExpandEffect());
        //r.setKeepState(nav.isKeepState());
        r.setExpandLevel(nav.getExpandLevel());
    }
    return r;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:OutlineMenuRenderer.java

示例10: createMenuRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
protected MenuRenderer createMenuRenderer(FacesContext context, AbstractOutline outline) {
    int type = MenuRenderer.TYPE_PILL;
    if(outline!=null) {
        String styleClass = outline.getStyleClass();
        if(StringUtil.isNotEmpty(styleClass) && styleClass.contains("nav-list")) { // $NON-NLS-1$
            type = MenuRenderer.TYPE_LIST;
        }
    }
    return new MenuRenderer(outline,type);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:OutlineMenuRenderer.java

示例11: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(FacesContext context, AbstractOutline outline) {
	// ExtLib bug, where the regular outline picks up the accordion theme (style kit family)
	// we hard code a workaround here
	if(outline instanceof UIOutlineGeneric) {
		HtmlListRenderer r = new HtmlListRenderer();
		return r;
	}
    return new com.ibm.xsp.theme.bootstrap.renderkit.html.extlib.outline.tree.AccordionRenderer(outline.getClientId(context));
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:AccordionRenderer.java

示例12: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(FacesContext context, AbstractOutline outline) {
	OneUIMenuRenderer r = createMenuRenderer(context, outline);
	if(outline instanceof UIOutlineNavigator) {
		UIOutlineNavigator nav = (UIOutlineNavigator)outline;
		r.setExpandable(nav.isExpandable());
		r.setExpandEffect(nav.getExpandEffect());
		//r.setKeepState(nav.isKeepState());
		r.setExpandLevel(nav.getExpandLevel());
	}
	return r;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:OneUIOutlineMenuRenderer.java

示例13: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
protected ITreeRenderer findTreeRenderer(FacesContext context,AbstractOutline menu) {
    ITreeRenderer renderer=null;
    if (menu instanceof UIOutlineGeneric) {
        renderer=((UIOutlineGeneric) menu).findTreeRenderer();
        if (renderer!=null){
            return renderer;
        }
        else{
            //by default the accordion is used
            return new MobileNavigatorAccordionRenderer();
        }           
    }
    return new MobileNavigatorAccordionRenderer();
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:15,代码来源:MobileNavigatorRenderer.java

示例14: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(final FacesContext context, final AbstractOutline outline) {
	return new frostillicus.wrapbootstrap.ace1_3.renderkit.outline.tree.AceBreadCrumbsRenderer(outline);
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:5,代码来源:AceBreadCrumbsRenderer.java

示例15: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.AbstractOutline; //导入依赖的package包/类
@Override
protected ITreeRenderer findTreeRenderer(FacesContext context, AbstractOutline outline) {
    DojoMenuRenderer r = new DojoMenuRenderer(outline);
    r.setMenuId(JavaScriptUtil.encodeFunctionName(context,outline,"menu")); // $NON-NLS-1$
    return r;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:7,代码来源:DojoOutlineMenuRenderer.java


注:本文中的com.ibm.xsp.extlib.component.outline.AbstractOutline类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。