Works around a nasty bug in Java 1.6, where it clears the selection if the context/popup menu mouse trigger is clicked. It needs to refuse the cell selection in the case of a popup trigger.
- A jbidwatcher/trunk/src/com/jbidwatcher/ui/table/FauxEditor.java
- M jbidwatcher/trunk/src/com/jbidwatcher/ui/table/AuctionTable.java view
| 900 | 1037 | |
|---|---|---|
| 9 | 9 | import javax.swing.*; |
| 10 | 10 | import javax.swing.table.TableModel; |
| 11 | 11 | import javax.swing.table.TableColumn; |
| 12 | import javax.swing.table.TableCellEditor; | |
| 12 | 13 | import java.awt.event.MouseEvent; |
| 13 | 14 | import java.awt.event.MouseListener; |
| 14 | 15 | import java.awt.Point; |
| --- | --- | |
| 23 | 24 | * Handle tooltips, at least. A very cool feature. |
| 24 | 25 | */ |
| 25 | 26 | public class AuctionTable extends JTable { |
| 27 | private static TableCellEditor FAUX = new FauxEditor(); | |
| 28 | public TableCellEditor getCellEditor() { | |
| 29 | return FAUX; | |
| 30 | } | |
| 26 | 31 | |
| 27 | 32 | /** |
| 28 | 33 | * @brief Constructs a JTable out of a prefix to search for in the |
