当前位置: 首页>>代码示例>>Java>>正文


Java JTable.getEditingColumn方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:20,代码来源:RTable.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:QueryBuilderInputTable.java


注:本文中的javax.swing.JTable.getEditingColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。