Changeset 637 for AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Timestamp:
- Jan 20, 2013, 12:28:12 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTable.java
r631 r637 76 76 final Mod mod = (Mod) getValueAt(rowindex, -1); 77 77 78 JPopupMenu popup = new JPopupMenu(); 79 78 80 if (mod.isLocalAvailable()) { 79 JPopupMenu popup = new JPopupMenu();81 // Open package folder item 80 82 JMenuItem openModFolder = new JMenuItem( 81 83 bundle.getString("openModFolder.text")); … … 94 96 }); 95 97 popup.add(openModFolder); 98 } 99 100 if (mod.getUrl() != null) { 101 // Open Depot page item 102 JMenuItem openDepotPage = new JMenuItem( 103 bundle.getString("openDepotPage.text")); 104 openDepotPage 105 .addActionListener(new ActionListener() { 106 @Override 107 public void actionPerformed( 108 ActionEvent arg0) { 109 try { 110 Desktop.getDesktop().browse( 111 mod.getUrl()); 112 } catch (IOException e) { 113 e.printStackTrace(); 114 } 115 } 116 }); 117 popup.add(openDepotPage); 118 } 119 120 if (popup.getSubElements().length > 0) 96 121 popup.show(e.getComponent(), e.getX(), e.getY()); 97 }98 122 } 99 123 } -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r631 r637 2 2 3 3 import java.io.File; 4 import java.text.SimpleDateFormat; 5 import java.util.Date; 4 6 import java.util.HashSet; 5 7 import java.util.ResourceBundle; … … 55 57 res += (mod.isLocalAvailable() ? "D" : "_"); 56 58 return res; 59 case 5: 60 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 61 return sdf 62 .format(new Date(mod.getFile().getTimestamp() * 1000)); 57 63 } 58 64 return null; … … 72 78 case 4: 73 79 return bundle.getString("mod.state"); 80 case 5: 81 return bundle.getString("mod.date"); 74 82 } 75 83 return null; … … 83 91 @Override 84 92 public int getColumnCount() { 85 return 5;93 return 6; 86 94 } 87 95 … … 98 106 return String.class; 99 107 case 4: 108 return String.class; 109 case 5: 100 110 return String.class; 101 111 } … … 134 144 case 4: 135 145 w = 55; 146 col.setPreferredWidth(w); 147 col.setMinWidth(w); 148 col.setMaxWidth(w); 149 break; 150 case 5: 151 w = 95; 136 152 col.setPreferredWidth(w); 137 153 col.setMinWidth(w);
Note:
See TracChangeset
for help on using the changeset viewer.