Exemplo n.º 1
0
  public JXTable createConfigureDecadeDetailsTable(LinkTableModel model) {
    JXTable table = new JXTable();
    table.setCellSelectionEnabled(true);
    table.setFont(monthView.getFont());
    table.setShowGrid(false, false);
    table.setTableHeader(null);

    table.setDefaultRenderer(
        Date.class, createDateRenderer(model.selectAction, monthPaddingBorder, JLabel.CENTER));
    table.setHighlighters(createCurrentDateHighlighters());
    table.setModel(model);
    Component comp = table.prepareRenderer(table.getCellRenderer(1, 1), 1, 1);
    table.setRowHeight(comp.getPreferredSize().height);

    return table;
  }
Exemplo n.º 2
0
  public JXTable createConfigureMonthDetailsTable(LinkTableModel dateTableModel) {

    JXTable table = new JXTable();
    table.setCellSelectionEnabled(true);
    table.setVisibleRowCount(6);
    table.setFont(monthView.getFont());
    table.setShowGrid(false, false);

    configureDayOfWeeksHeader(table);
    table.setDefaultRenderer(
        Date.class,
        createDateRenderer(dateTableModel.selectAction, paddingBoxBorder, JLabel.TRAILING));

    table.setHighlighters(createCurrentDateHighlighters());
    table.setModel(dateTableModel);
    table.packAll();
    Component comp = table.prepareRenderer(table.getCellRenderer(1, 1), 1, 1);
    table.setRowHeight(comp.getPreferredSize().height);

    return table;
  }
 private void init_tbl_branch_locations() {
   tbl_branch_locations_ALM = new ArrayListModel();
   tbl_branch_locations_M = new Tblbranch_locationsModel(tbl_branch_locations_ALM);
   tbl_branch_locations.getTableHeader().setPreferredSize(new Dimension(100, 40));
   tbl_branch_locations.setModel(tbl_branch_locations_M);
   tbl_branch_locations.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
   tbl_branch_locations.setRowHeight(25);
   int[] tbl_widths_branch_locations = {200, 200, 70, 0, 0, 0};
   for (int i = 0, n = tbl_widths_branch_locations.length; i < n; i++) {
     if (i == 0) {
       continue;
     }
     TableWidthUtilities.setColumnWidth(tbl_branch_locations, i, tbl_widths_branch_locations[i]);
   }
   Dimension d = tbl_branch_locations.getTableHeader().getPreferredSize();
   d.height = 25;
   tbl_branch_locations.getTableHeader().setPreferredSize(d);
   tbl_branch_locations.getTableHeader().setFont(new java.awt.Font("Arial", 0, 11));
   tbl_branch_locations.setRowHeight(25);
   tbl_branch_locations.setFont(new java.awt.Font("Arial", 0, 11));
 }