⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _tree__jsp.java

📁 JSP聊天系统
💻 JAVA
字号:
/*
 * JSP generated by Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
 */

package _example;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import org.ehotsoft.yekki.widget.tree.*;
import org.ehotsoft.yekki.util.ParamUtil;

public class _tree__jsp extends com.caucho.jsp.JavaPage{
  private boolean _caucho_isDead;
  	
	private final String bullet = "<font color='#666666'>&#149;</font>";

  
	
	private final String printTree( Tree tree ) {

		StringBuffer buf = new StringBuffer();
		
		for( int i=0; i<tree.size(); i++ ) {
		
			TreeObject treeObject = tree.getChild(i);
			
			if( treeObject.getType() == tree.NODE ) {
				
				TreeNode node = (TreeNode)treeObject;
				buf.append( printNodeHTML(tree,node) );
				
				if( node.isVisible() ) {
					buf.append( printTree( node.getChildren() ) );
				}
			}
			else {
				TreeLeaf leaf = (TreeLeaf)treeObject;
				buf.append( printLeafHTML(leaf) );
			}
		}

		return buf.toString();
	}
	
	private final String printNodeHTML( Tree tree, TreeNode node ) 
	{
		StringBuffer buf = new StringBuffer();

		buf.append( "<table cellpadding='3' cellspacing='0' border='0' width='100%'><td width='1%'>" );
		buf.append( "<a href='Tree.jsp?flip=" ).append(node.getId()).append("&tree=").append(tree.getName()).append("'>" );
		
		if( node.isVisible() ) {
		
			buf.append( "<img src='images/minus.gif' width='11' height='11' border='0'>" );
		}
		else {
			
			buf.append( "<img src='images/plus.gif' width='11' height='11' border='0'>" );
		}

		buf.append( "</a>" );
		buf.append( "</td><td width='99%' class='sidebarNode'><font size='-1'>" );
		
		String link = node.getLink();
		
		if( link != null ) {
		
			buf.append( "<a href='").append(link).append("' target='main' class='sidebarLink'>" )
			   .append( node.getName() ).append( "</a>" );
		}
		else {
			
			buf.append( node.getName() );
		}

		buf.append( "</font></td></table>" );
		
		return buf.toString();
	}
	
