zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject svn commit: r1584500 [7/9] - in /zookeeper/branches/branch-3.4: bin/ src/c/ src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/ src/contrib/zooinspector/ src/contrib/zooinspector/lib/ src/contrib/zooinspector/src/java/org/apache/zookeeper/in...
Date Fri, 04 Apr 2014 01:30:25 GMT
Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java Fri Apr  4 01:30:24 2014
@@ -1,146 +1,146 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.gui.nodeviewer;
-
-import java.awt.BorderLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JScrollPane;
-import javax.swing.JTextPane;
-import javax.swing.JToolBar;
-import javax.swing.SwingWorker;
-
-import org.apache.zookeeper.inspector.gui.ZooInspectorIconResources;
-import org.apache.zookeeper.inspector.logger.LoggerFactory;
-import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager;
-
-/**
- * A node viewer for displaying the data for the currently selected node
- */
-public class NodeViewerData extends ZooInspectorNodeViewer {
-    private ZooInspectorNodeManager zooInspectorManager;
-    private final JTextPane dataArea;
-    private final JToolBar toolbar;
-    private String selectedNode;
-
-    /**
-	 * 
-	 */
-    public NodeViewerData() {
-        this.setLayout(new BorderLayout());
-        this.dataArea = new JTextPane();
-        this.toolbar = new JToolBar();
-        this.toolbar.setFloatable(false);
-        JScrollPane scroller = new JScrollPane(this.dataArea);
-        scroller
-                .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
-        this.add(scroller, BorderLayout.CENTER);
-        this.add(this.toolbar, BorderLayout.NORTH);
-        JButton saveButton = new JButton(ZooInspectorIconResources
-                .getSaveIcon());
-        saveButton.addActionListener(new ActionListener() {
-
-            public void actionPerformed(ActionEvent e) {
-                if (selectedNode != null) {
-                    if (JOptionPane.showConfirmDialog(NodeViewerData.this,
-                            "Are you sure you want to save this node?"
-                                    + " (this action cannot be reverted)",
-                            "Confirm Save", JOptionPane.YES_NO_OPTION,
-                            JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
-                        zooInspectorManager.setData(selectedNode, dataArea
-                                .getText());
-                    }
-                }
-            }
-        });
-        this.toolbar.add(saveButton);
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
-     * getTitle()
-     */
-    @Override
-    public String getTitle() {
-        return "Node Data";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
-     * nodeSelectionChanged(java.util.Set)
-     */
-    @Override
-    public void nodeSelectionChanged(List<String> selectedNodes) {
-        if (selectedNodes.size() > 0) {
-            this.selectedNode = selectedNodes.get(0);
-            SwingWorker<String, Void> worker = new SwingWorker<String, Void>() {
-
-                @Override
-                protected String doInBackground() throws Exception {
-                    return NodeViewerData.this.zooInspectorManager
-                            .getData(NodeViewerData.this.selectedNode);
-                }
-
-                @Override
-                protected void done() {
-                    String data = "";
-                    try {
-                        data = get();
-                    } catch (InterruptedException e) {
-                        LoggerFactory.getLogger().error(
-                                "Error retrieving data for node: "
-                                        + NodeViewerData.this.selectedNode, e);
-                    } catch (ExecutionException e) {
-                        LoggerFactory.getLogger().error(
-                                "Error retrieving data for node: "
-                                        + NodeViewerData.this.selectedNode, e);
-                    }
-                    NodeViewerData.this.dataArea.setText(data);
-                }
-            };
-            worker.execute();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
-     * setZooInspectorManager
-     * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager)
-     */
-    @Override
-    public void setZooInspectorManager(
-            ZooInspectorNodeManager zooInspectorManager) {
-        this.zooInspectorManager = zooInspectorManager;
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.gui.nodeviewer;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+import javax.swing.JScrollPane;
+import javax.swing.JTextPane;
+import javax.swing.JToolBar;
+import javax.swing.SwingWorker;
+
+import org.apache.zookeeper.inspector.gui.ZooInspectorIconResources;
+import org.apache.zookeeper.inspector.logger.LoggerFactory;
+import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager;
+
+/**
+ * A node viewer for displaying the data for the currently selected node
+ */
+public class NodeViewerData extends ZooInspectorNodeViewer {
+    private ZooInspectorNodeManager zooInspectorManager;
+    private final JTextPane dataArea;
+    private final JToolBar toolbar;
+    private String selectedNode;
+
+    /**
+	 * 
+	 */
+    public NodeViewerData() {
+        this.setLayout(new BorderLayout());
+        this.dataArea = new JTextPane();
+        this.toolbar = new JToolBar();
+        this.toolbar.setFloatable(false);
+        JScrollPane scroller = new JScrollPane(this.dataArea);
+        scroller
+                .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+        this.add(scroller, BorderLayout.CENTER);
+        this.add(this.toolbar, BorderLayout.NORTH);
+        JButton saveButton = new JButton(ZooInspectorIconResources
+                .getSaveIcon());
+        saveButton.addActionListener(new ActionListener() {
+
+            public void actionPerformed(ActionEvent e) {
+                if (selectedNode != null) {
+                    if (JOptionPane.showConfirmDialog(NodeViewerData.this,
+                            "Are you sure you want to save this node?"
+                                    + " (this action cannot be reverted)",
+                            "Confirm Save", JOptionPane.YES_NO_OPTION,
+                            JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
+                        zooInspectorManager.setData(selectedNode, dataArea
+                                .getText());
+                    }
+                }
+            }
+        });
+        this.toolbar.add(saveButton);
+
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
+     * getTitle()
+     */
+    @Override
+    public String getTitle() {
+        return "Node Data";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
+     * nodeSelectionChanged(java.util.Set)
+     */
+    @Override
+    public void nodeSelectionChanged(List<String> selectedNodes) {
+        if (selectedNodes.size() > 0) {
+            this.selectedNode = selectedNodes.get(0);
+            SwingWorker<String, Void> worker = new SwingWorker<String, Void>() {
+
+                @Override
+                protected String doInBackground() throws Exception {
+                    return NodeViewerData.this.zooInspectorManager
+                            .getData(NodeViewerData.this.selectedNode);
+                }
+
+                @Override
+                protected void done() {
+                    String data = "";
+                    try {
+                        data = get();
+                    } catch (InterruptedException e) {
+                        LoggerFactory.getLogger().error(
+                                "Error retrieving data for node: "
+                                        + NodeViewerData.this.selectedNode, e);
+                    } catch (ExecutionException e) {
+                        LoggerFactory.getLogger().error(
+                                "Error retrieving data for node: "
+                                        + NodeViewerData.this.selectedNode, e);
+                    }
+                    NodeViewerData.this.dataArea.setText(data);
+                }
+            };
+            worker.execute();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
+     * setZooInspectorManager
+     * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager)
+     */
+    @Override
+    public void setZooInspectorManager(
+            ZooInspectorNodeManager zooInspectorManager) {
+        this.zooInspectorManager = zooInspectorManager;
+    }
+
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java Fri Apr  4 01:30:24 2014
@@ -1,186 +1,186 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.gui.nodeviewer;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
-import javax.swing.SwingWorker;
-
-import org.apache.zookeeper.data.Stat;
-import org.apache.zookeeper.inspector.logger.LoggerFactory;
-import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager;
-
-/**
- * A node viewer for displaying the meta data for the currently selected node.
- * The meta data is essentially the information from the {@link Stat} for the
- * node
- */
-public class NodeViewerMetaData extends ZooInspectorNodeViewer {
-    private ZooInspectorNodeManager zooInspectorManager;
-    private final JPanel metaDataPanel;
-    private String selectedNode;
-
-    /**
-	 * 
-	 */
-    public NodeViewerMetaData() {
-        this.setLayout(new BorderLayout());
-        this.metaDataPanel = new JPanel();
-        this.metaDataPanel.setBackground(Color.WHITE);
-        JScrollPane scroller = new JScrollPane(this.metaDataPanel);
-        this.add(scroller, BorderLayout.CENTER);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
-     * getTitle()
-     */
-    @Override
-    public String getTitle() {
-        return "Node Metadata";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
-     * nodeSelectionChanged(java.util.Set)
-     */
-    @Override
-    public void nodeSelectionChanged(List<String> selectedNodes) {
-        this.metaDataPanel.removeAll();
-        if (selectedNodes.size() > 0) {
-            this.selectedNode = selectedNodes.get(0);
-            SwingWorker<Map<String, String>, Void> worker = new SwingWorker<Map<String, String>, Void>() {
-
-                @Override
-                protected Map<String, String> doInBackground() throws Exception {
-                    return NodeViewerMetaData.this.zooInspectorManager
-                            .getNodeMeta(NodeViewerMetaData.this.selectedNode);
-                }
-
-                @Override
-                protected void done() {
-                    Map<String, String> data = null;
-                    try {
-                        data = get();
-                    } catch (InterruptedException e) {
-                        data = new HashMap<String, String>();
-                        LoggerFactory.getLogger().error(
-                                "Error retrieving meta data for node: "
-                                        + NodeViewerMetaData.this.selectedNode,
-                                e);
-                    } catch (ExecutionException e) {
-                        data = new HashMap<String, String>();
-                        LoggerFactory.getLogger().error(
-                                "Error retrieving meta data for node: "
-                                        + NodeViewerMetaData.this.selectedNode,
-                                e);
-                    }
-                    NodeViewerMetaData.this.metaDataPanel
-                            .setLayout(new GridBagLayout());
-                    JPanel infoPanel = new JPanel();
-                    infoPanel.setBackground(Color.WHITE);
-                    infoPanel.setLayout(new GridBagLayout());
-                    int i = 0;
-                    int rowPos = 0;
-                    for (Map.Entry<String, String> entry : data.entrySet()) {
-                        rowPos = 2 * i + 1;
-                        JLabel label = new JLabel(entry.getKey());
-                        JTextField text = new JTextField(entry.getValue());
-                        text.setEditable(false);
-                        GridBagConstraints c1 = new GridBagConstraints();
-                        c1.gridx = 0;
-                        c1.gridy = rowPos;
-                        c1.gridwidth = 1;
-                        c1.gridheight = 1;
-                        c1.weightx = 0;
-                        c1.weighty = 0;
-                        c1.anchor = GridBagConstraints.WEST;
-                        c1.fill = GridBagConstraints.HORIZONTAL;
-                        c1.insets = new Insets(5, 5, 5, 5);
-                        c1.ipadx = 0;
-                        c1.ipady = 0;
-                        infoPanel.add(label, c1);
-                        GridBagConstraints c2 = new GridBagConstraints();
-                        c2.gridx = 2;
-                        c2.gridy = rowPos;
-                        c2.gridwidth = 1;
-                        c2.gridheight = 1;
-                        c2.weightx = 0;
-                        c2.weighty = 0;
-                        c2.anchor = GridBagConstraints.WEST;
-                        c2.fill = GridBagConstraints.HORIZONTAL;
-                        c2.insets = new Insets(5, 5, 5, 5);
-                        c2.ipadx = 0;
-                        c2.ipady = 0;
-                        infoPanel.add(text, c2);
-                        i++;
-                    }
-                    GridBagConstraints c = new GridBagConstraints();
-                    c.gridx = 1;
-                    c.gridy = rowPos;
-                    c.gridwidth = 1;
-                    c.gridheight = 1;
-                    c.weightx = 1;
-                    c.weighty = 1;
-                    c.anchor = GridBagConstraints.NORTHWEST;
-                    c.fill = GridBagConstraints.NONE;
-                    c.insets = new Insets(5, 5, 5, 5);
-                    c.ipadx = 0;
-                    c.ipady = 0;
-                    NodeViewerMetaData.this.metaDataPanel.add(infoPanel, c);
-                    NodeViewerMetaData.this.metaDataPanel.revalidate();
-                    NodeViewerMetaData.this.metaDataPanel.repaint();
-                }
-            };
-            worker.execute();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
-     * setZooInspectorManager
-     * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager)
-     */
-    @Override
-    public void setZooInspectorManager(
-            ZooInspectorNodeManager zooInspectorManager) {
-        this.zooInspectorManager = zooInspectorManager;
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.gui.nodeviewer;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.SwingWorker;
+
+import org.apache.zookeeper.data.Stat;
+import org.apache.zookeeper.inspector.logger.LoggerFactory;
+import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager;
+
+/**
+ * A node viewer for displaying the meta data for the currently selected node.
+ * The meta data is essentially the information from the {@link Stat} for the
+ * node
+ */
+public class NodeViewerMetaData extends ZooInspectorNodeViewer {
+    private ZooInspectorNodeManager zooInspectorManager;
+    private final JPanel metaDataPanel;
+    private String selectedNode;
+
+    /**
+	 * 
+	 */
+    public NodeViewerMetaData() {
+        this.setLayout(new BorderLayout());
+        this.metaDataPanel = new JPanel();
+        this.metaDataPanel.setBackground(Color.WHITE);
+        JScrollPane scroller = new JScrollPane(this.metaDataPanel);
+        this.add(scroller, BorderLayout.CENTER);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
+     * getTitle()
+     */
+    @Override
+    public String getTitle() {
+        return "Node Metadata";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
+     * nodeSelectionChanged(java.util.Set)
+     */
+    @Override
+    public void nodeSelectionChanged(List<String> selectedNodes) {
+        this.metaDataPanel.removeAll();
+        if (selectedNodes.size() > 0) {
+            this.selectedNode = selectedNodes.get(0);
+            SwingWorker<Map<String, String>, Void> worker = new SwingWorker<Map<String, String>, Void>() {
+
+                @Override
+                protected Map<String, String> doInBackground() throws Exception {
+                    return NodeViewerMetaData.this.zooInspectorManager
+                            .getNodeMeta(NodeViewerMetaData.this.selectedNode);
+                }
+
+                @Override
+                protected void done() {
+                    Map<String, String> data = null;
+                    try {
+                        data = get();
+                    } catch (InterruptedException e) {
+                        data = new HashMap<String, String>();
+                        LoggerFactory.getLogger().error(
+                                "Error retrieving meta data for node: "
+                                        + NodeViewerMetaData.this.selectedNode,
+                                e);
+                    } catch (ExecutionException e) {
+                        data = new HashMap<String, String>();
+                        LoggerFactory.getLogger().error(
+                                "Error retrieving meta data for node: "
+                                        + NodeViewerMetaData.this.selectedNode,
+                                e);
+                    }
+                    NodeViewerMetaData.this.metaDataPanel
+                            .setLayout(new GridBagLayout());
+                    JPanel infoPanel = new JPanel();
+                    infoPanel.setBackground(Color.WHITE);
+                    infoPanel.setLayout(new GridBagLayout());
+                    int i = 0;
+                    int rowPos = 0;
+                    for (Map.Entry<String, String> entry : data.entrySet()) {
+                        rowPos = 2 * i + 1;
+                        JLabel label = new JLabel(entry.getKey());
+                        JTextField text = new JTextField(entry.getValue());
+                        text.setEditable(false);
+                        GridBagConstraints c1 = new GridBagConstraints();
+                        c1.gridx = 0;
+                        c1.gridy = rowPos;
+                        c1.gridwidth = 1;
+                        c1.gridheight = 1;
+                        c1.weightx = 0;
+                        c1.weighty = 0;
+                        c1.anchor = GridBagConstraints.WEST;
+                        c1.fill = GridBagConstraints.HORIZONTAL;
+                        c1.insets = new Insets(5, 5, 5, 5);
+                        c1.ipadx = 0;
+                        c1.ipady = 0;
+                        infoPanel.add(label, c1);
+                        GridBagConstraints c2 = new GridBagConstraints();
+                        c2.gridx = 2;
+                        c2.gridy = rowPos;
+                        c2.gridwidth = 1;
+                        c2.gridheight = 1;
+                        c2.weightx = 0;
+                        c2.weighty = 0;
+                        c2.anchor = GridBagConstraints.WEST;
+                        c2.fill = GridBagConstraints.HORIZONTAL;
+                        c2.insets = new Insets(5, 5, 5, 5);
+                        c2.ipadx = 0;
+                        c2.ipady = 0;
+                        infoPanel.add(text, c2);
+                        i++;
+                    }
+                    GridBagConstraints c = new GridBagConstraints();
+                    c.gridx = 1;
+                    c.gridy = rowPos;
+                    c.gridwidth = 1;
+                    c.gridheight = 1;
+                    c.weightx = 1;
+                    c.weighty = 1;
+                    c.anchor = GridBagConstraints.NORTHWEST;
+                    c.fill = GridBagConstraints.NONE;
+                    c.insets = new Insets(5, 5, 5, 5);
+                    c.ipadx = 0;
+                    c.ipady = 0;
+                    NodeViewerMetaData.this.metaDataPanel.add(infoPanel, c);
+                    NodeViewerMetaData.this.metaDataPanel.revalidate();
+                    NodeViewerMetaData.this.metaDataPanel.repaint();
+                }
+            };
+            worker.execute();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer#
+     * setZooInspectorManager
+     * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager)
+     */
+    @Override
+    public void setZooInspectorManager(
+            ZooInspectorNodeManager zooInspectorManager) {
+        this.zooInspectorManager = zooInspectorManager;
+    }
+
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java Fri Apr  4 01:30:24 2014
@@ -1,138 +1,138 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.gui.nodeviewer;
-
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.io.IOException;
-import java.util.List;
-
-import javax.swing.JPanel;
-
-import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager;
-
-/**
- * A {@link JPanel} for displaying information about the currently selected
- * node(s)
- */
-public abstract class ZooInspectorNodeViewer extends JPanel implements
-        Transferable {
-    /**
-     * The {@link DataFlavor} used for DnD in the node viewer configuration
-     * dialog
-     */
-    public static final DataFlavor nodeViewerDataFlavor = new DataFlavor(
-            ZooInspectorNodeViewer.class, "nodeviewer");
-
-    /**
-     * @param zooInspectorManager
-     */
-    public abstract void setZooInspectorManager(
-            ZooInspectorNodeManager zooInspectorManager);
-
-    /**
-     * Called whenever the selected nodes in the tree view changes.
-     * 
-     * @param selectedNodes
-     *            - the nodes currently selected in the tree view
-     * 
-     */
-    public abstract void nodeSelectionChanged(List<String> selectedNodes);
-
-    /**
-     * @return the title of the node viewer. this will be shown on the tab for
-     *         this node viewer.
-     */
-    public abstract String getTitle();
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * java.awt.datatransfer.Transferable#getTransferData(java.awt.datatransfer
-     * .DataFlavor)
-     */
-    public Object getTransferData(DataFlavor flavor)
-            throws UnsupportedFlavorException, IOException {
-        if (flavor.equals(nodeViewerDataFlavor)) {
-            return this.getClass().getCanonicalName();
-        } else {
-            return null;
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.awt.datatransfer.Transferable#getTransferDataFlavors()
-     */
-    public DataFlavor[] getTransferDataFlavors() {
-        return new DataFlavor[] { nodeViewerDataFlavor };
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @seejava.awt.datatransfer.Transferable#isDataFlavorSupported(java.awt.
-     * datatransfer.DataFlavor)
-     */
-    public boolean isDataFlavorSupported(DataFlavor flavor) {
-        return flavor.equals(nodeViewerDataFlavor);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result
-                + ((getTitle() == null) ? 0 : getTitle().hashCode());
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        ZooInspectorNodeViewer other = (ZooInspectorNodeViewer) obj;
-        if (getClass().getCanonicalName() != other.getClass()
-                .getCanonicalName()) {
-            return false;
-        }
-        if (getTitle() == null) {
-            if (other.getTitle() != null)
-                return false;
-        } else if (!getTitle().equals(other.getTitle()))
-            return false;
-        return true;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.gui.nodeviewer;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.util.List;
+
+import javax.swing.JPanel;
+
+import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager;
+
+/**
+ * A {@link JPanel} for displaying information about the currently selected
+ * node(s)
+ */
+public abstract class ZooInspectorNodeViewer extends JPanel implements
+        Transferable {
+    /**
+     * The {@link DataFlavor} used for DnD in the node viewer configuration
+     * dialog
+     */
+    public static final DataFlavor nodeViewerDataFlavor = new DataFlavor(
+            ZooInspectorNodeViewer.class, "nodeviewer");
+
+    /**
+     * @param zooInspectorManager
+     */
+    public abstract void setZooInspectorManager(
+            ZooInspectorNodeManager zooInspectorManager);
+
+    /**
+     * Called whenever the selected nodes in the tree view changes.
+     * 
+     * @param selectedNodes
+     *            - the nodes currently selected in the tree view
+     * 
+     */
+    public abstract void nodeSelectionChanged(List<String> selectedNodes);
+
+    /**
+     * @return the title of the node viewer. this will be shown on the tab for
+     *         this node viewer.
+     */
+    public abstract String getTitle();
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * java.awt.datatransfer.Transferable#getTransferData(java.awt.datatransfer
+     * .DataFlavor)
+     */
+    public Object getTransferData(DataFlavor flavor)
+            throws UnsupportedFlavorException, IOException {
+        if (flavor.equals(nodeViewerDataFlavor)) {
+            return this.getClass().getCanonicalName();
+        } else {
+            return null;
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.awt.datatransfer.Transferable#getTransferDataFlavors()
+     */
+    public DataFlavor[] getTransferDataFlavors() {
+        return new DataFlavor[] { nodeViewerDataFlavor };
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @seejava.awt.datatransfer.Transferable#isDataFlavorSupported(java.awt.
+     * datatransfer.DataFlavor)
+     */
+    public boolean isDataFlavorSupported(DataFlavor flavor) {
+        return flavor.equals(nodeViewerDataFlavor);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result
+                + ((getTitle() == null) ? 0 : getTitle().hashCode());
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        ZooInspectorNodeViewer other = (ZooInspectorNodeViewer) obj;
+        if (getClass().getCanonicalName() != other.getClass()
+                .getCanonicalName()) {
+            return false;
+        }
+        if (getTitle() == null) {
+            if (other.getTitle() != null)
+                return false;
+        } else if (!getTitle().equals(other.getTitle()))
+            return false;
+        return true;
+    }
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java Fri Apr  4 01:30:24 2014
@@ -1,36 +1,36 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.logger;
-
-/**
- * Provides a {@link Logger} for use across the entire application
- * 
- */
-public class LoggerFactory
-{
-	private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("org.apache.zookeeper.inspector"); //$NON-NLS-1$
-
-	/**
-	 * @return {@link Logger} for ZooInspector
-	 */
-	public static org.slf4j.Logger getLogger()
-	{
-		return logger;
-	}
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.logger;
+
+/**
+ * Provides a {@link Logger} for use across the entire application
+ * 
+ */
+public class LoggerFactory
+{
+	private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("org.apache.zookeeper.inspector"); //$NON-NLS-1$
+
+	/**
+	 * @return {@link Logger} for ZooInspector
+	 */
+	public static org.slf4j.Logger getLogger()
+	{
+		return logger;
+	}
+
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java Fri Apr  4 01:30:24 2014
@@ -1,37 +1,37 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.manager;
-
-import java.util.Map;
-
-/**
- * A Listener for Events on zookeeper nodes
- */
-public interface NodeListener {
-    /**
-     * @param nodePath
-     *            - the path of the node
-     * @param eventType
-     *            - the event type
-     * @param eventInfo
-     *            - a {@link Map} containing any other information about this
-     *            event
-     */
-    public void processEvent(String nodePath, String eventType,
-            Map<String, String> eventInfo);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.manager;
+
+import java.util.Map;
+
+/**
+ * A Listener for Events on zookeeper nodes
+ */
+public interface NodeListener {
+    /**
+     * @param nodePath
+     *            - the path of the node
+     * @param eventType
+     *            - the event type
+     * @param eventInfo
+     *            - a {@link Map} containing any other information about this
+     *            event
+     */
+    public void processEvent(String nodePath, String eventType,
+            Map<String, String> eventInfo);
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java Fri Apr  4 01:30:24 2014
@@ -1,120 +1,120 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.manager;
-
-/**
- * A utility class for storing a pair of objects
- * 
- * @param <K>
- * @param <V>
- */
-public class Pair<K, V> {
-    private K key;
-    private V value;
-
-    /**
-     * @param key
-     * @param value
-     */
-    public Pair(K key, V value) {
-        this.key = key;
-        this.value = value;
-    }
-
-    /**
-	 * 
-	 */
-    public Pair() {
-        // Do Nothing
-    }
-
-    /**
-     * @return key
-     */
-    public K getKey() {
-        return key;
-    }
-
-    /**
-     * @param key
-     */
-    public void setKey(K key) {
-        this.key = key;
-    }
-
-    /**
-     * @return value
-     */
-    public V getValue() {
-        return value;
-    }
-
-    /**
-     * @param value
-     */
-    public void setValue(V value) {
-        this.value = value;
-    }
-
-    @Override
-    public String toString() {
-        return "Pair [" + key + ", " + value + "]";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((key == null) ? 0 : key.hashCode());
-        result = prime * result + ((value == null) ? 0 : value.hashCode());
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        Pair<?, ?> other = (Pair<?, ?>) obj;
-        if (key == null) {
-            if (other.key != null)
-                return false;
-        } else if (!key.equals(other.key))
-            return false;
-        if (value == null) {
-            if (other.value != null)
-                return false;
-        } else if (!value.equals(other.value))
-            return false;
-        return true;
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.manager;
+
+/**
+ * A utility class for storing a pair of objects
+ * 
+ * @param <K>
+ * @param <V>
+ */
+public class Pair<K, V> {
+    private K key;
+    private V value;
+
+    /**
+     * @param key
+     * @param value
+     */
+    public Pair(K key, V value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    /**
+	 * 
+	 */
+    public Pair() {
+        // Do Nothing
+    }
+
+    /**
+     * @return key
+     */
+    public K getKey() {
+        return key;
+    }
+
+    /**
+     * @param key
+     */
+    public void setKey(K key) {
+        this.key = key;
+    }
+
+    /**
+     * @return value
+     */
+    public V getValue() {
+        return value;
+    }
+
+    /**
+     * @param value
+     */
+    public void setValue(V value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return "Pair [" + key + ", " + value + "]";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((key == null) ? 0 : key.hashCode());
+        result = prime * result + ((value == null) ? 0 : value.hashCode());
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Pair<?, ?> other = (Pair<?, ?>) obj;
+        if (key == null) {
+            if (other.key != null)
+                return false;
+        } else if (!key.equals(other.key))
+            return false;
+        if (value == null) {
+            if (other.value != null)
+                return false;
+        } else if (!value.equals(other.value))
+            return false;
+        return true;
+    }
+
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java?rev=1584500&r1=1584499&r2=1584500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java Fri Apr  4 01:30:24 2014
@@ -1,139 +1,139 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.zookeeper.inspector.manager;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.swing.JComboBox;
-import javax.swing.JTextField;
-
-/**
- * A Manager for all interactions between the application and the Zookeeper
- * instance
- */
-public interface ZooInspectorManager extends ZooInspectorNodeManager,
-        ZooInspectorNodeTreeManager {
-
-    /**
-     * @param connectionProps
-     * @return true if successfully connected
-     */
-    public boolean connect(Properties connectionProps);
-
-    /**
-     * @return true if successfully disconnected
-     */
-    public boolean disconnect();
-
-    /**
-     * @return a {@link Pair} containing the following:
-     *         <ul>
-     *         <li>a {@link Map} of property keys to list of possible values. If
-     *         the list size is 1 the value is taken to be the default value for
-     *         a {@link JTextField}. If the list size is greater than 1, the
-     *         values are taken to be the possible options to show in a
-     *         {@link JComboBox} with the first selected as default.</li>
-     *         <li>a {@link Map} of property keys to the label to show on the UI
-     *         </li>
-     *         <ul>
-     * 
-     */
-    public Pair<Map<String, List<String>>, Map<String, String>> getConnectionPropertiesTemplate();
-
-    /**
-     * @param selectedNodes
-     *            - the nodes to add the watcher to
-     * @param nodeListener
-     *            - the node listener for this watcher
-     */
-    public void addWatchers(Collection<String> selectedNodes,
-            NodeListener nodeListener);
-
-    /**
-     * @param selectedNodes
-     *            - the nodes to remove the watchers from
-     */
-    public void removeWatchers(Collection<String> selectedNodes);
-
-    /**
-     * @param selectedFile
-     *            - the file to load which contains the node viewers
-     *            configuration
-     * @return nodeViewers - the class names of the node viewers from the
-     *         configuration
-     * @throws IOException
-     *             - if the configuration file cannot be loaded
-     */
-    public List<String> loadNodeViewersFile(File selectedFile)
-            throws IOException;
-
-    /**
-     * @param selectedFile
-     *            - the file to save the configuration to
-     * @param nodeViewersClassNames
-     *            - the class names of the node viewers
-     * @throws IOException
-     *             - if the configuration file cannot be saved
-     */
-    public void saveNodeViewersFile(File selectedFile,
-            List<String> nodeViewersClassNames) throws IOException;
-
-    /**
-     * @param nodeViewersClassNames
-     *            - the class names of the node viewers
-     * @throws IOException
-     *             - if the default configuration file cannot be loaded
-     */
-    public void setDefaultNodeViewerConfiguration(
-            List<String> nodeViewersClassNames) throws IOException;
-
-    /**
-     * @return nodeViewers - the class names of the node viewers from the
-     *         configuration
-     * @throws IOException
-     *             - if the default configuration file cannot be loaded
-     */
-    List<String> getDefaultNodeViewerConfiguration() throws IOException;
-
-    /**
-     * @param connectionProps
-     *            - the connection properties last used to connect to the
-     *            zookeeeper instance
-     */
-    public void setLastConnectionProps(Properties connectionProps);
-
-    /**
-     * @return last connection Properties - the connection properties last used
-     *         to connect to the zookeeeper instance
-     */
-    public Properties getLastConnectionProps();
-
-    /**
-     * @param props
-     *            - the properties to use as the default connection settings
-     * @throws IOException
-     *             - if the default configuration file cannot be saved
-     */
-    public void saveDefaultConnectionFile(Properties props) throws IOException;
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.manager;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+
+/**
+ * A Manager for all interactions between the application and the Zookeeper
+ * instance
+ */
+public interface ZooInspectorManager extends ZooInspectorNodeManager,
+        ZooInspectorNodeTreeManager {
+
+    /**
+     * @param connectionProps
+     * @return true if successfully connected
+     */
+    public boolean connect(Properties connectionProps);
+
+    /**
+     * @return true if successfully disconnected
+     */
+    public boolean disconnect();
+
+    /**
+     * @return a {@link Pair} containing the following:
+     *         <ul>
+     *         <li>a {@link Map} of property keys to list of possible values. If
+     *         the list size is 1 the value is taken to be the default value for
+     *         a {@link JTextField}. If the list size is greater than 1, the
+     *         values are taken to be the possible options to show in a
+     *         {@link JComboBox} with the first selected as default.</li>
+     *         <li>a {@link Map} of property keys to the label to show on the UI
+     *         </li>
+     *         <ul>
+     * 
+     */
+    public Pair<Map<String, List<String>>, Map<String, String>> getConnectionPropertiesTemplate();
+
+    /**
+     * @param selectedNodes
+     *            - the nodes to add the watcher to
+     * @param nodeListener
+     *            - the node listener for this watcher
+     */
+    public void addWatchers(Collection<String> selectedNodes,
+            NodeListener nodeListener);
+
+    /**
+     * @param selectedNodes
+     *            - the nodes to remove the watchers from
+     */
+    public void removeWatchers(Collection<String> selectedNodes);
+
+    /**
+     * @param selectedFile
+     *            - the file to load which contains the node viewers
+     *            configuration
+     * @return nodeViewers - the class names of the node viewers from the
+     *         configuration
+     * @throws IOException
+     *             - if the configuration file cannot be loaded
+     */
+    public List<String> loadNodeViewersFile(File selectedFile)
+            throws IOException;
+
+    /**
+     * @param selectedFile
+     *            - the file to save the configuration to
+     * @param nodeViewersClassNames
+     *            - the class names of the node viewers
+     * @throws IOException
+     *             - if the configuration file cannot be saved
+     */
+    public void saveNodeViewersFile(File selectedFile,
+            List<String> nodeViewersClassNames) throws IOException;
+
+    /**
+     * @param nodeViewersClassNames
+     *            - the class names of the node viewers
+     * @throws IOException
+     *             - if the default configuration file cannot be loaded
+     */
+    public void setDefaultNodeViewerConfiguration(
+            List<String> nodeViewersClassNames) throws IOException;
+
+    /**
+     * @return nodeViewers - the class names of the node viewers from the
+     *         configuration
+     * @throws IOException
+     *             - if the default configuration file cannot be loaded
+     */
+    List<String> getDefaultNodeViewerConfiguration() throws IOException;
+
+    /**
+     * @param connectionProps
+     *            - the connection properties last used to connect to the
+     *            zookeeeper instance
+     */
+    public void setLastConnectionProps(Properties connectionProps);
+
+    /**
+     * @return last connection Properties - the connection properties last used
+     *         to connect to the zookeeeper instance
+     */
+    public Properties getLastConnectionProps();
+
+    /**
+     * @param props
+     *            - the properties to use as the default connection settings
+     * @throws IOException
+     *             - if the default configuration file cannot be saved
+     */
+    public void saveDefaultConnectionFile(Properties props) throws IOException;
+
+}

Propchange: zookeeper/branches/branch-3.4/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message