[jboss-cvs] jboss-portal/theme/src/main/org/jboss/portal/theme/page ...

Chris Laprun chris.laprun at jboss.com
Tue Jul 18 18:29:27 EDT 2006


  User: claprun 
  Date: 06/07/18 18:29:27

  Modified:    theme/src/main/org/jboss/portal/theme/page 
                        WindowResult.java
  Log:
  JBPORTAL-958:
  - Added Actionable and BaseActionable which WindowState and Mode extend.
  - Added support for Actions ordering so that buttons in decoration are always at the same spot.
  - Minor code improvements.
  
  Revision  Changes    Path
  1.11      +14 -7     jboss-portal/theme/src/main/org/jboss/portal/theme/page/WindowResult.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WindowResult.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/theme/src/main/org/jboss/portal/theme/page/WindowResult.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- WindowResult.java	21 Mar 2006 22:33:43 -0000	1.10
  +++ WindowResult.java	18 Jul 2006 22:29:27 -0000	1.11
  @@ -21,6 +21,7 @@
   */
   package org.jboss.portal.theme.page;
   
  +import org.jboss.portal.portlet.Actionable;
   import org.jboss.portal.server.util.Properties;
   import org.jboss.portal.theme.render.MarkupResult;
   
  @@ -37,7 +38,7 @@
    * </li>
    *
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
    */
   public class WindowResult extends MarkupResult
   {
  @@ -139,12 +140,12 @@
       *
       * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
       */
  -   public static class Action
  +   public static class Action implements Comparable
      {
         /**
  -       * The action name.
  +       * The origin of the action.
          */
  -      private final String name;
  +      private final Actionable origin;
   
         /**
          * The action url.
  @@ -156,16 +157,16 @@
          */
         private final boolean enabled;
   
  -      public Action(String name, String url, boolean enabled)
  +      public Action(Actionable origin, String url, boolean enabled)
         {
  -         this.name = name;
  +         this.origin = origin;
            this.url = url;
            this.enabled = enabled;
         }
   
         public String getName()
         {
  -         return name;
  +         return origin.getName();
         }
   
         public String getURL()
  @@ -177,5 +178,11 @@
         {
            return enabled;
         }
  +
  +      public int compareTo(Object o)
  +      {
  +         Action action = (Action)o;
  +         return origin.compareTo(action.origin);
  +      }
      }
   }
  
  
  



More information about the jboss-cvs-commits mailing list