Changeset 637 for AE/installer2/src/net/oni2/aeinstaller/gui
- Timestamp:
- Jan 20, 2013, 12:28:12 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r635 r637 121 121 + SwingJavaBuilder.getConfig().getResource("appversion")); 122 122 123 contents.setDividerLocation(400); 123 setSize(getWidth()+150, getHeight()); 124 contents.setDividerLocation(500); 124 125 contents.setResizeWeight(0.4); 125 126 … … 409 410 } 410 411 411 @SuppressWarnings("unused")412 412 private void revertSelection() { 413 413 tblMods.revertSelection(); … … 537 537 @SuppressWarnings("unused") 538 538 private void installDone() { 539 ModManager.getInstance().updateInstalledMods(); 540 revertSelection(); 539 541 switch (installDone) { 540 542 case DONE: -
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); -
AE/installer2/src/net/oni2/aeinstaller/gui/toolmanager/ToolManager.java
r629 r637 9 9 import javax.swing.AbstractAction; 10 10 import javax.swing.DefaultListModel; 11 import javax.swing.Icon; 12 import javax.swing.ImageIcon; 11 13 import javax.swing.JButton; 12 14 import javax.swing.JComponent; … … 15 17 import javax.swing.JList; 16 18 import javax.swing.JOptionPane; 19 import javax.swing.JSplitPane; 17 20 import javax.swing.KeyStroke; 18 21 import javax.swing.ListSelectionModel; … … 41 44 private BuildResult result = SwingJavaBuilder.build(this, bundle); 42 45 46 private JSplitPane contents; 47 43 48 private JList lstTools; 44 49 … … 51 56 52 57 private JButton btnInstall; 58 59 private Icon icoInstall = null; 60 private Icon icoUninstall = null; 53 61 54 62 /** … … 73 81 getRootPane().getActionMap().put("close", closeAction); 74 82 83 contents.setDividerLocation(200); 84 contents.setResizeWeight(0.4); 85 75 86 lstTools.addListSelectionListener(this); 76 87 lstTools.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); … … 80 91 for (String name : tools.keySet()) 81 92 dlm.addElement(tools.get(name)); 93 lstTools.setModel(dlm); 94 95 icoInstall = new ImageIcon(getClass().getResource( 96 SwingJavaBuilder.getConfig().getResource("img.install"))); 97 icoUninstall = new ImageIcon(getClass().getResource( 98 SwingJavaBuilder.getConfig().getResource("img.uninstall"))); 82 99 } 83 100 … … 102 119 lblDownloadSizeVal.setText(""); 103 120 btnInstall.setEnabled(false); 121 btnInstall.setIcon(icoInstall); 104 122 105 123 if (lstTools.getSelectedValue() instanceof Mod) { … … 116 134 btnInstall.setToolTipText(bundle 117 135 .getString("btnInstall.un.tooltip")); 136 btnInstall.setIcon(icoUninstall); 118 137 } else { 119 138 btnInstall.setText(bundle.getString("btnInstall.text"));
Note:
See TracChangeset
for help on using the changeset viewer.