<commit_before>/*
 * $Id$
 *
 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
 * Santa Clara, California 95054, U.S.A. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
package org.jdesktop.swingx.table;

import java.awt.Component;
import java.awt.Dimension;

import javax.swing.table.JTableHeader;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableModel;

import org.jdesktop.swingx.JXTable;

/**
 * Creates and configures TableColumns. JXTable  
 * delegates all TableColumn creation and configuration to this class. 
 * <p>
 * It's meant to be shared across all tables of an 
 * application. To apply a custom ColumnFactory, subclass and
 * set the shared instance to the new class "early" in the application.
 * <pre>
 * <code>
 *   MyColumnFactory extends ColumnFactory {
 *       @Override
 *       public void configureTableColumn(TableModel model, 
 *           TableColumnExt columnExt) {
 *           super.configureTableColumn(model, columnExt);
 *           String title = columnExt.getTitle();
 *           title = title.substring(0,1).toUpperCase() + title.substring(1).toLowerCase();
 *           columnExt.setTitle(title);
 *       }
 *   };
 *   ColumnFactory.setInstance(new MyColumnFactory());
 * </code>
 * </pre>
 * 
 * Alternatively, any instance of JXTable can be configured 
 * individually with a custom ColumnFactory:
 * 
 *  <pre>
 *  <code>
 *    JXTable table = new JXTable();
 *    table.setColumnFactory(new MyColumnFactory());
 *    table.setModel(myTableModel);
 *  </code>
 *  </pre>
 * 
 * <p>
 * 
 * <commit_msg>fixed doc error (? @override in example code confuses the doc generation?)<commit_after>/*
 * $Id$
 *
 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
 * Santa Clara, California 95054, U.S.A. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
package org.jdesktop.swingx.table;

import java.awt.Component;
import java.awt.Dimension;

import javax.swing.table.JTableHeader;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableModel;

import org.jdesktop.swingx.JXTable;

/**
 * Creates and configures TableColumns. JXTable  
 * delegates all TableColumn creation and configuration to this class. 
 * <p>
 * It's meant to be shared across all tables of an 
 * application. To apply a custom ColumnFactory, subclass and
 * set the shared instance to the new class "early" in the application.
 * <pre>
 * <code>
 *   MyColumnFactory extends ColumnFactory {
 *       //@Override
 *       public void configureTableColumn(TableModel model, 
 *           TableColumnExt columnExt) {
 *           super.configureTableColumn(model, columnExt);
 *           String title = columnExt.getTitle();
 *           title = title.substring(0,1).toUpperCase() + title.substring(1).toLowerCase();
 *           columnExt.setTitle(title);
 *       }
 *   };
 *   ColumnFactory.setInstance(new MyColumnFactory());
 * </code>
 * </pre>
 * 
 * Alternatively, any instance of JXTable can be configured 
 * individually with a custom ColumnFactory:
 * 
 *  <pre>
 *  <code>
 *    JXTable table = new JXTable();
 *    table.setColumnFactory(new MyColumnFactory());
 *    table.setModel(myTableModel);
 *  </code>
 *  </pre>
 * 
 * <p>
 * 
 * 
{'fraction_non_alphanumeric': 0.09402441636324695, 'fraction_numerical': 0.012422360248447204, 'mean_word_length': 3.430740037950664, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3014446', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1269, 'n_words': 496}