From 917c56e549e5987f84d642cda5a4bf8756f7e537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 17 Nov 2014 22:37:01 +0100 Subject: [PATCH] Issues #716,#717,#718 Proxy dialog improvements --- lib/jpproxy.jar | Bin 85995 -> 86912 bytes .../src/com/jpexs/helpers/Helper.java | 12 + .../src/com/jpexs/proxy/Replacement.java | 143 ++++--- src/com/jpexs/decompiler/flash/gui/Main.java | 6 +- src/com/jpexs/decompiler/flash/gui/View.java | 59 +++ .../decompiler/flash/gui/abc/ABCPanel.java | 70 +--- .../gui/locales/proxy/ProxyFrame.properties | 9 + .../locales/proxy/ProxyFrame_cs.properties | 9 + .../flash/gui/proxy/ProxyFrame.java | 395 +++++++++++++++--- 9 files changed, 529 insertions(+), 174 deletions(-) diff --git a/lib/jpproxy.jar b/lib/jpproxy.jar index ec749fd302c4718aca824745130b3008b4c89ec9..92c28db9bfc5f156f92bed77777a8ed74a36d2da 100644 GIT binary patch delta 2398 zcmZuzeN0qW7XKaQ&CKJ?1DzQL!;YClj%MClCjVb$6q zU6g9KD1GSLHBDL@5)(H~=-Li6rj5J(qsi_zyUm*HAKTP!nrz%^b`7s_cvEK|GQ;sZ5P!{O=a0u z)K=`MuABP(DNE~X`;E1h0XWng`u2nAmbNaYPMm}@#8>`<}Oj$MKf)vz1A!oSCkJ{5a4ZtpsHx);G+sjbMo$9N>OnFlwB?5zbJC`VL14RxxxLH*OSHRpFqHGL-9Bj&eH= z={St%Ikt>o+umGRw!PDiBRXEdi#k?f)EHQu7u0bSV?3X4gFr9oXhO3czt%C1V;r_G z((+hGGlP%>I*wyP5ML&Mm3fhBNoDnJU&+u0|0Nj zm+}DyEL=|BIz}XRPmWv)9u>A!;g{T38*kk5wX9&9i>-i<`yxKD#mK}%ctlz(+%G~6 zYIzh$X!2e$5~^v8S7MdavfcKN3aw0@8|+oN^iH1fflkg3IytD5Ix6d|mO7f)Hlf3@ zH=)7CC=YegQV8f^~)7W7DrA=Q7f}=b#lP;Be^)WF(L|TX=FFi@Xz~+{Y(Z zDk%zwtFFZtV0Ae?in1#KR|0Nn%o0XVGPvIA%C>%hoNi0uN$-S5nV83t_&jpEx|LjO z*F5rOc`0cSspZLKt>6?NfrpbRmC3K-uena9Ia&k0c=${=U@eaVt;3@noQZ>2k4CP{ zD!xB9Fj6?khmD-Om9yrLB$fMj%n=&rE+fC&RWJu{_%aH+%ie`$4oeg8HTo>`D5_U- zl>~|x>u;eTm96Wc#3(X^S(Kz+xp4mrj(YfGJiI_CVVCr~mN8;yT9P}PB9se$0>4PW z&kjlYSvoH-S&w4z5^*{jCy>i2Z1wTiRE8GLE6Beg>_bErrc9o%bE*B;`0ETXi#TWu ztz4@#uEk-raW%y049W>Y4<0-5Waa*EFiYI}bCU{ndgN_iw7%p&SNSlCRxWOP^JqKe z&lTp;=On53^XU_tM1L!$k6aR+sigx+TV?}&n{MIfz*GZN_rp_awg#wPP|afjs*+$X zK(!Lw4$vA2Dq1Kg!QmF_kl>RAOI|CrNXxEP3Q6#XR%({uZY#A)(A<`?yxK;aq~%&$ zN^p5F1r7x%AYFe7QbYn*C>8!>h?=BjCX|}%)&i&tr<9L|Q{=ydDJ;o(5$eqR@#|+E zicq6;eh{JjwDbQr@8nXJc`HJmBJo-m?ex#&@=Gn6mv?31XJ#y0CF9O@xA8@T)of@d zSzEJ{%Wv81O?qB@+ijj%@LUw0iKQt|jc!&Jkj?zMopd?-J>lNGjLd7rc~=w6#yZL~uhf!l`A-9Tw|s1y=Old(6panrzzE&7+WkndH6xvc+FfJq*=XB8@fQz91F;24S zB#U9)UA&26w#>yPGy5>zz=a>OEow9_F_CF9HEN7X=Atl7%ogK3=kylcP0o3r`<(ZE z-uK-5p7YX4+;esL|`K19vwv@& zXC6vBRS5eiRSSE7>bT8Zpx4a;B=T)!WlVVb_iys10Zc<#q#|XXd|a&87ThrjQ0-c> z3GjE#UA+MR_)Q@Jq$gh}6X3x9o~-ld2b;6NsGK4jmw&i3araplz(=XF`o2Rs)N06l zb>tP7h}?PVPon@k&bhN-^1`TI6y{6Z@yzOgS)KZH4XfuCIp;4gb?AUehT?wa}56VvVN5cFT2`!fQ-{wGjFjU>>$x=8+%w zpNIT0+zTieo`=<5IEQtN(lIj!+c}M{8|7|uu+PE4R_xAuy_lko?J>98&9ETIDr{qU zL!!!}Y*wvG3%0Y5?q@X->O^e)J?A-d=8tEbypiXtBua^cG5>rSxkZ=HAE}_Ld1Cd6 z8oFW^$RDKVvfSGp^q1&;^{qbIvUV+~-}X@(cU9d{Y7!tGrB(sKEW-LJPl@ zpl-ng2ee%Ka^UKKmdlmYoOdQEE}YLMDJ8Cl{|>HdP0=(new String[]{"UINT", "INT", "DOUBLE", "DECIMAL", "STRING", "NAMESPACE", "NAMESPACESET", "MULTINAME"}); constantTable = new JTable(); if (abc != null) { - autoResizeColWidth(constantTable, new UIntTableModel(abc)); + View.autoResizeColWidth(constantTable, new UIntTableModel(abc)); } constantTable.setAutoCreateRowSorter(true); diff --git a/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame.properties b/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame.properties index ba484bd74..22f884be2 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame.properties @@ -24,3 +24,12 @@ sniff = Sniff: dialog.title = Proxy error = Error error.port = Wrong format for port number. +copy.url = Copy URL +save.as = Save as... +replace = Replace... +error.save.as = Cannot save file +error.replace = Cannot replace data +error.start.server = Cannot start server on port %port%. Please check if port is not blocked by other application. +column.accessed = Accessed +column.size = Size +column.url = URL \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame_cs.properties b/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame_cs.properties index fd492dadf..335775073 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/proxy/ProxyFrame_cs.properties @@ -24,3 +24,12 @@ sniff = Zachyt\u00e1vat: dialog.title = Proxy error = Chyba error.port = \u0160patn\u00fd form\u00e1t pro \u010d\u00edslo portu. +copy.url = Kop\u00edrovat URL +save.as = Ulo\u017eit jako... +replace = Nahradit... +error.save.as = Nelze ulo\u017eit soubor +error.replace = Nelze nahradit data +error.start.server = Nelze spustit server na portu %port%. Pros\u00edm zkontroljte zda port nen\u00ed blokov\u00e1n jinou aplikac\u00ed. +column.accessed = P\u0159\u00edstup +column.size = Velikost +column.url = URL \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index fa4da0ecb..77a23a416 100644 --- a/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -16,13 +16,19 @@ */ package com.jpexs.decompiler.flash.gui.proxy; +import com.jpexs.decompiler.flash.RetryTask; +import com.jpexs.decompiler.flash.RunnableIOEx; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.gui.AppFrame; +import com.jpexs.decompiler.flash.gui.AppStrings; +import com.jpexs.decompiler.flash.gui.GuiAbortRetryIgnoreHandler; import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.gui.MainFrame; +import com.jpexs.decompiler.flash.gui.SaveFileMode; import com.jpexs.decompiler.flash.gui.View; import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin; import com.jpexs.helpers.Helper; +import com.jpexs.helpers.Path; import com.jpexs.proxy.CatchedListener; import com.jpexs.proxy.ReplacedListener; import com.jpexs.proxy.Replacement; @@ -33,30 +39,57 @@ import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Image; +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.StringSelection; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; +import java.util.Comparator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.BoxLayout; +import javax.swing.DefaultRowSorter; import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JFileChooser; +import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.JTable; import javax.swing.JTextField; +import javax.swing.ListModel; +import javax.swing.RowSorter; +import javax.swing.SwingConstants; +import javax.swing.event.TableModelListener; +import javax.swing.filechooser.FileFilter; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.DefaultTableColumnModel; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableCellRenderer; +import javax.swing.table.TableColumn; +import javax.swing.table.TableModel; +import javax.swing.table.TableRowSorter; +import org.pushingpixels.substance.api.renderers.SubstanceDefaultTableCellRenderer; /** * Frame with Proxy @@ -70,10 +103,12 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe static final String ACTION_CLEAR = "CLEAR"; static final String ACTION_RENAME = "RENAME"; static final String ACTION_REMOVE = "REMOVE"; + static final String ACTION_COPYURL = "COPYURL"; + static final String ACTION_SAVEAS = "SAVEAS"; + static final String ACTION_REPLACE = "REPLACE"; - private MainFrame mainFrame; - private JList swfList; - private SWFListModel listModel; + + private JTable replacementsTable; private JButton switchButton = new JButton(translate("proxy.start")); private boolean started = false; private JTextField portField = new JTextField("55555"); @@ -99,24 +134,106 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe public void setPort(int port) { portField.setText(Integer.toString(port)); } + + + + private static class SizeItem implements Comparable{ + String file; + public SizeItem(String file){ + this.file = file; + } + @Override + public String toString() { + return Helper.byteCountStr(new File(file).length(), false); + } + + @Override + public int compareTo(SizeItem o) { + return (int)(new File(file).length() - new File(o.file).length()); + } + + } + + DefaultTableModel tableModel; + private SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss"); + + List reps; /** * Constructor * * @param mainFrame */ public ProxyFrame(final MainFrame mainFrame) { + + + final String[] columnNames=new String[]{ + translate("column.accessed"), + translate("column.size"), + translate("column.url")}; + + reps = Configuration.getReplacements(); + + Object data[][] = new Object[reps.size()][3]; + + for(int i=0;i(listModel); - swfList.addMouseListener(this); - swfList.setFont(new Font("Monospaced", Font.PLAIN, 12)); + @Override + public Class getColumnClass(int columnIndex) { + Class classes[] = new Class[]{String.class,SizeItem.class,String.class}; + return classes[columnIndex]; + } + + @Override + public boolean isCellEditable(int row, int column) { + return false; + } + + + + }; + replacementsTable = new JTable(tableModel); + + DefaultTableCellRenderer tcr=new DefaultTableCellRenderer(); + tcr.setHorizontalAlignment(SwingConstants.RIGHT); + + + replacementsTable.setDefaultRenderer(String.class, new DefaultTableCellRenderer()); + replacementsTable.setDefaultRenderer(SizeItem.class, tcr); + + + replacementsTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); + + replacementsTable.setRowSelectionAllowed(true); + + + DefaultTableColumnModel colModel = (DefaultTableColumnModel) replacementsTable.getColumnModel(); + colModel.getColumn(0).setMaxWidth(100); + + colModel.getColumn(1).setMaxWidth(200); + + + + replacementsTable.setAutoCreateRowSorter(true); + + + replacementsTable.setAutoCreateRowSorter(false); + + + replacementsTable.addMouseListener(this); + replacementsTable.setFont(new Font("Monospaced", Font.PLAIN, 12)); switchButton.addActionListener(this); switchButton.setActionCommand(ACTION_SWITCH_STATE); Container cnt = getContentPane(); cnt.setLayout(new BorderLayout()); - cnt.add(new JScrollPane(swfList), BorderLayout.CENTER); + cnt.add(new JScrollPane(replacementsTable), BorderLayout.CENTER); portField.setPreferredSize(new Dimension(80, portField.getPreferredSize().height)); JPanel buttonsPanel = new JPanel(); @@ -129,24 +246,40 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe JPanel buttonsPanel23 = new JPanel(); buttonsPanel23.setLayout(new BoxLayout(buttonsPanel23, BoxLayout.Y_AXIS)); - JPanel buttonsPanel2 = new JPanel(); - buttonsPanel2.setLayout(new FlowLayout()); + JPanel buttonsPanel21 = new JPanel(new FlowLayout()); JButton openButton = new JButton(translate("open")); openButton.setActionCommand(ACTION_OPEN); openButton.addActionListener(this); - buttonsPanel2.add(openButton); + buttonsPanel21.add(openButton); JButton clearButton = new JButton(translate("clear")); clearButton.setActionCommand(ACTION_CLEAR); clearButton.addActionListener(this); - buttonsPanel2.add(clearButton); + buttonsPanel21.add(clearButton); JButton renameButton = new JButton(translate("rename")); renameButton.setActionCommand(ACTION_RENAME); renameButton.addActionListener(this); - buttonsPanel2.add(renameButton); + buttonsPanel21.add(renameButton); JButton removeButton = new JButton(translate("remove")); removeButton.setActionCommand(ACTION_REMOVE); removeButton.addActionListener(this); - buttonsPanel2.add(removeButton); + buttonsPanel21.add(removeButton); + + //JPanel buttonsPanel22 = new JPanel(new FlowLayout()); + + JButton copyUrlButton = new JButton(translate("copy.url")); + copyUrlButton.setActionCommand(ACTION_COPYURL); + copyUrlButton.addActionListener(this); + buttonsPanel21.add(copyUrlButton); + + JButton saveAsButton = new JButton(translate("save.as")); + saveAsButton.setActionCommand(ACTION_SAVEAS); + saveAsButton.addActionListener(this); + buttonsPanel21.add(saveAsButton); + + JButton replaceButton = new JButton(translate("replace")); + replaceButton.setActionCommand(ACTION_REPLACE); + replaceButton.addActionListener(this); + buttonsPanel21.add(replaceButton); JPanel buttonsPanel3 = new JPanel(); buttonsPanel3.setLayout(new FlowLayout()); @@ -156,11 +289,12 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe //buttonsPanel3.add(sniffJSCheckBox); //buttonsPanel3.add(sniffXMLCheckBox); - buttonsPanel23.add(buttonsPanel2); + buttonsPanel23.add(buttonsPanel21); + //buttonsPanel23.add(buttonsPanel22); buttonsPanel23.add(buttonsPanel3); cnt.add(buttonsPanel23, BorderLayout.SOUTH); - setSize(400, 300); + setSize(800, 500); View.centerScreen(this); View.setWindowIcon(this); setTitle(translate("dialog.title")); @@ -192,12 +326,27 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe } private void open() { - if (swfList.getSelectedIndex() > -1) { - Replacement r = listModel.getElementAt(swfList.getSelectedIndex()); + if (replacementsTable.getSelectedRow()>-1){ + Replacement r = reps.get(replacementsTable.getRowSorter().convertRowIndexToModel(replacementsTable.getSelectedRow())); Main.openFile(r.targetFile, r.urlPattern); } } + + private String selectExportDir() { + JFileChooser chooser = new JFileChooser(); + chooser.setCurrentDirectory(new File(Configuration.lastExportDir.get())); + chooser.setDialogTitle(translate("export.select.directory")); + chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + chooser.setAcceptAllFileFilterUsed(false); + if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { + final String selFile = Helper.fixDialogFile(chooser.getSelectedFile()).getAbsolutePath(); + Configuration.lastExportDir.set(Helper.fixDialogFile(chooser.getSelectedFile()).getAbsolutePath()); + return selFile; + } + return null; + } + /** * Method handling actions from buttons * @@ -205,23 +354,160 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe */ @Override public void actionPerformed(ActionEvent e) { + int sel[] = replacementsTable.getSelectedRows(); + for(int i=0;i0) { + Replacement r = reps.get(sel[0]); + JFileChooser fc = new JFileChooser(); + fc.setCurrentDirectory(new File(Configuration.lastOpenDir.get())); + String n=r.urlPattern; + if(n.contains("?")){ + n = n.substring(0,n.indexOf("?")); + } + if(n.contains("/")){ + n=n.substring(n.lastIndexOf("/")); + } + String ext = ".swf"; + final String extension = ext; + FileFilter swfFilter = new FileFilter() { + @Override + public boolean accept(File f) { + return (f.getName().toLowerCase().endsWith(extension)) || (f.isDirectory()); + } + + @Override + public String getDescription() { + return AppStrings.translate("filter" + extension); + } + }; + fc.setFileFilter(swfFilter); + fc.setAcceptAllFileFilterUsed(true); + JFrame f = new JFrame(); + View.setWindowIcon(f); + if (fc.showOpenDialog(f) == JFileChooser.APPROVE_OPTION) { + File file = Helper.fixDialogFile(fc.getSelectedFile()); + try { + Files.copy(file.toPath(),new File(r.targetFile).toPath(), REPLACE_EXISTING); + tableModel.fireTableCellUpdated(sel[0], 1/*size*/); + } catch (IOException ex) { + View.showMessageDialog(f, translate("error.replace")+"\r\n"+ex.getLocalizedMessage(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE); + } + } + } + break; + case ACTION_COPYURL: + String copyText=""; + for (int sc:sel) { + Replacement r = reps.get(sc); + if(!copyText.isEmpty()){ + copyText += System.lineSeparator(); + } + copyText += r.urlPattern; + } + + if(!copyText.isEmpty()){ + Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); + StringSelection stringSelection = new StringSelection(copyText); + clipboard.setContents(stringSelection, null); + } + break; case ACTION_RENAME: - if (swfList.getSelectedIndex() > -1) { - Replacement r = listModel.getElementAt(swfList.getSelectedIndex()); + if (sel.length>0) { + Replacement r = reps.get(sel[0]); String s = View.showInputDialog("URL", r.urlPattern); if (s != null) { r.urlPattern = s; - listModel.dataChanged(swfList.getSelectedIndex()); + tableModel.setValueAt(s, sel[0], 2/*url*/); } } break; case ACTION_CLEAR: - for (int i = 0; i < listModel.getSize(); i++) { - Replacement r = listModel.getElementAt(i); + for (Replacement r:reps) { File f; try { f = (new File(Main.tempFile(r.targetFile))); @@ -231,28 +517,22 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe } catch (IOException ex) { Logger.getLogger(ProxyFrame.class.getName()).log(Level.SEVERE, null, ex); } - } - listModel.clear(); + tableModel = new DefaultTableModel(0,3); + replacementsTable.setModel(tableModel); + reps.clear(); break; case ACTION_REMOVE: - int lastIndex = -1; - for (int k = listModel.getSize() - 1; k >= 0; k--) { - if (swfList.isSelectedIndex(k)) { - Replacement r = listModel.removeURL(k); - File f = (new File(r.targetFile)); - if (f.exists()) { - f.delete(); - } - lastIndex = k; - } - } - if (lastIndex >= listModel.getSize()) { - lastIndex--; - } - if (lastIndex > -1) { - swfList.setSelectedIndex(lastIndex); - } + + Arrays.sort(sel); + for(int i=sel.length-1;i>=0;i--){ + tableModel.removeRow(sel[i]); + Replacement r = reps.remove(sel[i]); + File f = (new File(r.targetFile)); + if (f.exists()) { + f.delete(); + } + } break; case ACTION_SWITCH_STATE: Main.switchProxy(); @@ -285,7 +565,11 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe catchedContentTypes.add("text/xml"); catchedContentTypes.add("application/xml"); catchedContentTypes.add("application/octet-stream"); - Server.startServer(port, Configuration.getReplacements(), catchedContentTypes, this, this); + if(!Server.startServer(port, Configuration.getReplacements(), catchedContentTypes, this, this)){ + JOptionPane.showMessageDialog(this, translate("error.start.server"),AppStrings.translate("error"),JOptionPane.ERROR_MESSAGE); + started = false; + return; + } switchButton.setText(translate("proxy.stop")); portField.setEditable(false); } else { @@ -302,7 +586,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe */ @Override public void mouseClicked(MouseEvent e) { - if (e.getSource() == swfList) { + if (e.getSource() == replacementsTable) { if (e.getClickCount() == 2) { open(); } @@ -374,7 +658,14 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe byte[] result = null; - if (!listModel.contains(url)) { + boolean cont = false; + for(Replacement r:reps){ + if(r.matches(url)){ + cont = true; + break; + } + } + if (!cont) { try { byte[] hdr = new byte[3]; data.read(hdr); @@ -394,7 +685,12 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe Replacement r = new Replacement(url, tempFilePath); r.lastAccess = Calendar.getInstance(); - listModel.addURL(r); + reps.add(r); + tableModel.addRow(new Object[]{ + r.lastAccess == null?"":format.format(r.lastAccess.getTime()), + new SizeItem(r.targetFile), + r.urlPattern + }); } catch (IOException e) { } } @@ -429,6 +725,9 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe @Override public void replaced(Replacement replacement, String url, String contentType) { - listModel.dataChanged(listModel.indexOf(replacement)); + int index = reps.indexOf(replacement); + tableModel.setValueAt(replacement.lastAccess == null?"":format.format(replacement.lastAccess.getTime()), index, 0); + tableModel.setValueAt(new SizeItem(replacement.targetFile), index, 1); + tableModel.setValueAt(replacement.urlPattern, index, 2); } }