當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。