Package com.commander4j.tablemodel

Examples of com.commander4j.tablemodel.JDBMaterialBatchTableModel


    listStatement = query.getPreparedStatement();
  }

  private void populateList() {
    JDBMaterialBatch materialBatch = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
    JDBMaterialBatchTableModel materialBatchTable = new JDBMaterialBatchTableModel(materialBatch.getMaterialBatchDataResultSet(listStatement));
    TableRowSorter<JDBMaterialBatchTableModel> sorter = new TableRowSorter<JDBMaterialBatchTableModel>(materialBatchTable);

    jTable1.setRowSorter(sorter);
    jTable1.setModel(materialBatchTable);

    jScrollPane1.setViewportView(jTable1);
    JUtility.scrolltoHomePosition(jScrollPane1);
    jTable1.getTableHeader().setReorderingAllowed(false);
    jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    jTable1.setFont(Common.font_list);

    jTable1.getColumnModel().getColumn(0).setPreferredWidth(95);
    jTable1.getColumnModel().getColumn(1).setPreferredWidth(95);
    jTable1.getColumnModel().getColumn(2).setPreferredWidth(95);
    jTable1.getColumnModel().getColumn(3).setPreferredWidth(120);

    jScrollPane1.repaint();

    JUtility.setResultRecordCountColour(jStatusText, false, 0, materialBatchTable.getRowCount());
  }
View Full Code Here


    listStatement = query.getPreparedStatement();
  }

  private void populateList() {
    JDBMaterialBatch materialBatch = new JDBMaterialBatch(Common.selectedHostID, Common.sessionID);
    JDBMaterialBatchTableModel materialBatchTable = new JDBMaterialBatchTableModel(materialBatch.getMaterialBatchDataResultSet(listStatement));
    TableRowSorter<JDBMaterialBatchTableModel> sorter = new TableRowSorter<JDBMaterialBatchTableModel>(materialBatchTable);

    jTable1.setRowSorter(sorter);
    jTable1.setModel(materialBatchTable);

    jScrollPane1.setViewportView(jTable1);
    JUtility.scrolltoHomePosition(jScrollPane1);
    jTable1.getTableHeader().setReorderingAllowed(false);
    jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    jTable1.setFont(Common.font_list);

    jTable1.getColumnModel().getColumn(0).setPreferredWidth(95);
    jTable1.getColumnModel().getColumn(1).setPreferredWidth(95);
    jTable1.getColumnModel().getColumn(2).setPreferredWidth(95);
    jTable1.getColumnModel().getColumn(3).setPreferredWidth(120);

    jScrollPane1.repaint();

    JUtility.setResultRecordCountColour(jStatusText, false, 0, materialBatchTable.getRowCount());
  }
View Full Code Here

TOP

Related Classes of com.commander4j.tablemodel.JDBMaterialBatchTableModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.