public PluginTable(List<PluginInfo> plugins) { setOpaque(false); this.provider = new ArrayList<>(plugins); addComponentListener(componentAdapter); setLayout(new BorderLayout()); setPreferredSize(new Dimension(500, 200)); waitLabel = new JLabel("Checking for plugins...", Icons.getIcon("busy.gif"), SwingConstants.CENTER); add(waitLabel, BorderLayout.CENTER); handleTableShown(); }
public void valueChanged(ListSelectionEvent e) { PluginInfo info = table.getCurrentUpdateInfo(); updateInfoPanel(info); } });
public List<PluginInfo> getPluginsToInstall() { return pluginTable.getSelectedUpdateInfo(); }
public PluginPanel(List<PluginInfo> pluginInfoList) { setPreferredSize(new Dimension(600, 600)); setLayout(new BorderLayout(2, 2)); JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT); sp.setBorder(new EmptyBorder(6, 6, 6, 6)); sp.setResizeWeight(0.5); pluginTable = new PluginTable(pluginInfoList); pluginTable.addListSelectionListener(e -> { PluginInfo info = pluginTable.getCurrentUpdateInfo(); updateInfoPanel(info); }); sp.setTopComponent(new JScrollPane(pluginTable)); sp.setBottomComponent(createInfoBox()); add(sp, BorderLayout.CENTER); alwaysShow = new JCheckBox("Always check for updates on startup.", PluginManager.getInstance().isAutoUpdateEnabled()); alwaysShow.addActionListener(event -> { PluginManager.getInstance().setAutoUpdateEnabled(alwaysShow.isSelected()); }); alwaysShow.setAlignmentX(0.0f); add(alwaysShow, BorderLayout.SOUTH); }
final PluginTable table = new PluginTable(downloadsProviders.get(label)); tables.add(table); tabbedPane.addTab(label, table); table.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { PluginInfo info = table.getCurrentUpdateInfo();
public void componentShown(ComponentEvent event) { removeComponentListener(componentAdapter); handleTableShown(); } };
final PluginTable table = new PluginTable(downloadsProviders.get(label)); tables.add(table); tabbedPane.addTab(label, table); table.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { PluginInfo info = table.getCurrentUpdateInfo();
public void componentShown(ComponentEvent event) { removeComponentListener(componentAdapter); handleTableShown(); } };
public PluginTable(PluginRegistry provider) { setOpaque(false); this.provider = provider; addComponentListener(componentAdapter); setLayout(new BorderLayout()); setPreferredSize(new Dimension(500, 200)); waitLabel = new JLabel("Checking for plugins...", Icons.getIcon("busy.gif"), SwingConstants.CENTER); add(waitLabel, BorderLayout.CENTER); }
public void valueChanged(ListSelectionEvent e) { PluginInfo info = table.getCurrentUpdateInfo(); updateInfoPanel(info); } });
public List<PluginInfo> getPluginsToInstall() { List<PluginInfo> plugins = new ArrayList<PluginInfo>(); for (PluginTable table : tables){ plugins.addAll(table.getSelectedUpdateInfo()); } return plugins; }
public void componentShown(ComponentEvent event) { removeComponentListener(componentAdapter); handleTableShown(); } };
public PluginTable(PluginRegistry provider) { setOpaque(false); this.provider = provider; addComponentListener(componentAdapter); setLayout(new BorderLayout()); setPreferredSize(new Dimension(500, 200)); waitLabel = new JLabel("Checking for plugins...", Icons.getIcon("busy.gif"), SwingConstants.CENTER); add(waitLabel, BorderLayout.CENTER); }
public void stateChanged(ChangeEvent event) { PluginTable table = (PluginTable)tabbedPane.getSelectedComponent(); updateInfoPanel(table.getCurrentUpdateInfo()); } });
public List<PluginInfo> getPluginsToInstall() { List<PluginInfo> plugins = new ArrayList<PluginInfo>(); for (PluginTable table : tables){ plugins.addAll(table.getSelectedUpdateInfo()); } return plugins; }
public void stateChanged(ChangeEvent event) { PluginTable table = (PluginTable)tabbedPane.getSelectedComponent(); updateInfoPanel(table.getCurrentUpdateInfo()); } });