當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。