?? e955. setting the activation click count for a table cell editor in a jtable component.txt
字號:
By default, a table cell editor is activated with a double-click. The activation behavior is controlled by the renderer, not by a table property. To change this, override the isCellEditable() method of the editor. See e953 Creating a Custom Table Cell Editor in a JTable Component for more information about table cell editors.
public class MyTableCellEditor extends AbstractCellEditor implements TableCellEditor {
// See e953 Creating a Custom Table Cell Editor in a JTable Component
// for other methods that need to be implemented.
public boolean isCellEditable(EventObject evt) {
if (evt instanceof MouseEvent) {
int clickCount;
// For single-click activation
clickCount = 1;
// For double-click activation
clickCount = 2;
// For triple-click activation
clickCount = 3;
return ((MouseEvent)evt).getClickCount() >= clickCount;
}
return true;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -