| 3 |
|
import java.awt.BorderLayout; |
| 4 |
|
import java.awt.Desktop; |
| 5 |
|
import java.awt.GridLayout; |
| 6 |
– |
import java.awt.Insets; |
| 6 |
|
import java.awt.event.ActionEvent; |
| 7 |
|
import java.awt.event.ItemEvent; |
| 8 |
|
import java.awt.event.ItemListener; |
| 30 |
|
import javax.swing.JOptionPane; |
| 31 |
|
import javax.swing.JPanel; |
| 32 |
|
import javax.swing.JRadioButton; |
| 33 |
+ |
import javax.swing.JScrollPane; |
| 34 |
|
import javax.swing.JSplitPane; |
| 35 |
|
import javax.swing.SwingUtilities; |
| 36 |
|
import javax.swing.ToolTipManager; |
| 43 |
|
import net.oni2.aeinstaller.backend.Settings.Platform; |
| 44 |
|
import net.oni2.aeinstaller.backend.SizeFormatter; |
| 45 |
|
import net.oni2.aeinstaller.backend.depot.DepotManager; |
| 46 |
– |
import net.oni2.aeinstaller.backend.packages.Package; |
| 47 |
– |
import net.oni2.aeinstaller.backend.packages.PackageManager; |
| 48 |
– |
import net.oni2.aeinstaller.backend.packages.Type; |
| 46 |
|
import net.oni2.aeinstaller.backend.oni.InstallProgressListener; |
| 47 |
|
import net.oni2.aeinstaller.backend.oni.Installer; |
| 48 |
|
import net.oni2.aeinstaller.backend.oni.OniSplit; |
| 49 |
+ |
import net.oni2.aeinstaller.backend.packages.Package; |
| 50 |
+ |
import net.oni2.aeinstaller.backend.packages.PackageManager; |
| 51 |
+ |
import net.oni2.aeinstaller.backend.packages.Type; |
| 52 |
|
import net.oni2.aeinstaller.backend.packages.download.ModDownloader; |
| 53 |
– |
import net.oni2.aeinstaller.backend.packages.download.ModDownloaderListener; |
| 53 |
|
import net.oni2.aeinstaller.backend.packages.download.ModDownloader.State; |
| 54 |
+ |
import net.oni2.aeinstaller.backend.packages.download.ModDownloaderListener; |
| 55 |
|
import net.oni2.aeinstaller.gui.about.AboutDialog; |
| 56 |
|
import net.oni2.aeinstaller.gui.corepackages.CorePackagesDialog; |
| 57 |
|
import net.oni2.aeinstaller.gui.downloadwindow.Downloader; |
| 58 |
|
import net.oni2.aeinstaller.gui.modtable.DownloadSizeListener; |
| 59 |
|
import net.oni2.aeinstaller.gui.modtable.ModSelectionListener; |
| 60 |
|
import net.oni2.aeinstaller.gui.modtable.ModTable; |
| 61 |
+ |
import net.oni2.aeinstaller.gui.modtable.ModTable.ETableContentType; |
| 62 |
+ |
import net.oni2.aeinstaller.gui.packageinfobox.PackageInfoBox; |
| 63 |
|
import net.oni2.aeinstaller.gui.settings.SettingsDialog; |
| 64 |
|
import net.oni2.aeinstaller.gui.toolmanager.ToolManager; |
| 65 |
|
|
| 93 |
|
private JRadioButton radAll; |
| 94 |
|
private JRadioButton radOnline; |
| 95 |
|
private JRadioButton radLocal; |
| 96 |
+ |
private JScrollPane scrollMods; |
| 97 |
|
private ModTable tblMods; |
| 98 |
|
private JLabel lblDownloadSizeVal; |
| 99 |
|
|
| 100 |
< |
private JLabel lblTitleVal; |
| 101 |
< |
private JLabel lblCreatorVal; |
| 99 |
< |
private JLabel lblTypesVal; |
| 100 |
< |
private JLabel lblPlatformVal; |
| 101 |
< |
private JLabel lblPackageNumberVal; |
| 102 |
< |
private JLabel lblVersionNumberVal; |
| 103 |
< |
private HTMLLinkLabel lblDescriptionVal; |
| 104 |
< |
|
| 100 |
> |
private PackageInfoBox pkgInfo; |
| 101 |
> |
|
| 102 |
|
private JButton btnInstall; |
| 103 |
|
|
| 104 |
|
private TreeSet<Package> execCoreUpdates = new TreeSet<Package>(); |
| 125 |
|
+ " - v" |
| 126 |
|
+ SwingJavaBuilder.getConfig().getResource("appversion")); |
| 127 |
|
|
| 128 |
< |
setSize(getWidth() + 150, getHeight()); |
| 128 |
> |
tblMods = new ModTable(ETableContentType.MODS); |
| 129 |
> |
tblMods.setVisible(false); |
| 130 |
> |
scrollMods.setViewportView(tblMods); |
| 131 |
> |
|
| 132 |
|
contents.setDividerLocation(550); |
| 133 |
|
contents.setResizeWeight(0.4); |
| 134 |
|
|
| 144 |
|
|
| 145 |
|
tblMods.addModSelectionListener(this); |
| 146 |
|
tblMods.addDownloadSizeListener(this); |
| 147 |
– |
|
| 148 |
– |
lblDescriptionVal.setMargin(new Insets(-15, 0, 0, 0)); |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
private void initModTypeBox() { |
| 449 |
|
private void revertSelection() { |
| 450 |
|
tblMods.revertSelection(); |
| 451 |
|
} |
| 452 |
< |
|
| 452 |
> |
|
| 453 |
|
@SuppressWarnings("unused") |
| 454 |
|
private void unSelectAll() { |
| 455 |
|
tblMods.unSelectAll(); |
| 702 |
|
|
| 703 |
|
@Override |
| 704 |
|
public void modSelectionChanged(ModTable source, Package m) { |
| 705 |
< |
lblTitleVal.setText(""); |
| 708 |
< |
lblCreatorVal.setText(""); |
| 709 |
< |
lblDescriptionVal.setText(""); |
| 710 |
< |
lblTypesVal.setText(""); |
| 711 |
< |
lblPlatformVal.setText(""); |
| 712 |
< |
lblPackageNumberVal.setText(""); |
| 713 |
< |
lblVersionNumberVal.setText(""); |
| 714 |
< |
if (m != null) { |
| 715 |
< |
lblTitleVal.setText(m.getName()); |
| 716 |
< |
lblCreatorVal.setText(m.getCreator()); |
| 717 |
< |
lblDescriptionVal.setText(m.getDescription()); |
| 718 |
< |
|
| 719 |
< |
String types = ""; |
| 720 |
< |
for (Type t : m.getTypes()) { |
| 721 |
< |
if (types.length() > 0) |
| 722 |
< |
types += ", "; |
| 723 |
< |
types += t.getName(); |
| 724 |
< |
} |
| 725 |
< |
lblTypesVal.setText(types); |
| 726 |
< |
lblPlatformVal.setText(m.getPlatform().toString()); |
| 727 |
< |
lblPackageNumberVal.setText(m.getPackageNumberString()); |
| 728 |
< |
lblVersionNumberVal.setText(m.getVersion()); |
| 729 |
< |
} |
| 705 |
> |
pkgInfo.updateInfo(m); |
| 706 |
|
} |
| 707 |
|
|
| 708 |
|
private void updateTableFilter() { |