// Path: src/main/java/org/zephyrsoft/sdb2/model/FilterTypeEnum.java
// public enum FilterTypeEnum {
// 	ONLY_TITLE(FieldName.TITLE), TITLE_AND_LYRICS(FieldName.TITLE, FieldName.LYRICS), ONLY_LYRICS(FieldName.LYRICS);
// 	
// 	private FieldName[] fields;
// 	
// 	private FilterTypeEnum(FieldName... fields) {
// 		this.fields = fields;
// 	}
// 	
// 	public FieldName[] getFields() {
// 		return fields;
// 	}
// 	
// 	public String getInternalName() {
// 		return WordUtils.capitalizeFully(name(), new char[] { '_' }).replaceAll("_", "");
// 	}
// 	
// 	public static FilterTypeEnum withInternalName(String internalName) {
// 		for (FilterTypeEnum fte : values()) {
// 			if (fte.getInternalName().equalsIgnoreCase(internalName)) {
// 				return fte;
// 			}
// 		}
// 		return null;
// 	}
// }


import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zephyrsoft.sdb2.model.FilterTypeEnum;
/*
 * This file is part of the Song Database (SDB).
 *
 * SDB is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License 3.0 as published by
 * the Free Software Foundation.
 *
 * SDB 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 General Public License 3.0 for more details.
 *
 * You should have received a copy of the GNU General Public License 3.0
 * along with SDB. If not, see <http://www.gnu.org/licenses/>.
 */
package org.zephyrsoft.sdb2.gui.renderer;




/**
 * A {@link ListCellRenderer} for {@link FilterTypeEnum} values.
 */
public class FilterTypeCellRenderer implements ListCellRenderer<FilterTypeEnum> {
	
	private static final Logger LOG = LoggerFactory.getLogger(FilterTypeCellRenderer.class);
	
	protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer();
	
	@Override
	public Component getListCellRendererComponent(JList<? extends FilterTypeEnum> list, FilterTypeEnum value,
		int index, boolean isSelected, boolean cellHasFocus) {
		JLabel ret = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
		if (value == null) {
			ret.setText("");
// Path: src/main/java/org/zephyrsoft/sdb2/model/FilterTypeEnum.java
// public enum FilterTypeEnum {
// 	ONLY_TITLE(FieldName.TITLE), TITLE_AND_LYRICS(FieldName.TITLE, FieldName.LYRICS), ONLY_LYRICS(FieldName.LYRICS);
// 	
// 	private FieldName[] fields;
// 	
// 	private FilterTypeEnum(FieldName... fields) {
// 		this.fields = fields;
// 	}
// 	
// 	public FieldName[] getFields() {
// 		return fields;
// 	}
// 	
// 	public String getInternalName() {
// 		return WordUtils.capitalizeFully(name(), new char[] { '_' }).replaceAll("_", "");
// 	}
// 	
// 	public static FilterTypeEnum withInternalName(String internalName) {
// 		for (FilterTypeEnum fte : values()) {
// 			if (fte.getInternalName().equalsIgnoreCase(internalName)) {
// 				return fte;
// 			}
// 		}
// 		return null;
// 	}
// }


// Path: src/main/java/org/zephyrsoft/sdb2/gui/renderer/FilterTypeCellRenderer.java
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zephyrsoft.sdb2.model.FilterTypeEnum;

/*
 * This file is part of the Song Database (SDB).
 *
 * SDB is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License 3.0 as published by
 * the Free Software Foundation.
 *
 * SDB 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 General Public License 3.0 for more details.
 *
 * You should have received a copy of the GNU General Public License 3.0
 * along with SDB. If not, see <http://www.gnu.org/licenses/>.
 */
package org.zephyrsoft.sdb2.gui.renderer;




/**
 * A {@link ListCellRenderer} for {@link FilterTypeEnum} values.
 */
public class FilterTypeCellRenderer implements ListCellRenderer<FilterTypeEnum> {
	
	private static final Logger LOG = LoggerFactory.getLogger(FilterTypeCellRenderer.class);
	
	protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer();
	
	@Override
	public Component getListCellRendererComponent(JList<? extends FilterTypeEnum> list, FilterTypeEnum value,
		int index, boolean isSelected, boolean cellHasFocus) {
		JLabel ret = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
		if (value == null) {
			ret.setText("");
		} else if (value == FilterTypeEnum.ONLY_LYRICS) {