Changeset 637 for AE/installer2/src/net/oni2/aeinstaller/gui/toolmanager
- Timestamp:
- Jan 20, 2013, 12:28:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.