From e16cb2b4cc83c69612a34ac817b42f0308e45d14 Mon Sep 17 00:00:00 2001 From: Tim Jentz Date: Fri, 16 Dec 2011 13:39:24 +0000 Subject: [PATCH] SMACK-354 Provide milliseconds in timestamp colum debugwindow Applied the smack-354-debug_milliseconds.patch git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_2_0@12914 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smackx/debugger/EnhancedDebugger.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/org/jivesoftware/smackx/debugger/EnhancedDebugger.java b/source/org/jivesoftware/smackx/debugger/EnhancedDebugger.java index 591726374..5332c7973 100644 --- a/source/org/jivesoftware/smackx/debugger/EnhancedDebugger.java +++ b/source/org/jivesoftware/smackx/debugger/EnhancedDebugger.java @@ -170,7 +170,7 @@ public class EnhancedDebugger implements SmackDebugger { // the GUI. This is what we call "interpreted" packet data, since it's the packet // data as Smack sees it and not as it's coming in as raw XML. packetReaderListener = new PacketListener() { - SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss aaa"); + SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss:SS aaa"); public void processPacket(final Packet packet) { SwingUtilities.invokeLater(new Runnable() { @@ -185,7 +185,7 @@ public class EnhancedDebugger implements SmackDebugger { // Create a thread that will listen for all outgoing packets and write them to // the GUI. packetWriterListener = new PacketListener() { - SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss aaa"); + SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss:SS aaa"); public void processPacket(final Packet packet) { SwingUtilities.invokeLater(new Runnable() { @@ -276,7 +276,7 @@ public class EnhancedDebugger implements SmackDebugger { table.getTableHeader().getColumnModel().getColumn(0).setMinWidth(0); // Set the column "timestamp" size table.getColumnModel().getColumn(1).setMaxWidth(300); - table.getColumnModel().getColumn(1).setPreferredWidth(70); + table.getColumnModel().getColumn(1).setPreferredWidth(90); // Set the column "direction" icon size table.getColumnModel().getColumn(2).setMaxWidth(50); table.getColumnModel().getColumn(2).setPreferredWidth(30); @@ -625,7 +625,7 @@ public class EnhancedDebugger implements SmackDebugger { connPanel.add( label, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); - field = new JFormattedTextField(new SimpleDateFormat("yyyy.MM.dd hh:mm:ss aaa")); + field = new JFormattedTextField(new SimpleDateFormat("yyyy.MM.dd hh:mm:ss:SS aaa")); field.setMinimumSize(new java.awt.Dimension(150, 20)); field.setMaximumSize(new java.awt.Dimension(150, 20)); field.setValue(creationTime);