本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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+"");
}
示例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();
}
示例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);
}