本文整理汇总了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');
}
示例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;
}
示例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);
}
示例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$
}
示例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');
}
示例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;
}
示例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);
}
示例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);
}
}
示例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;
}
示例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);
}
示例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));
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}