Java Code Examples for javax.swing.table.TableColumn#setHeaderRenderer()
The following examples show how to use
javax.swing.table.TableColumn#setHeaderRenderer() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TableAligner.java From netcdf-java with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Installs alignment decorators in the table column at {@code colViewIndex}. * * @param table a table. * @param colViewIndex the index of the column in the table <i>view</i>. * @param alignment one of the following constants: * <ul> * <li>{@link SwingConstants#LEFT}</li> * <li>{@link SwingConstants#CENTER} (the default for image-only labels)</li> * <li>{@link SwingConstants#RIGHT}</li> * <li>{@link SwingConstants#LEADING} (the default for text-only labels)</li> * <li>{@link SwingConstants#TRAILING}</li> * </ul> */ public static void installInOneColumn(JTable table, int colViewIndex, int alignment) { TableColumn tableColumn = table.getColumnModel().getColumn(colViewIndex); TableCellRenderer headerRenderer = tableColumn.getHeaderRenderer(); if (headerRenderer == null) { headerRenderer = table.getTableHeader().getDefaultRenderer(); } if (!(headerRenderer instanceof RendererAlignmentDecorator)) { // Don't install a redundant decorator. tableColumn.setHeaderRenderer(new RendererAlignmentDecorator(headerRenderer, alignment)); } TableCellRenderer cellRenderer = tableColumn.getCellRenderer(); if (cellRenderer == null) { cellRenderer = table.getDefaultRenderer(table.getColumnClass(colViewIndex)); } if (!(cellRenderer instanceof RendererAlignmentDecorator)) { // Don't install a redundant decorator. tableColumn.setCellRenderer(new RendererAlignmentDecorator(cellRenderer, alignment)); } }
Example 2
Source File: Utilities.java From pcgen with GNU Lesser General Public License v2.1 | 6 votes |
public static TableColumn createTableColumn(int index, String headerValue, TableCellRenderer headerRenderer, boolean resizable) { TableColumn column = new TableColumn(index); if (headerValue.startsWith("in_")) { column.setHeaderValue(LanguageBundle.getString(headerValue)); } else { column.setHeaderValue(headerValue); } column.setHeaderRenderer(headerRenderer); if (!resizable) { column.sizeWidthToFit(); column.setMaxWidth(column.getMaxWidth() + 10); column.setPreferredWidth(column.getPreferredWidth() + 10); } column.setResizable(resizable); return column; }
Example 3
Source File: Utilities.java From pcgen with GNU Lesser General Public License v2.1 | 6 votes |
public static TableColumn createTableColumn(int index, String headerValue, TableCellRenderer headerRenderer, boolean resizable) { TableColumn column = new TableColumn(index); if (headerValue.startsWith("in_")) { column.setHeaderValue(LanguageBundle.getString(headerValue)); } else { column.setHeaderValue(headerValue); } column.setHeaderRenderer(headerRenderer); if (!resizable) { column.sizeWidthToFit(); column.setMaxWidth(column.getMaxWidth() + 10); column.setPreferredWidth(column.getPreferredWidth() + 10); } column.setResizable(resizable); return column; }
Example 4
Source File: VersionHistoryPanel.java From ghidra with Apache License 2.0 | 5 votes |
private void create() { tableModel = new VersionHistoryTableModel(new Version[0]); table = new GTable(tableModel); JScrollPane sp = new JScrollPane(table); table.setPreferredScrollableViewportSize(new Dimension(600, 120)); table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); add(sp, BorderLayout.CENTER); TableColumnModel columnModel = table.getColumnModel(); MyCellRenderer cellRenderer = new MyCellRenderer(); for (int i = 0; i < columnModel.getColumnCount(); i++) { TableColumn column = columnModel.getColumn(i); GTableHeaderRenderer headRenderer = new GTableHeaderRenderer(); column.setHeaderRenderer(headRenderer); column.setCellRenderer(cellRenderer); String name = (String) column.getIdentifier(); if (name.equals(VersionHistoryTableModel.VERSION)) { column.setPreferredWidth(80); } else if (name.equals(VersionHistoryTableModel.DATE)) { column.setPreferredWidth(210); } else if (name.equals(VersionHistoryTableModel.COMMENTS)) { column.setPreferredWidth(250); } else if (name.equals(VersionHistoryTableModel.USER)) { column.setPreferredWidth(125); } } }
Example 5
Source File: AstrosoftTable.java From Astrosoft with GNU General Public License v2.0 | 5 votes |
private void localizeColumns() { AstrosoftTableModel model = (AstrosoftTableModel) getModel(); ColumnMetaData colMetaData = model.getColumnMetaData(); for(AstrosoftTableColumn col : colMetaData.getLocaleColumns()){ TableColumn tc = getColumnModel().getColumn(model.getColumnIndex(col)); tc.setCellRenderer(new LocalizedCellRenderer(getCellRenderer(col), tableFont)); tc.setHeaderRenderer(new LocalizedCellRenderer(getHeaderRenderer(col), headerFont)); } }
Example 6
Source File: TablePanelController.java From mae-annotation with GNU General Public License v3.0 | 5 votes |
private void setBoldColumnHeader(TableColumn column) { column.setHeaderRenderer(new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable t, Object v, boolean s, boolean f, int r, int c) { super.getTableCellRendererComponent(t, v, s, f, r, c); JTableHeader tableHeader = t.getTableHeader(); if (tableHeader != null) { setForeground(tableHeader.getForeground()); setBackground(tableHeader.getBackground()); setFont(tableHeader.getFont().deriveFont(Font.BOLD)); } Icon sortIcon = null; if (t.getRowSorter().getSortKeys().size() > 0) { RowSorter.SortKey sortKey = t.getRowSorter().getSortKeys().get(0); if (sortKey != null && t.convertColumnIndexToView(sortKey.getColumn()) == c) { String iconKey = sortKey.getSortOrder() == SortOrder.ASCENDING ? "Table.ascendingSortIcon" : "Table.descendingSortIcon"; sortIcon = UIManager.getIcon(iconKey); } } setIcon(sortIcon); setBorder(UIManager.getBorder("TableHeader.cellBorder")); setHorizontalAlignment(CENTER); setHorizontalTextPosition(LEFT); return this; } }); }
Example 7
Source File: PhenodataEditor.java From chipster with MIT License | 5 votes |
private void updatePhenodataTableHeaders(){ // Set warning icon for (Object columnObject : table.getColumns()){ if (columnObject instanceof TableColumn) { TableColumn tableColumn = (TableColumn) columnObject; if(isGroupPhenodataColumn(tableColumn.getHeaderValue().toString())){ DefaultTableCellRenderer header = new DefaultTableCellRenderer(); if(!data.queryFeatures("/phenodata/is-complete").exists()){ header.setIcon(VisualConstants.getIcon(VisualConstants.PHENODATA_ICON)); logger.debug("Header updated. Warning icon enabled."); } else { header.setIcon(null); logger.debug("Header updated. Warning icon disabled."); } // FIXME hackhack header.setBackground(VisualConstants.TEXTAREA_UNEDITABLE_BACKGROUND); header.repaint(); table.getTableHeader().repaint(); tableColumn.setHeaderRenderer(header); } } } }
Example 8
Source File: StatPanel.java From triplea with GNU General Public License v3.0 | 5 votes |
protected void initLayout() { final boolean hasTech = !TechAdvance.getTechAdvances(gameData, null).isEmpty(); // do no include a grid box for tech if there is no tech setLayout(new GridLayout((hasTech ? 2 : 1), 1)); final JTable statsTable = new JTable(dataModel); statsTable.getTableHeader().setReorderingAllowed(false); statsTable.getColumnModel().getColumn(0).setPreferredWidth(175); add(new JScrollPane(statsTable)); // if no technologies, do not show the tech table if (!hasTech) { return; } final JTable techTable = new JTable(techModel); techTable.getTableHeader().setReorderingAllowed(false); techTable.getColumnModel().getColumn(0).setPreferredWidth(500); // show icons for players: final TableCellRenderer componentRenderer = new JComponentTableCellRenderer(); for (int i = 1; i < techTable.getColumnCount(); i++) { final TableColumn column = techTable.getColumnModel().getColumn(i); column.setHeaderRenderer(componentRenderer); final String player = techTable.getColumnName(i); final JLabel value = new JLabel("", getIcon(player), SwingConstants.CENTER); value.setToolTipText(player); column.setHeaderValue(value); } add(new JScrollPane(techTable)); }
Example 9
Source File: SorterTableColumnModel.java From spotbugs with GNU Lesser General Public License v2.1 | 5 votes |
private TableColumn makeTableColumn(int x, Sortables c) { TableColumn tc = new TableColumn(x); FBTableCellRenderer temp = new FBTableCellRenderer(); tc.setHeaderRenderer(temp); tc.setIdentifier(c); tc.setHeaderValue(c); tc.setResizable(false); tc.sizeWidthToFit(); return tc; }
Example 10
Source File: SyncPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "SyncPanel.table.header.info.toolTip=Click to sort by Information", "SyncPanel.table.header.remotePath.toolTip=Click to sort by Remote Path", "SyncPanel.table.header.localPath.toolTip=Click to sort by Local Path", "SyncPanel.table.header.operation.toolTip=Click to swap Remote Path and Local Path" }) private void initTableHeader() { JTableHeader header = itemTable.getTableHeader(); header.setPreferredSize(new Dimension(itemTable.getColumnModel().getTotalColumnWidth(), Math.max(20, itemTable.getFont().getSize() + 5))); header.setReorderingAllowed(false); // columns TableColumn infoColumn = header.getColumnModel().getColumn(0); infoColumn.setHeaderRenderer(new HeaderRenderer(Bundle.SyncPanel_table_header_info_toolTip())); infoColumn.setHeaderValue(ImageUtilities.loadImageIcon(HEADER_INFO_ICON_PATH, false)); TableColumn operationColumn = header.getColumnModel().getColumn(2); operationColumn.setHeaderRenderer(new HeaderRenderer(Bundle.SyncPanel_table_header_operation_toolTip())); operationColumn.setHeaderValue(ImageUtilities.loadImageIcon(HORIZONTAL_ICON_PATH, false)); TableColumn remotePathColumn = header.getColumnModel().getColumn(remotePathFirst ? 1 : 3); remotePathColumn.setHeaderRenderer(new HeaderRenderer(Bundle.SyncPanel_table_header_remotePath_toolTip())); TableColumn localPathColumn = header.getColumnModel().getColumn(remotePathFirst ? 3 : 1); localPathColumn.setHeaderRenderer(new HeaderRenderer(Bundle.SyncPanel_table_header_localPath_toolTip())); // listener itemTable.getTableHeader().addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (itemTable.columnAtPoint(e.getPoint()) == 2) { swapPaths(); } } }); }
Example 11
Source File: ItemListImageViewerEvent.java From stendhal with GNU General Public License v2.0 | 4 votes |
@Override public void prepareView(final Dimension maxSize) { Dimension screenSize = GameScreen.get().getSize(); int maxPreferredWidth = screenSize.width - 80; if (event.has("caption")) { JLabel caption = new JLabel("<html><div width=" + (maxPreferredWidth - 10) + ">" + event.get("caption") + "</div></html>"); caption.setBorder(BorderFactory.createEmptyBorder(PAD, PAD, PAD, PAD)); add(caption, BorderLayout.NORTH); } JTable table = createTable(maxPreferredWidth); // Prevents selection table.setEnabled(false); table.setFillsViewportHeight(true); table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); TableColumn col = table.getColumnModel().getColumn(0); col.setCellRenderer(new SpriteCellRenderer()); col = table.getColumnModel().getColumn(1); DefaultTableCellRenderer r = new DefaultTableCellRenderer(); r.setHorizontalAlignment(SwingConstants.CENTER); col.setCellRenderer(r); col = table.getColumnModel().getColumn(2); col.setCellRenderer(new DescriptionCellRenderer()); HeaderRenderer hr = new HeaderRenderer(); Enumeration<TableColumn> cols = table.getColumnModel().getColumns(); while (cols.hasMoreElements()) { TableColumn c = cols.nextElement(); c.setHeaderRenderer(hr); } adjustColumnWidths(table); adjustRowHeights(table); ScrolledViewport viewPort = new ScrolledViewport(table); /* * maxPreferredWidth is incorrect, but java does not seem to support * max-width property for div's, so all the cells report the same * preferred width anyway. */ viewPort.getComponent().setPreferredSize(new Dimension(maxPreferredWidth, Math.min(screenSize.height - 100, table.getPreferredSize().height + hr.getPreferredSize().height + 4 * PAD))); viewPort.getComponent().setBackground(table.getBackground()); add(viewPort.getComponent(), BorderLayout.CENTER); setVisible(true); }
Example 12
Source File: DiagnosticTable.java From FoxTelem with GNU General Public License v3.0 | 4 votes |
private JTable addErrorTable() { if (conversionType == BitArrayLayout.CONVERT_IHU_DIAGNOSTIC) tableModel = new DiagnosticTableModel(); else if (conversionType == BitArrayLayout.CONVERT_HARD_ERROR) tableModel = new HardErrorTableModel(); else if (conversionType == BitArrayLayout.CONVERT_SOFT_ERROR) tableModel = new SoftErrorTableModel(); else if (conversionType == BitArrayLayout.CONVERT_SOFT_ERROR_84488) tableModel = new SoftError84488TableModel(); else if (conversionType == BitArrayLayout.CONVERT_ICR_DIAGNOSTIC) tableModel = new IcrDiagnosticTableModel(); else if (conversionType == BitArrayLayout.CONVERT_COM1_ISIS_ANT_STATUS) tableModel = new IsisAntennaStatusTableModel(); JTable table = new JTable(tableModel); table.setAutoCreateRowSorter(true); scrollPane = new JScrollPane (table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); table.setFillsViewportHeight(true); table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); add(scrollPane, BorderLayout.CENTER); //add(table, BorderLayout.CENTER); TableColumn column = null; column = table.getColumnModel().getColumn(0); column.setPreferredWidth(45); column = table.getColumnModel().getColumn(1); column.setPreferredWidth(55); DefaultTableCellRenderer centerRenderer = new DefaultTableCellRenderer(); centerRenderer.setHorizontalAlignment( SwingConstants.CENTER ); if (conversionType == BitArrayLayout.CONVERT_IHU_DIAGNOSTIC) { column = table.getColumnModel().getColumn(2); column.setPreferredWidth(250); } else if (conversionType == BitArrayLayout.CONVERT_HARD_ERROR) for (int i=0; i<6; i++) { column = table.getColumnModel().getColumn(i+2); column.setPreferredWidth(60); column.setCellRenderer(centerRenderer); column.setHeaderRenderer(centerRenderer); } else if (conversionType == BitArrayLayout.CONVERT_SOFT_ERROR) { for (int i=0; i<4; i++) { column = table.getColumnModel().getColumn(i+2); column.setPreferredWidth(60); column.setCellRenderer(centerRenderer); column.setHeaderRenderer(centerRenderer); } if (conversionType == BitArrayLayout.CONVERT_SOFT_ERROR_84488) { column = table.getColumnModel().getColumn(6); column.setPreferredWidth(60); column.setCellRenderer(centerRenderer); column.setHeaderRenderer(centerRenderer); } } else if (conversionType == BitArrayLayout.CONVERT_ICR_DIAGNOSTIC) { for (int i=0; i<4; i++) { column = table.getColumnModel().getColumn(i+2); column.setPreferredWidth(60); column.setCellRenderer(centerRenderer); column.setHeaderRenderer(centerRenderer); } } else if (conversionType == BitArrayLayout.CONVERT_COM1_ISIS_ANT_STATUS) { for (int i=0; i<15; i++) { column = table.getColumnModel().getColumn(i+2); column.setPreferredWidth(60); column.setCellRenderer(centerRenderer); column.setHeaderRenderer(centerRenderer); } } return table; }
Example 13
Source File: PageListTableModel.java From wpcleaner with Apache License 2.0 | 4 votes |
/** * Configure a column model. * * @param model Column model. */ public void configureColumnModel(TableColumnModel model) { TableColumn column; column = model.getColumn(COLUMN_BACKLINKS_MAIN); column.setMinWidth(50); column.setPreferredWidth(50); column.setMaxWidth(100); column = model.getColumn(COLUMN_BACKLINKS_OTHER); column.setMinWidth(50); column.setPreferredWidth(50); column.setMaxWidth(100); column = model.getColumn(COLUMN_BACKLINKS_TEMPLATE); column.setMinWidth(40); column.setPreferredWidth(40); column.setMaxWidth(100); column = model.getColumn(COLUMN_COMMENTS_TEXT); column.setMinWidth(60); column = model.getColumn(COLUMN_DISAMBIGUATION); column.setMinWidth(20); column.setPreferredWidth(20); column.setMaxWidth(20); column.setCellRenderer( new BooleanIconCellRenderer("commons-disambig-colour.png", null)); column.setHeaderRenderer( new IconCellRenderer("commons-disambig-colour.png")); column = model.getColumn(COLUMN_REDIRECT); column.setMinWidth(20); column.setPreferredWidth(20); column.setMaxWidth(20); column.setCellRenderer( new BooleanIconCellRenderer("commons-redirect-arrow-without-text.png", null)); column.setHeaderRenderer( new IconCellRenderer("commons-redirect-arrow-without-text.png")); column = model.getColumn(COLUMN_PAGE); column.setMinWidth(100); column.setPreferredWidth(200); column = model.getColumn(COLUMN_WATCHED); column.setMinWidth(20); column.setPreferredWidth(20); column.setMaxWidth(20); column.setCellRenderer( new BooleanIconCellRenderer("gnome-logviewer.png", null)); column.setHeaderRenderer( new IconCellRenderer("gnome-logviewer.png")); }
Example 14
Source File: BotCWTableModel.java From wpcleaner with Apache License 2.0 | 4 votes |
/** * Configure a column model. * * @param table Table for which the column model should be configured. */ public void configureColumnModel(JTable table) { if (table == null) { return; } TableColumnModel model = table.getColumnModel(); TableColumn column = null; column = model.getColumn(COLUMN_BOT); column.setMinWidth(20); column.setPreferredWidth(20); column.setMaxWidth(20); column.setCellRenderer( new BooleanIconCellRenderer("commons-approve-icon.png", null)); column.setHeaderRenderer( new IconCellRenderer("commons-nuvola-apps-kcmsystem.png")); column = model.getColumn(COLUMN_DESCRIPTION); column.setMinWidth(100); column = model.getColumn(COLUMN_FIX); column.setMinWidth(20); column.setPreferredWidth(20); column.setMaxWidth(20); column.setHeaderRenderer( new IconCellRenderer("commons-nuvola-apps-kcmsystem.png")); column = model.getColumn(COLUMN_LIST); column.setMinWidth(20); column.setPreferredWidth(20); column.setMaxWidth(20); column.setHeaderRenderer( new IconCellRenderer("gnome-logviewer.png")); column = model.getColumn(COLUMN_NUMBER); column.setMinWidth(40); column.setPreferredWidth(40); column.setMaxWidth(40); table.addMouseListener(EventHandler.create( MouseListener.class, this, "mouseClicked", "", "mouseClicked")); }
Example 15
Source File: MainPanel.java From java-swing-tips with MIT License | 4 votes |
private MainPanel() { super(new BorderLayout()); String[] columnNames = {"Integer", "String", "Boolean"}; Object[][] data = { {12, "aaa", true}, {5, "bbb", false}, {92, "CCC", true}, {0, "DDD", false} }; TableModel model = new DefaultTableModel(data, columnNames) { @Override public Class<?> getColumnClass(int column) { return getValueAt(0, column).getClass(); } }; // JTable table = new JTable(model) { // @Override public Component prepareRenderer(TableCellRenderer tcr, int row, int column) { // Component c = super.prepareRenderer(tcr, row, column); // if (1 == convertColumnIndexToModel(column)) { // initLabel((JLabel) c, row); // } else { // ((JLabel) c).setHorizontalAlignment(SwingConstants.RIGHT); // } // return c; // } // }; JTable table = new JTable(model); table.setAutoCreateRowSorter(true); TableColumn col = table.getColumnModel().getColumn(0); col.setMinWidth(60); col.setMaxWidth(60); col.setResizable(false); col = table.getColumnModel().getColumn(1); col.setCellRenderer(new HorizontalAlignmentTableRenderer()); col = table.getColumnModel().getColumn(2); col.setHeaderRenderer(new HeaderRenderer()); ButtonGroup bg = new ButtonGroup(); JPanel p = new JPanel(); Stream.of(leftRadio, centerRadio, rightRadio, customRadio).forEach(rb -> { bg.add(rb); p.add(rb); rb.addActionListener(e -> table.repaint()); }); add(p, BorderLayout.NORTH); add(new JScrollPane(table)); setPreferredSize(new Dimension(320, 240)); }
Example 16
Source File: DJarInfo.java From portecle with GNU General Public License v2.0 | 4 votes |
/** * Initialize the dialog's GUI components. * * @throws IOException Problem occurred getting JAR information */ private void initComponents() throws IOException { JarFile[] jarFiles = getClassPathJars(); // JAR Information table // Create the table using the appropriate table model JarInfoTableModel jiModel = new JarInfoTableModel(); jiModel.load(jarFiles); JTable jtJarInfo = new JTable(jiModel); jtJarInfo.setRowMargin(0); jtJarInfo.getColumnModel().setColumnMargin(0); jtJarInfo.getTableHeader().setReorderingAllowed(false); jtJarInfo.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); jtJarInfo.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); // Add custom renderers for the table cells and headers for (int iCnt = 0; iCnt < jtJarInfo.getColumnCount(); iCnt++) { TableColumn column = jtJarInfo.getColumnModel().getColumn(iCnt); column.setPreferredWidth(150); column.setHeaderRenderer(new JarInfoTableHeadRend()); column.setCellRenderer(new JarInfoTableCellRend()); } // Make the table sortable jtJarInfo.setAutoCreateRowSorter(true); // ...and sort it by jar file by default jtJarInfo.getRowSorter().toggleSortOrder(0); // Put the table into a scroll pane JScrollPane jspJarInfoTable = new JScrollPane(jtJarInfo, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); jspJarInfoTable.getViewport().setBackground(jtJarInfo.getBackground()); // Put the scroll pane into a panel JPanel jpJarInfoTable = new JPanel(new BorderLayout(10, 10)); jpJarInfoTable.setPreferredSize(new Dimension(500, 150)); jpJarInfoTable.add(jspJarInfoTable, BorderLayout.CENTER); jpJarInfoTable.setBorder(new EmptyBorder(5, 5, 5, 5)); JButton jbOK = getOkButton(true); JPanel jpOK = new JPanel(new FlowLayout(FlowLayout.CENTER)); jpOK.add(jbOK); getContentPane().add(jpJarInfoTable, BorderLayout.CENTER); getContentPane().add(jpOK, BorderLayout.SOUTH); getRootPane().setDefaultButton(jbOK); initDialog(); jbOK.requestFocusInWindow(); }
Example 17
Source File: AstrosoftTable.java From Astrosoft with GNU General Public License v2.0 | 4 votes |
public void setHeaderRenderer(TableCellRenderer renderer, AstrosoftTableColumn col){ TableColumn tc = getColumnModel().getColumn(((AstrosoftTableModel) getModel()).getColumnIndex(col)); tc.setHeaderRenderer(renderer); }
Example 18
Source File: SimpleStyleEditorPanel.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 4 votes |
private void applyHeaderSize( final TableColumn col ) { col.setHeaderRenderer( new DefaultTableHeaderRenderer() ); col.sizeWidthToFit(); }
Example 19
Source File: StyleEditorPanel.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 4 votes |
private void applyHeaderSize( final TableColumn col ) { col.setHeaderRenderer( new DefaultTableHeaderRenderer() ); col.sizeWidthToFit(); }
Example 20
Source File: VisualAttributeEditorPanel.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 4 votes |
private void applyHeaderSize( final TableColumn col ) { col.setHeaderRenderer( new DefaultTableHeaderRenderer() ); col.sizeWidthToFit(); }