本文整理汇总了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);
}