ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1083589 - in /incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin: AbstractAddWindow.java Activator.java Associations.java
Date Sun, 20 Mar 2011 21:56:24 GMT
Author: marrs
Date: Sun Mar 20 21:56:24 2011
New Revision: 1083589

URL: http://svn.apache.org/viewvc?rev=1083589&view=rev
Log:
Mode code cleanup, mainly removing debug print information.

Modified:
    incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/AbstractAddWindow.java
    incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Activator.java
    incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/AbstractAddWindow.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/AbstractAddWindow.java?rev=1083589&r1=1083588&r2=1083589&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/AbstractAddWindow.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/AbstractAddWindow.java
Sun Mar 20 21:56:24 2011
@@ -1,5 +1,6 @@
 package org.apache.ace.webui.vaadin;
 
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
@@ -39,14 +40,13 @@ public abstract class AbstractAddWindow 
         // The components added to the window are actually added to the window's
         // layout; you can use either. Alignments are set using the layout
         layout.addComponent(close);
-        layout.setComponentAlignment(close, "right");
+        layout.setComponentAlignment(close, Alignment.BOTTOM_RIGHT);
     }
 
     public void show() {
         if (getParent() != null) {
             // window is already showing
-            m_main.getWindow().showNotification(
-                    "Window is already open");
+            m_main.getWindow().showNotification("Window is already open");
         } else {
             // Open the subwindow by adding it to the parent
             // window

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Activator.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Activator.java?rev=1083589&r1=1083588&r2=1083589&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Activator.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Activator.java
Sun Mar 20 21:56:24 2011
@@ -56,20 +56,6 @@ public class Activator extends Dependenc
             .setImplementation(VaadinServlet.class)
         );
         
-        // show events
-//        manager.add(createComponent()
-//            .setImplementation(new EventHandler() {
-//                public void handleEvent(Event event) {
-//                    System.out.print("EVENT: " + event.getTopic());
-//                    for (String key : event.getPropertyNames()) {
-//                        System.out.print(" " + key + "=" + event.getProperty(key));
-//                    }
-//                    System.out.println();
-//                }
-//            })
-//            .setInterface(EventHandler.class.getName(), new Properties() {{ put(EventConstants.EVENT_TOPIC,
"*"); }} )
-//        );
-        
         // shows off components that are contributed by extensions
         manager.add(createComponent()
             .setInterface(UIExtensionFactory.class.getName(), new Properties() {{ put(UIExtensionFactory.EXTENSION_POINT_KEY,
UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET); }})

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java?rev=1083589&r1=1083588&r2=1083589&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
Sun Mar 20 21:56:24 2011
@@ -59,19 +59,15 @@ public class Associations {
                 if (propertyId == null) {
                     // no propertyId, styling row
                     for (RepositoryObject o : m_associatedItems) {
-                        System.out.println("cellrenderer probing: " + o);
                         if (equals(itemId, o)) {
-                            System.out.println(" -> associated");
                             return "associated";
                         }
                     }
                     for (RepositoryObject o : m_relatedItems) {
                         if (equals(itemId, o)) {
-                            System.out.println(" -> related");
                             return "related";
                         }
                     }
-                    System.out.println("cellrenderer: unrelated");
                 }
                 return null;
             }
@@ -138,10 +134,7 @@ public class Associations {
         public void valueChange(ValueChangeEvent event) {
             
             if (m_activeSelection != null && m_activeTable != null) {
-                if (m_activeTable.equals(m_table)) {
-                    System.out.println("SAME TABLE!");
-                }
-                else {
+                if (!m_activeTable.equals(m_table)) {
                     for (Object val : m_activeSelection) {
                         m_activeTable.unselect(val);
                     }
@@ -157,95 +150,48 @@ public class Associations {
             // in multiselect mode, a Set of itemIds is returned,
             // in singleselect mode the itemId is returned directly
             Set<?> value = (Set<?>) event.getProperty().getValue();
-            if (null == value || value.size() == 0) {
-//                    selected.setValue("No selection");
-            } else {
-//                    selected.setValue("Selected: " + table.getValue());
-            }
 
             // remember the active selection too
             m_activeSelection = value;
 
-            if (value == null) {
-                System.out.println("no selection");
-            }
-            else {
-                System.out.println("selection:");
-
+            if (value != null) {
                 clear();
-
                 for (Object val : value) {
                     System.out.println(" - " + m_table.getItem(val).getItemProperty(VaadinClient.OBJECT_NAME)
+ " " + val);
                     RepositoryObject lo = lookup(val);
-                    System.out.println("lookup(" + val + ") returned " + lo);
                     if (lo != null) {
                         List related = null;
                         for (int i = 0; i < m_left.length; i++) {
                             if (i == 0) {
                                 related = getRelated(lo, m_left[i]);
-                                System.out.println("left associated:");
-                                for (Object o : related) {
-                                    System.out.println(" -> " + o);
-                                }
                                 m_associatedItems.addAll(related);
                             }
                             else {
                                 related = getRelated(related, m_left[i]);
-                                System.out.println("left related:");
-                                for (Object o : related) {
-                                    System.out.println(" -> " + o);
-                                }
                                 m_relatedItems.addAll(related);
                             }
                         }
                         for (int i = 0; i < m_right.length; i++) {
                             if (i == 0) {
                                 related = getRelated(lo, m_right[i]);
-                                System.out.println("right associated:");
-                                for (Object o : related) {
-                                    System.out.println(" -> " + o);
-                                }
                                 m_associatedItems.addAll(related);
                             }
                             else {
                                 related = getRelated(related, m_right[i]);
-                                System.out.println("right related:");
-                                for (Object o : related) {
-                                    System.out.println(" -> " + o);
-                                }
                                 m_relatedItems.addAll(related);
                             }
                         }
                     }
-                    System.out.println("summarizing associated:");
-                    for (RepositoryObject ro : m_associatedItems) {
-                        System.out.println("** " + ro);
-                    }
-                    System.out.println("summarizing related:");
-                    for (RepositoryObject ro : m_relatedItems) {
-                        System.out.println("** " + ro);
-                    }
-                    
+
                     for (Table t : m_tablesToRefresh) {
-                        System.out.println("refreshing " + t);
                         t.requestRepaint();
                     }
-                    
-                    System.out.println("summarizing associated:");
-                    for (RepositoryObject ro : m_associatedItems) {
-                        System.out.println("** " + ro);
-                    }
-                    System.out.println("summarizing related:");
-                    for (RepositoryObject ro : m_relatedItems) {
-                        System.out.println("** " + ro);
-                    }
                 }
             }
         }
 
         public RepositoryObject lookup(Object value) {
             for (RepositoryObject object : m_repository.get()) {
-                System.out.println("..." + object);
                 if (object instanceof StatefulGatewayObject) {
                     StatefulGatewayObject sgo = (StatefulGatewayObject) object;
                     if (sgo.isRegistered()) {
@@ -257,10 +203,8 @@ public class Associations {
                 }
                 if (object != null) {
                     NamedObject namedObject = getNamedObject(object);
-                    System.out.println("..." + namedObject);
                     if (namedObject != null) {
                         if (namedObject.getName().equals(value)) {
-                            System.out.println("Found: " + namedObject.getName());
                             return object;
                         }
                     }



Mime
View raw message