當前位置: 首頁>>代碼示例>>Java>>正文


Java JXTable.setEditable方法代碼示例

本文整理匯總了Java中org.jdesktop.swingx.JXTable.setEditable方法的典型用法代碼示例。如果您正苦於以下問題:Java JXTable.setEditable方法的具體用法?Java JXTable.setEditable怎麽用?Java JXTable.setEditable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jdesktop.swingx.JXTable的用法示例。


在下文中一共展示了JXTable.setEditable方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: interactiveRolloverDisabledClickTable

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
/**
 * Issue #1374-swingx: Rollover click must be disabled if target disabled
 * 
 * Visual test for JXTable, adapted from reporter's test case
 */
public void interactiveRolloverDisabledClickTable() {
    JXTable table = new JXTable(new AncientSwingTeam());
    table.setEditable(false);
    table.setEnabled(false);
    final JXFrame frame = showWithScrollingInFrame(table, "disable table must not trigger rollover renderer");
    // rollover-enabled default renderer
    DefaultTableRenderer renderer = new DefaultTableRenderer() {
        @Override
        public void doClick() {
            JOptionPane.showMessageDialog(frame, "Click");
        }
        
        @Override
        public boolean isEnabled() {
            return true;
        }
    };
    table.setDefaultRenderer(Object.class, renderer);
    addEnabledToggle(frame, table);
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:26,代碼來源:RolloverVisualCheck.java

示例2: initJTableFiles

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
private void initJTableFiles()   {
    jTableFiles = new JXTable();
    jTableFilesTableModel = new DBMSImportTableModel(jTableFiles);
    jTableFiles.setColumnControlVisible(true);
    jTableFiles.setEditable(false);
    jTableFiles.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    jTableFiles.setModel(jTableFilesTableModel);
    jTableFiles.setShowGrid(true);
    jTableFiles.setDragEnabled(false); 
    jTableFiles.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
        @Override
        public void valueChanged(ListSelectionEvent e) {
            if(jTableFiles.getSelectedRow() < 0)   {
                delFileButton.setEnabled(false);
            }else{
                delFileButton.setEnabled(true);
            }
        }
    });
    scrollPaneFiles.setViewportView(jTableFiles);   
}
 
開發者ID:dbunibas,項目名稱:BART,代碼行數:22,代碼來源:ImportPanel.java

示例3: interactiveTableRolloverScroll

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
/**
 * Issue #1193-swingx: rollover state not updated on scrolling/mouseWheel
 * 
 * visualize behaviour on 
 * - scrolling (with mouse wheel)
 * - resizing (added custom actions)
 */
public void interactiveTableRolloverScroll() {
    final JXTable table = new JXTable(new AncientSwingTeam());
    table.setEditable(false);
    table.setHorizontalScrollEnabled(true);
    table.addHighlighter(new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, Color.YELLOW, null));
    final JXFrame frame = getResizableFrame(table);
    show(frame);
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:16,代碼來源:RolloverVisualCheck.java

示例4: initJTable

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
private void initJTable()   {
    valueTable = new JXTable();
    valueTable.setColumnControlVisible(true);
    valueTable.setEditable(false);
    valueTable.setDefaultRenderer(Object.class, new TableValueCellRender());
    valueTable.setCellSelectionEnabled(true);
    valueTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    valueTable.setModel(dataModel);
    valueTable.setShowGrid(true);
    valueTable.setDragEnabled(false); 
    valueTable.setSelectionBackground(new Color(214, 217, 223));
    valueTable.setVisibleRowCount(20);
    pageCtrlPanel.setVisibleRow(20+"");
}
 
開發者ID:dbunibas,項目名稱:BART,代碼行數:15,代碼來源:TableDataView.java

示例5: initTable

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
private void initTable()   {
    table = new JXTable();
    table.setColumnControlVisible(true);
    table.setEditable(true);
    table.setCellSelectionEnabled(true);
    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    table.setShowGrid(true);
    table.setDragEnabled(false); 
    table.setSelectionBackground(new Color(214, 217, 223));
    highlighterControl = new HighlighterControl();
}
 
開發者ID:dbunibas,項目名稱:BART,代碼行數:12,代碼來源:VioGenQueriesWPanel.java

示例6: initTable

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
private void initTable()   {
    cellChangesTable = new JXTable();
    cellChangesTable.setEditable(false);
    cellChangesTable.setColumnControlVisible(true);
    cellChangesTable.setShowGrid(true);
    cellChangesTable.setDragEnabled(false); 
    cellChangesTable.setSelectionBackground(new Color(214, 217, 223));
    cellChangesTable.setModel(model);
}
 
開發者ID:dbunibas,項目名稱:BART,代碼行數:10,代碼來源:ChartTopComponent.java


注:本文中的org.jdesktop.swingx.JXTable.setEditable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。