Return-Path: Delivered-To: apmail-jakarta-jetspeed-dev-archive@www.apache.org Received: (qmail 55432 invoked from network); 28 Jan 2005 21:11:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Jan 2005 21:11:15 -0000 Received: (qmail 71991 invoked by uid 500); 28 Jan 2005 21:11:14 -0000 Delivered-To: apmail-jakarta-jetspeed-dev-archive@jakarta.apache.org Received: (qmail 71956 invoked by uid 500); 28 Jan 2005 21:11:13 -0000 Mailing-List: contact jetspeed-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jetspeed Developers List" Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@jakarta.apache.org Received: (qmail 71942 invoked by uid 500); 28 Jan 2005 21:11:13 -0000 Received: (qmail 71939 invoked by uid 500); 28 Jan 2005 21:11:13 -0000 Received: (qmail 71936 invoked by uid 99); 28 Jan 2005 21:11:13 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 28 Jan 2005 13:11:13 -0800 Received: (qmail 55399 invoked by uid 1688); 28 Jan 2005 21:11:12 -0000 Date: 28 Jan 2005 21:11:12 -0000 Message-ID: <20050128211112.55398.qmail@minotaur.apache.org> From: jford@apache.org To: jakarta-jetspeed-2-cvs@apache.org Subject: cvs commit: jakarta-jetspeed-2/taglibs/treecontrol/src/java/org/apache/webapp/admin TreeControlNode.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N jford 2005/01/28 13:11:12 Modified: taglibs/treecontrol/src/java/org/apache/jetspeed/portlets/tags PortletTreeControlTag.java taglibs/treecontrol/src/java/org/apache/webapp/admin TreeControlNode.java Log: Added ability to set a css class per node Added title to link, allowing hover Revision Changes Path 1.7 +5 -1 jakarta-jetspeed-2/taglibs/treecontrol/src/java/org/apache/jetspeed/portlets/tags/PortletTreeControlTag.java Index: PortletTreeControlTag.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/taglibs/treecontrol/src/java/org/apache/jetspeed/portlets/tags/PortletTreeControlTag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PortletTreeControlTag.java 28 Jan 2005 02:51:39 -0000 1.6 +++ PortletTreeControlTag.java 28 Jan 2005 21:11:12 -0000 1.7 @@ -274,7 +274,7 @@ // Render the label for this node (if any) if (node.getLabel() != null) { - String labelStyle = null; + String labelStyle = node.getCSSClass(); if (node.isSelected() && (styleSelected != null)) labelStyle = styleSelected; else if (!node.isSelected() && (styleUnselected != null)) @@ -297,6 +297,10 @@ out.print("\""); } + out.print(" title=\""); + out.print(node.getLabel()); + out.print("\""); + /* Invalid, not used, and not usefull // to refresh the tree in the same 'self' frame out.print(" onclick=\""); 1.3 +50 -5 jakarta-jetspeed-2/taglibs/treecontrol/src/java/org/apache/webapp/admin/TreeControlNode.java Index: TreeControlNode.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/taglibs/treecontrol/src/java/org/apache/webapp/admin/TreeControlNode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TreeControlNode.java 21 Jan 2005 23:38:47 -0000 1.2 +++ TreeControlNode.java 28 Jan 2005 21:11:12 -0000 1.3 @@ -54,12 +54,40 @@ * hyperlink's results will be displayed, or null for * the current window * @param expanded Should this node be expanded? + * @param domain Identifier for the kind of node. */ public TreeControlNode(String name, String icon, String label, String action, String target, boolean expanded, String domain) { - this(name, icon, label, action, target, expanded, domain, false); + this(name, icon, label, action, target, expanded, domain, null, false); + } + + /** + * Construct a new TreeControlNode with the specified parameters. + * + * @param name Internal name of this node (must be unique within + * the entire tree) + * @param icon Pathname of the image file for the icon to be displayed + * when this node is visible, relative to the image directory + * for our images + * @param label The label that will be displayed to the user if + * this node is visible + * @param action The hyperlink to be selected if the user + * selects this node, or null if this node's label should + * not be a hyperlink + * @param target The window target in which the action + * hyperlink's results will be displayed, or null for + * the current window + * @param expanded Should this node be expanded? + * @param domain Identifier for the kind of node. + * @param CSSClass The css class to apply to the node + */ + public TreeControlNode(String name, + String icon, String label, + String action, String target, + boolean expanded, String domain, String CSSClass) { + this(name, icon, label, action, target, expanded, domain, CSSClass, false); } /** @@ -79,12 +107,14 @@ * hyperlink's results will be displayed, or null for * the current window * @param expanded Should this node be expanded? + * @param domain Identifier for the kind of node. + * @param CSSClass The css class to apply to the node * @param lazy Is this node's children lazy loaded? */ public TreeControlNode(String name, String icon, String label, String action, String target, - boolean expanded, String domain, + boolean expanded, String domain, String CSSClass, boolean lazy) { super(); @@ -95,6 +125,7 @@ this.target = target; this.expanded = expanded; this.domain = domain; + this.CSSClass = CSSClass; this.lazy = lazy; this.loaded = false; } @@ -302,6 +333,22 @@ public int getWidth() { return (this.width); } + + protected String CSSClass; + + /** + * @return Returns the cSSClass. + */ + public String getCSSClass() { + return CSSClass; + } + /** + * @param class1 The cSSClass to set. + */ + public void setCSSClass(String CSSClass) { + this.CSSClass = CSSClass; + } + // --------------------------------------------------------- Public Methods @@ -424,6 +471,4 @@ } } - - } --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org