本文整理匯總了Java中javax.swing.JTable.getEditingColumn方法的典型用法代碼示例。如果您正苦於以下問題:Java JTable.getEditingColumn方法的具體用法?Java JTable.getEditingColumn怎麽用?Java JTable.getEditingColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.JTable
的用法示例。
在下文中一共展示了JTable.getEditingColumn方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: RTable
import javax.swing.JTable; //導入方法依賴的package包/類
public RTable(Component source, JSONOMapConfig omapConfig, Point point, IJSONRecorder recorder) {
super(source, omapConfig, point, recorder);
JTable table = (JTable) source;
if (table.isEditing()) {
column = table.getEditingColumn();
row = table.getEditingRow();
} else {
if (point != null) {
row = table.rowAtPoint(point);
column = table.columnAtPoint(point);
} else {
row = table.getSelectedRow();
column = table.getSelectedColumn();
}
}
if (row == -1 || column == -1) {
row = column = -1;
}
}
示例2: keyPressed
import javax.swing.JTable; //導入方法依賴的package包/類
/** Handle the key pressed event and change the focus if a particular
* key combination is pressed. */
public void keyPressed(KeyEvent e) {
if( e.isShiftDown() ) {
int code = e.getKeyCode();
switch(code) {
// diagram pane
case KeyEvent.VK_F10:
JTable source = (JTable)(e.getSource());
if (DEBUG)
System.out.println( "QBIT : keyPressed called Shift+F10 Down source.isEnabled() returns : " + source.isEnabled() + "\n" );
if ( ! source.isEnabled () ) return;
// _inputTablePopupRow = source.getEditingRow();
_inputTablePopupRow = source.getSelectedRow();
_inputTablePopupColumn = source.getEditingColumn();
if (_inputTablePopupColumn == (Criteria_COLUMN-1)) {
source.setEditingColumn(Column_COLUMN);
}
if (DEBUG)
System.out.println( "QBIT : keyPressed called\n"
+ " inputTablePopupRow = " + _inputTablePopupRow // NOI18N
+ " inputTablePopupColumn == Criteria_COLUMN " + (_inputTablePopupRow == Criteria_COLUMN ) // NOI18N
+ " inputTablePopupColumn = " + _inputTablePopupColumn ); // NOI18N
// Make sure the row where click occurred is selected.
if (_inputTablePopupRow != -1) {
source.setRowSelectionInterval (_inputTablePopupRow,
_inputTablePopupRow);
}
_inputTablePopup.show ( source, source.getWidth() / 2,
source.getHeight() / 2 );
break;
}
}
_queryBuilder.handleKeyPress(e);
}