Revision: 14736
http://gate.svn.sourceforge.net/gate/?rev=14736&view=rev
Author: markagreenwood
Date: 2011-12-12 11:58:04 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
now allow multiple selection of installed plugins, and allow them to be all
removed with one click of the toolbar button. no right click menu yet but we
will get there eventually
Modified Paths:
--------------
gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java
gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
Modified: gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java
2011-12-12 11:47:51 UTC (rev 14735)
+++ gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java
2011-12-12 11:58:04 UTC (rev 14736)
@@ -167,7 +167,7 @@
Collator collator = Collator.getInstance(Locale.ENGLISH);
collator.setStrength(Collator.TERTIARY);
mainTable.setComparator(NAME_COLUMN, collator);
- mainTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ mainTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
mainTable.getColumnModel().getColumn(ICON_COLUMN)
.setCellRenderer(new IconTableCellRenderer());
CheckBoxTableCellRenderer cbCellRenderer = new CheckBoxTableCellRenderer();
@@ -623,16 +623,17 @@
@Override
public void actionPerformed(ActionEvent arg0) {
- int row = mainTable.getSelectedRow();
- if(row == -1) return;
+ int[] rows = mainTable.getSelectedRows();
- int rowModel = mainTable.rowViewToModel(row);
- URL toDelete = visibleRows.get(rowModel);
+ for(int row : rows) {
+ int rowModel = mainTable.rowViewToModel(row);
+ URL toDelete = visibleRows.get(rowModel);
- Gate.removeKnownPlugin(toDelete);
- loadAlwaysByURL.remove(toDelete);
- loadNowByURL.remove(toDelete);
-
+ Gate.removeKnownPlugin(toDelete);
+ loadAlwaysByURL.remove(toDelete);
+ loadNowByURL.remove(toDelete);
+ }
+
// redisplay the table with the current filter
filterRows(filterTextField.getText());
}
Modified: gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
2011-12-12 11:47:51 UTC (rev 14735)
+++ gate/trunk/src/gate/gui/creole/manager/PluginUpdateManager.java
2011-12-12 11:58:04 UTC (rev 14736)
@@ -966,7 +966,7 @@
// now actually show/hide the window
super.setVisible(visible);
- if (!visible) dispose();
+ dispose();
}
private static class PluginTableModel extends AbstractTableModel {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs