Révision | 6e89cd66790cd7b3ddaa0bcb4c47f008304001f7 (tree) |
---|---|
l'heure | 2013-12-18 22:23:02 |
Auteur | argius <argius.net@gmai...> |
Commiter | argius |
[#32628] add new method resetSortState into class ResultSetTable and WindowOutputProcessor call it in method clearResultSetTable
@@ -7,7 +7,6 @@ import static java.awt.event.MouseEvent.MOUSE_PRESSED; | ||
7 | 7 | import static javax.swing.KeyStroke.getKeyStroke; |
8 | 8 | import static net.argius.stew.ui.window.AnyActionKey.*; |
9 | 9 | import static net.argius.stew.ui.window.ResultSetTable.ActionKey.*; |
10 | - | |
11 | 10 | import java.awt.*; |
12 | 11 | import java.awt.event.*; |
13 | 12 | import java.beans.*; |
@@ -15,12 +14,10 @@ import java.io.*; | ||
15 | 14 | import java.sql.*; |
16 | 15 | import java.util.*; |
17 | 16 | import java.util.List; |
18 | - | |
19 | 17 | import javax.swing.*; |
20 | 18 | import javax.swing.event.*; |
21 | 19 | import javax.swing.table.*; |
22 | 20 | import javax.swing.text.*; |
23 | - | |
24 | 21 | import net.argius.stew.*; |
25 | 22 | import net.argius.stew.io.*; |
26 | 23 | import net.argius.stew.text.*; |
@@ -893,6 +890,11 @@ final class ResultSetTable extends JTable implements AnyActionListener, TextSear | ||
893 | 890 | // empty |
894 | 891 | } |
895 | 892 | |
893 | + void resetSortState() { | |
894 | + lastSortedIndex = -1; | |
895 | + lastSortedIsReverse = false; | |
896 | + } | |
897 | + | |
896 | 898 | static final class TableHeaderTextSearch implements TextSearch { |
897 | 899 | private ResultSetTable rstable; |
898 | 900 | private JTableHeader tableHeader; |
@@ -5,17 +5,14 @@ import static net.argius.stew.Bootstrap.getPropertyAsInt; | ||
5 | 5 | import static net.argius.stew.ui.window.AnyActionKey.*; |
6 | 6 | import static net.argius.stew.ui.window.Utilities.getImageIcon; |
7 | 7 | import static net.argius.stew.ui.window.Utilities.sleep; |
8 | - | |
9 | 8 | import java.awt.*; |
10 | 9 | import java.awt.event.*; |
11 | 10 | import java.io.*; |
12 | 11 | import java.sql.*; |
13 | 12 | import java.util.*; |
14 | 13 | import java.util.List; |
15 | - | |
16 | 14 | import javax.swing.*; |
17 | 15 | import javax.swing.table.*; |
18 | - | |
19 | 16 | import net.argius.stew.*; |
20 | 17 | import net.argius.stew.io.*; |
21 | 18 | import net.argius.stew.ui.*; |
@@ -157,6 +154,7 @@ final class WindowOutputProcessor extends JFrame implements OutputProcessor, Any | ||
157 | 154 | resultSetTable.setVisible(false); |
158 | 155 | resultSetTable.getTableHeader().setVisible(false); |
159 | 156 | ((DefaultTableModel)resultSetTable.getModel()).setRowCount(0); |
157 | + resultSetTable.resetSortState(); | |
160 | 158 | } |
161 | 159 | |
162 | 160 | @SuppressWarnings("unused") |