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


Java UIOutlineNavigator类代码示例

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


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

示例1: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.UIOutlineNavigator; //导入依赖的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

示例2: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.UIOutlineNavigator; //导入依赖的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

示例3: findTreeRenderer

import com.ibm.xsp.extlib.component.outline.UIOutlineNavigator; //导入依赖的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

示例4: preRenderTree

import com.ibm.xsp.extlib.component.outline.UIOutlineNavigator; //导入依赖的package包/类
@Override
    protected void preRenderTree(FacesContext context, ResponseWriter writer, TreeContextImpl tree) throws IOException {
        // Add the JS support if necessary
//        if(isExpandable()) {
//            UIViewRootEx rootEx = (UIViewRootEx) context.getViewRoot();
//            rootEx.setDojoTheme(true);
//            ExtLibResources.addEncodeResource(rootEx, OneUIResources.oneUINavigator);
//            // Specific dojo effects
//            String effect = getExpandEffect();
//            if(StringUtil.isNotEmpty(effect)) {
//                rootEx.addEncodeResource(ExtLibResources.dojoFx);
//                ExtLibResources.addEncodeResource(rootEx, ExtLibResources.dojoFx);
//            }
//        }
        writer.startElement("div", null); // $NON-NLS-1$
        writer.writeAttribute("class", (String)getProperty(PROP_MENU_MENU),null); // $NON-NLS-1$
        // Accessibility
        writer.writeAttribute("role", "tree",null); // $NON-NLS-1$ $NON-NLS-2$

        UIComponent component = tree.getComponent();
        UIOutlineNavigator tcomponent = component instanceof UIOutlineNavigator ? (UIOutlineNavigator)component : null;

        // aria-label
        String ariaLabel = "";
        if (tcomponent != null) {
            ariaLabel = tcomponent.getAriaLabel();
        }
        if (StringUtil.isNotEmpty(ariaLabel)) {
            writer.writeAttribute("aria-label", ariaLabel, null); // $NON-NLS-1$
        }

        writeClientIdIfNecessary(context, writer, tree);
        writer.startElement("div", null); // $NON-NLS-1$
        writer.writeAttribute("class", (String)getProperty(PROP_MENU_BOTTOMCORNER),null); // $NON-NLS-1$
        writer.startElement("div", null); // $NON-NLS-1$
        writer.writeAttribute("class", (String)getProperty(PROP_MENU_INNER),null); // $NON-NLS-1$ $NON-NLS-2$
        if(ThemeUtil.isOneUIVersionAtLeast(context, 2, 1)) {
            // Should actually be for OneUI 3.0
            writer.startElement("header", null); // $NON-NLS-1$
            writer.writeAttribute("class", (String)getProperty(PROP_MENU_HEADER),null); // $NON-NLS-1$ $NON-NLS-2$
        }
    }
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:43,代码来源:MenuRenderer.java

示例5: startRenderContainer

import com.ibm.xsp.extlib.component.outline.UIOutlineNavigator; //导入依赖的package包/类
@Override
protected void startRenderContainer(FacesContext context, ResponseWriter writer, TreeContextImpl tree) throws IOException {
    String containerTag = getContainerTag();
    if (StringUtil.isNotEmpty(containerTag)) {
        writer.startElement(containerTag, null);
        writer.writeAttribute("role", "tree", null); // $NON-NLS-1$ $NON-NLS-2$
        // aria label
        UIComponent component = tree.getComponent();
        UIOutlineNavigator tcomponent = component instanceof UIOutlineNavigator ? (UIOutlineNavigator)component : null;
        // "Navigation menu"
        String ariaLabel = com.ibm.xsp.extlib.controls.ResourceHandler.getString("MenuRenderer.Navigationmenu"); // $NON-NLS-1$
        if (tcomponent != null) {
            ariaLabel = tcomponent.getAriaLabel();
        }
        if (StringUtil.isNotEmpty(ariaLabel)) {
            writer.writeAttribute("aria-label", ariaLabel, null); // $NON-NLS-1$
        }
        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$
        }
        JSUtil.writeln(writer);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:45,代码来源:MenuRenderer.java


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