incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r161372 - in incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets: AbstractTreePortlet.java TreePortlet.java tree/CMSTreeLoader.java
Date Fri, 15 Apr 2005 01:40:03 GMT
Author: taylor
Date: Thu Apr 14 18:40:01 2005
New Revision: 161372

URL: http://svn.apache.org/viewcvs?view=rev&rev=161372
Log:
- add flyover text for nodes
- add special image for root node

Modified:
    incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/AbstractTreePortlet.java
    incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/TreePortlet.java
    incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java

Modified: incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/AbstractTreePortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/AbstractTreePortlet.java?view=diff&r1=161371&r2=161372
==============================================================================
--- incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/AbstractTreePortlet.java
(original)
+++ incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/AbstractTreePortlet.java
Thu Apr 14 18:40:01 2005
@@ -45,6 +45,8 @@
     protected Map imageMap = new HashMap();
     protected String folderImage;
     protected String documentImage;
+    protected String rootImage;
+    protected String rootLabel;
     
     public void init(PortletConfig config) throws PortletException
     {
@@ -68,6 +70,8 @@
         anchorImage = config.getInitParameter("anchorImage");
         folderImage = config.getInitParameter("folderImage");
         documentImage = config.getInitParameter("documentImage");
+        rootImage = config.getInitParameter("rootImage");
+        rootLabel = config.getInitParameter("rootLabel");
 
         if (extensions == null)
         {
@@ -89,6 +93,14 @@
         {
             documentImage = "document.gif";
         }
+        if (rootImage == null)
+        {
+            rootImage = "bookshelf.gif";
+        }
+        if (rootLabel == null)
+        {
+            rootLabel = "Bookshelf";
+        }
         
         String[]ext = stringToArray(extensions, ", ");
         String[]img = stringToArray(images, ", ");
@@ -156,5 +168,19 @@
     public String getDocumentImage()
     {
         return documentImage;
+    }
+    /**
+     * @return Returns the rootImage.
+     */
+    public String getRootImage()
+    {
+        return rootImage;
+    }
+    /**
+     * @return Returns the rootLabel.
+     */
+    public String getRootLabel()
+    {
+        return rootLabel;
     }
 }

Modified: incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/TreePortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/TreePortlet.java?view=diff&r1=161371&r2=161372
==============================================================================
--- incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/TreePortlet.java
(original)
+++ incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/TreePortlet.java
Thu Apr 14 18:40:01 2005
@@ -69,7 +69,7 @@
         TreeControl control = (TreeControl) request.getPortletSession().getAttribute("j2_tree");
         if (control == null)
         {
-            control = buildCmsTree(this.getInitParameter("scope"), "Content", "DTB_DOMAIN");
+            control = buildCmsTree(this.getInitParameter("scope"), getRootLabel(), "DTB_DOMAIN");
             request.getPortletSession().setAttribute("j2_tree", control);
         }
         

Modified: incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java?view=diff&r1=161371&r2=161372
==============================================================================
--- incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
(original)
+++ incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/tree/CMSTreeLoader.java
Thu Apr 14 18:40:01 2005
@@ -58,6 +58,7 @@
                     "Folder",
                     true);
         node.setExpandWhenClicked(true);
+        node.setTitle(folder.getName());
 
         if(cms.getDocuments(folder.getUri()).size() > 0)
         {
@@ -92,6 +93,8 @@
 					"Document",
 					true);
     	
+        issueNode.setTitle(title);
+        
     	//if(cms.getLinks(document.getUri()).size() > 0)
     	{
     		issueNode.setLeaf(true);
@@ -113,7 +116,8 @@
                     "ANCHOR_DOMAIN",
 					null,
                     true);
-    	
+        linkNode.setTitle(link.getProperty("displayTitle"));
+        
         if(cms.getLinks(link.getUri()).size() > 0)
         {
             linkNode.setLeaf(false);
@@ -125,7 +129,7 @@
     public TreeControlNode createRootNode(String label, String rootDomain)
     {
     	TreeControlNode root = new TreeControlNode("ROOT-NODE", 
-                portlet.getFolderImage(), 
+                portlet.getRootImage(), 
                 label, // label 
                 null,       // action
                 null,       // target



Mime
View raw message