javax.swing.JTable.setTableHeader()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(320)

本文整理了Java中javax.swing.JTable.setTableHeader()方法的一些代码示例,展示了JTable.setTableHeader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.setTableHeader()方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:setTableHeader

JTable.setTableHeader介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

JTable table = new JTable(CompModel);
table.setRowHeight(new CompCellPanel().getPreferredSize().height);
table.setTableHeader(null);
CompCellEditorRenderer compCellEditorRenderer = new CompCellEditorRenderer();
table.setDefaultRenderer(Object.class, compCellEditorRenderer);

代码示例来源:origin: pentaho/mondrian

relationTable.setTableHeader(null);

代码示例来源:origin: cmu-phil/tetrad

private JTable impliedJTable() {
  if (this.impliedJTable == null) {
    this.impliedJTable = new JTable();
    this.impliedJTable.setTableHeader(null);
  }
  return this.impliedJTable;
}

代码示例来源:origin: cmu-phil/tetrad

private JTable impliedJTable() {
  if (this.impliedJTable == null) {
    this.impliedJTable = new JTable();
    this.impliedJTable.setTableHeader(null);
  }
  return this.impliedJTable;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

private JTable makeJTable(TableModel model) {
JTable table = new JTable(model);
table.getSelectionModel().
  addListSelectionListener( new ListSelectionListener() {
  public void valueChanged(ListSelectionEvent e) {
    // DEBUG System.out.println("JTable Selection changed");
    adjustButtons();
  }
  });
// single column, skip the header
table.setTableHeader(null);
return table;
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

private void createUIComponents() {
 roleTable = new ServiceAccountRolesTable();
 roleTable.setTableHeader(null);
}

代码示例来源:origin: stackoverflow.com

JTable t = new JTable(3,3);
 JScrollPane jScrollPane = new JScrollPane(t);
 t.setTableHeader(null);
 jScrollPane.setColumnHeaderView(null);

代码示例来源:origin: omegat-org/omegat

public JTable getTable() {
  if (table == null) {
    table = new JTable();
    table.setCellSelectionEnabled(true);
    table.setFocusable(false);
    table.setTableHeader(null);
    table.addMouseListener(mouseAdapter);
  }
  return table;
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

private void init() {
  tabFonts.setTableHeader(null);
  tabFonts.setModel(model);
  tabFonts.getColumnModel().getColumn(0).setCellEditor(editor);
  tabFonts.setDefaultRenderer(Font.class, new FontRenderer());
  tabFonts.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

private void init() {
  tabMarks.setTableHeader(null);
  tabMarks.setModel(model);
  tabMarks.getColumnModel().getColumn(0).setCellEditor(editor);
  tabMarks.setDefaultRenderer(ExternalGraphic.class, new ExternalGraphicRenderer());
  tabMarks.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

private void init() {
  tabMarks.setTableHeader(null);
  tabMarks.setModel(model);
  tabMarks.getColumnModel().getColumn(0).setCellEditor(editor);
  tabMarks.setDefaultRenderer(Mark.class, new MarkRenderer());
  tabMarks.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

private void init() {
  tabFonts.setTableHeader(null);
  tabFonts.setModel(model);
  tabFonts.getColumnModel().getColumn(0).setCellEditor(editor);
  tabFonts.setDefaultRenderer(SelectedChannelType.class, new SelectedRenderer());
  tabFonts.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

private void init() {
  tabFonts.setTableHeader(null);
  tabFonts.setModel(model);
  tabFonts.getColumnModel().getColumn(0).setCellEditor(editor);
  tabFonts.setDefaultRenderer(ColorMapEntry.class, new EntryRenderer());
  tabFonts.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}

代码示例来源:origin: raydac/netbeans-mmd-plugin

public FileListPanel(@Nonnull @MustNotContainNull final List<File> files) {
 initComponents();
 for(final File f : files){
  this.files.add(new FileSelector(f));
 }
 this.tableFiles.setModel(this);
 this.tableFiles.setTableHeader(null);
 this.tableFiles.getColumnModel().getColumn(0).setMaxWidth(24);
 
 this.setMinimumSize(new Dimension(300,300));
 this.setPreferredSize(new Dimension(480,400));
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

private void createUIComponents() {
 commonPanel = new ServiceAccountKeyDownloadedPanel(cloudProject.projectId(), downloadPath);
 runConfigurationTable = new RunConfigurationTable();
 runConfigurationTable.setTableHeader(null);
}

代码示例来源:origin: de.sciss/jtreetable

protected void unconfigureTable() {
  table.setTableHeader(null);
  table.setModel(new DefaultTableModel());
  table.setColumnModel(new DefaultTableColumnModel());
  table.setSelectionModel(new DefaultListSelectionModel());
  table.setUI(null);
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common

public void setTableHeader(final JTableHeader _tableHeader){
  if(getTableHeader()!=null) {
   getTableHeader().removeMouseListener(COLUMN_AUTO_RESIZER);
  }
  super.setTableHeader(_tableHeader);
  if(_tableHeader!=null && isShowing()) {
   _tableHeader.addMouseListener(COLUMN_AUTO_RESIZER);
  }
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
protected void initComponents() {
  tableModel = new InformationTableModel();
  getTable().setModel(tableModel);
  getTable().setTableHeader(null);
  getTable().addMouseListener(new PopupHandler());
  getTable().setShowGrid(false);
  getTable().setRowSelectionAllowed(false);
  getTable().setColumnSelectionAllowed(false);
  getTable().setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  add(new JScrollPane(getTable()));
}

代码示例来源:origin: bcdev/beam

@Override
protected void initComponents() {
  tableModel = new GeoCodingTableModel();
  getTable().setTableHeader(null);
  getTable().addMouseListener(new PopupHandler());
  getTable().setShowGrid(false);
  getTable().setRowSelectionAllowed(false);
  getTable().setColumnSelectionAllowed(false);
  add(new JScrollPane(getTable()), BorderLayout.CENTER);
}

代码示例来源:origin: bcdev/beam

@Override
protected void initComponents() {
  tableModel = new InformationTableModel();
  getTable().setTableHeader(null);
  getTable().addMouseListener(new PopupHandler());
  getTable().setShowGrid(false);
  getTable().setRowSelectionAllowed(false);
  getTable().setColumnSelectionAllowed(false);
  getTable().setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  add(new JScrollPane(getTable()));
}

相关文章

JTable类方法