コード例 #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;
  }
コード例 #2
0
ファイル: JBeanEditor.java プロジェクト: fommil/common-utils
  public JBeanEditor() {
    super();
    setLayout(new BorderLayout());

    //        setBackground(UIManager.getColor("window"));
    //        table.setBackground(UIManager.getColor("window"));
    table.setTableHeader(null);
    //        table.setBackground(null);
    table.setShowGrid(false);
    table.setCellSelectionEnabled(false);
    table.setFocusable(false);
    add(table, BorderLayout.CENTER);

    // should we expose spacing as a user property?
    Dimension spacing = new Dimension(5, 0);
    table.setIntercellSpacing(spacing);
  }
コード例 #3
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;
  }