	private final String printLeafHTML( TreeLeaf leaf ) {
		
		StringBuffer buf = new StringBuffer();
		
		buf.append( "<table cellpadding='3' cellspacing='0' border='0' width='100%'><td width='1%'>" );
		buf.append( "<img src='images/blank.gif' width='11' height='11' border='0'>" );
		buf.append( "</td><td width='1%'>").append(bullet).append("</td><td width='98%' class='sidebarLeaf'>" );
		buf.append( "<a href='" ).append( leaf.getLink() ).append( "' target='main' class='sidebarLink'>" );
		buf.append( leaf.getName() );
		buf.append( "</a></td></table>" );
		
		return buf.toString();
	}

  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    com.caucho.jsp.QPageContext pageContext = (com.caucho.jsp.QPageContext) com.caucho.jsp.QJspFactory.create().getPageContext(this, request, response, null, true, 8192, true);
    javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.http.HttpSession session = pageContext.getSession();
    javax.servlet.ServletContext application = pageContext.getServletContext();
    response.setContentType("text/html");
    try {
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      
	
	Tree treeRoot = new Tree( "Yekki Framework" );
	int nodeID = 0;
	TreeNode treeNode = null;
	treeNode = new TreeNode( nodeID++, "Demo JSP Files" );
	treeNode.addChild( new TreeLeaf( "Filter", "filter.jsp") );
	treeNode.addChild( new TreeLeaf( "StringUtil", "StringUtil.jsp") );
	treeNode.addChild( new TreeLeaf( "FullStringTokenizer.jsp", "FullStringTokenizer.jsp" ) );
	treeNode.addChild( new TreeLeaf( "ParamUtil", "ParamUtil.jsp") );
	treeNode.setVisible(true);
	treeRoot.addChild( treeNode );

	treeNode = new TreeNode( nodeID++, "Demo JSP Files" );
	treeNode.addChild( new TreeLeaf( "Filter", "filter.jsp") );
	treeNode.addChild( new TreeLeaf( "StringUtil", "StringUtil.jsp") );
	treeNode.addChild( new TreeLeaf( "FullStringTokenizer.jsp", "FullStringTokenizer.jsp" ) );
	treeNode.addChild( new TreeLeaf( "ParamUtil", "ParamUtil.jsp") );
	treeNode.setVisible(true);
	treeRoot.addChild( treeNode );

	treeNode = new TreeNode( nodeID++, "Demo JSP Files" );
	treeNode.addChild( new TreeLeaf( "Filter", "filter.jsp") );
	treeNode.addChild( new TreeLeaf( "StringUtil", "StringUtil.jsp") );
	treeNode.addChild( new TreeLeaf( "FullStringTokenizer.jsp", "FullStringTokenizer.jsp" ) );
	treeNode.addChild( new TreeLeaf( "ParamUtil", "ParamUtil.jsp") );
	treeNode.setVisible(true);
	treeRoot.addChild( treeNode );

	treeNode = new TreeNode( nodeID++, "Demo JSP Files" );
	treeNode.addChild( new TreeLeaf( "Filter", "filter.jsp") );
	treeNode.addChild( new TreeLeaf( "StringUtil", "StringUtil.jsp") );
	treeNode.addChild( new TreeLeaf( "FullStringTokenizer.jsp", "FullStringTokenizer.jsp" ) );
	treeNode.addChild( new TreeLeaf( "ParamUtil", "ParamUtil.jsp") );
	treeNode.setVisible(true);
	treeRoot.addChild( treeNode );

	treeNode = new TreeNode( nodeID++, "Demo JSP Files" );
	treeNode.addChild( new TreeLeaf( "Filter", "filter.jsp") );
	treeNode.addChild( new TreeLeaf( "StringUtil", "StringUtil.jsp") );
	treeNode.addChild( new TreeLeaf( "FullStringTokenizer.jsp", "FullStringTokenizer.jsp" ) );
	treeNode.addChild( new TreeLeaf( "ParamUtil", "ParamUtil.jsp") );
	treeNode.setVisible(true);
	treeRoot.addChild( treeNode );
	
	int flip = ParamUtil.getIntParameter( request, "flip", -1 );

	if( flip > -1 ) {

		TreeNode node = ( TreeNode )treeRoot.getChild( flip );
		node.toggleVisible();
	}

	out.println( printTree( treeRoot ) );

    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }

  private com.caucho.java.LineMap _caucho_line_map;
  private java.util.ArrayList _caucho_depends = new java.util.ArrayList();

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;
    if (com.caucho.util.CauchoSystem.getVersionId() != 2057024144)
      return true;
    for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
      com.caucho.vfs.Depend depend;
      depend = (com.caucho.vfs.Depend) _caucho_depends.get(i);
      if (depend.isModified())
        return true;
    }
    return false;
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public com.caucho.java.LineMap _caucho_getLineMap()
  {
    return _caucho_line_map;
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
  }

  public void init(com.caucho.java.LineMap lineMap,
                   com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    mergePath.addClassPath(getClass().getClassLoader());
    _caucho_line_map = new com.caucho.java.LineMap("_tree__jsp.java", "/test/example/Tree.jsp");
    _caucho_line_map.add(2, 1);
    _caucho_line_map.add(4, 14);
    _caucho_line_map.add(8, 17);
    _caucho_line_map.add(1, 109);
    _caucho_line_map.add(4, 111);
    _caucho_line_map.add(8, 112);
    _caucho_line_map.add(86, 113);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(appDir.lookup("example/Tree.jsp"), 1028259644101L, 4791L);
    _caucho_depends.add(depend);
  }

  private static byte []_jsp_string1;
  private static byte []_jsp_string0;
  static {
    _jsp_string1 = "\r\n\r\n".getBytes();
    _jsp_string0 = "\r\n".getBytes();
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -