1 /* 2 * aTunes 3 * Copyright (C) Alex Aranda, Sylvain Gaudard and contributors 4 * 5 * See http://www.atunes.org/wiki/index.php?title=Contributing for information about contributors 6 * 7 * http://www.atunes.org 8 * http://sourceforge.net/projects/atunes 9 * 10 * This program is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU General Public License 12 * as published by the Free Software Foundation; either version 2 13 * of the License, or (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 */ 20 21 package net.sourceforge.atunes.kernel.modules.pattern; 22 23 import javax.swing.table.DefaultTableColumnModel; 24 import javax.swing.table.TableColumn; 25 26 import net.sourceforge.atunes.utils.I18nUtils; 27 28 final class PatternPreviewDefaultTableColumnModel extends DefaultTableColumnModel { 29 /** 30 * 31 */ 32 private static final long serialVersionUID = -1915883409261076543L; 33 34 @Override addColumn(TableColumn column)35 public void addColumn(TableColumn column) { 36 super.addColumn(column); 37 if (column.getHeaderValue().equals(I18nUtils.getString("NAME"))) { 38 column.setPreferredWidth(100); 39 } else { 40 // Space removed from first column is given to second column 41 column.setPreferredWidth(230); 42 } 43 } 44 }