You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2009/01/28 20:40:45 UTC

svn commit: r738596 - in /webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui: pom.xml src/main/java/org/apache/ws/commons/tcpmon/Icons.java src/main/java/org/apache/ws/commons/tcpmon/Listener.java

Author: veithen
Date: Wed Jan 28 19:40:44 2009
New Revision: 738596

URL: http://svn.apache.org/viewvc?rev=738596&view=rev
Log:
TCPMon Swing UI: Also use icons for Remove Selected and Remove All and move these buttons to the main toolbar.

Modified:
    webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/pom.xml
    webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Icons.java
    webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Listener.java

Modified: webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/pom.xml?rev=738596&r1=738595&r2=738596&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/pom.xml (original)
+++ webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/pom.xml Wed Jan 28 19:40:44 2009
@@ -80,7 +80,9 @@
                                         **/connect.png,
                                         **/cross.png,
                                         **/disk.png,
-                                        **/tag.png
+                                        **/tag.png,
+                                        **/table_delete.png,
+                                        **/table_row_delete.png
                                     </includes>
                                 </artifactItem>
                             </artifactItems>

Modified: webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Icons.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Icons.java?rev=738596&r1=738595&r2=738596&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Icons.java (original)
+++ webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Icons.java Wed Jan 28 19:40:44 2009
@@ -27,6 +27,8 @@
     public static final Icon LAYOUT_VERTICAL = createIcon("application_split");
     public static final Icon XML_FORMAT = createIcon("tag");
     public static final Icon CLOSE = createIcon("cross");
+    public static final Icon REMOVE = createIcon("table_row_delete");
+    public static final Icon REMOVE_ALL = createIcon("table_delete");
     
     private static ImageIcon createIcon(String name) {
         return new ImageIcon(Icons.class.getResource("/com/famfamfam/silk/" + name + ".png"), "TEST");

Modified: webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Listener.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Listener.java?rev=738596&r1=738595&r2=738596&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Listener.java (original)
+++ webservices/commons/trunk/modules/tcpmon/modules/tcpmon-ui/src/main/java/org/apache/ws/commons/tcpmon/Listener.java Wed Jan 28 19:40:44 2009
@@ -278,36 +278,6 @@
                 }
             }
         });
-        JPanel tablePane = new JPanel();
-        tablePane.setLayout(new BorderLayout());
-        JScrollPane tableScrollPane = new JScrollPane(connectionTable);
-        tablePane.add(tableScrollPane, BorderLayout.CENTER);
-        JPanel buttons = new JPanel();
-        buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS));
-        buttons.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-        final String removeSelected = TCPMonBundle.getMessage("removeSelected00",
-                "Remove Selected");
-        buttons.add(removeButton = new JButton(removeSelected));
-        buttons.add(Box.createRigidArea(new Dimension(5, 0)));
-        final String removeAll = TCPMonBundle.getMessage("removeAll00", "Remove All");
-        buttons.add(removeAllButton = new JButton(removeAll));
-        tablePane.add(buttons, BorderLayout.SOUTH);
-        removeButton.setEnabled(false);
-        removeButton.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent event) {
-                if (removeSelected.equals(event.getActionCommand())) {
-                    remove();
-                }
-            }
-        });
-        removeAllButton.setEnabled(false);
-        removeAllButton.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent event) {
-                if (removeAll.equals(event.getActionCommand())) {
-                    removeAll();
-                }
-            }
-        });
 
         // Add Response Section
         // ///////////////////////////////////////////////////////////////////
@@ -332,12 +302,33 @@
         top.addSeparator();
         top.add(xmlFormatBox = new JToggleButton(Icons.XML_FORMAT));
         xmlFormatBox.setToolTipText(TCPMonBundle.getMessage("xmlFormat00", "XML Format"));
+        
         top.addSeparator();
+        
         top.add(saveButton = new JButton(Icons.SAVE));
         saveButton.setToolTipText(TCPMonBundle.getMessage("save00", "Save"));
         top.add(resendButton = new JButton(Icons.RESEND));
         resendButton.setToolTipText(TCPMonBundle.getMessage("resend00", "Resend"));
+        top.add(removeButton = new JButton(Icons.REMOVE));
+        removeButton.setToolTipText(TCPMonBundle.getMessage("removeSelected00",
+                "Remove Selected"));
+        top.add(removeAllButton = new JButton(Icons.REMOVE_ALL));
+        removeAllButton.setToolTipText(TCPMonBundle.getMessage("removeAll00", "Remove All"));
+        removeButton.setEnabled(false);
+        removeButton.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent event) {
+                remove();
+            }
+        });
+        removeAllButton.setEnabled(false);
+        removeAllButton.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent event) {
+                removeAll();
+            }
+        });
+        
         top.addSeparator();
+        
         switchButton = new JButton();
         switchButton.setToolTipText(TCPMonBundle.getMessage("switch00", "Switch Layout"));
         updateSwitchButton();
@@ -381,7 +372,7 @@
         });
         JSplitPane pane1 = new JSplitPane(0);
         pane1.setDividerSize(4);
-        pane1.setTopComponent(tablePane);
+        pane1.setTopComponent(new JScrollPane(connectionTable));
         pane1.setBottomComponent(pane2);
         pane1.setDividerLocation(150);
         panel.add(pane1, BorderLayout.CENTER);