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


Java JXTable.setShowGrid方法代碼示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: initUi

import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
private void initUi() {
	try {
		setLayout(new MigLayout("fill,flowy"));
		setTitle("JXTableTest01");
		setPreferredSize(new Dimension(600, 400));
		setLocation(400, 200);
		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

		tfFilter = new JTextField(20);
		tfFilter.addActionListener(this);

		btAdd = new JButton("Add");
		btAdd.addActionListener(this);

		Vector<Vector<String>> data = new Vector<Vector<String>>();
		for (int i = 0; i < 2; ++i) {
			Vector<String> row = new Vector<String>();
			row.add("name " + i + " 01");
			row.add("city " + i + " 02");
			data.add(row);
		}
		Vector<String> columnNames = new Vector<String>();
		columnNames.add("col 1");
		columnNames.add("col 2");
		model = new DefaultTableModel(data, columnNames);
		table = new JXTable(model);

		table.setColumnControlVisible(true);
		table.setShowGrid(false, false);
		table.addHighlighter(HighlighterFactory.createSimpleStriping());
		table.setVisibleRowCount(10);

		rowFilter = new SbRowFilter(table);

		add(tfFilter);
		add(btAdd);
		JScrollPane scroller = new JScrollPane(table);
		add(scroller, "grow");

		pack();
		setVisible(true);
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
開發者ID:markkohdev,項目名稱:oStorybook,代碼行數:46,代碼來源:JXTableTest01.java


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