org.tinymediamanager.ui.moviesets.MovieInMovieSetTableFormat Maven / Gradle / Ivy
/*
* Copyright 2012 - 2019 Manuel Laggner
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.tinymediamanager.ui.moviesets;
import java.util.ResourceBundle;
import javax.swing.ImageIcon;
import org.tinymediamanager.core.entities.MediaEntity;
import org.tinymediamanager.core.movie.entities.Movie;
import org.tinymediamanager.ui.IconManager;
import org.tinymediamanager.ui.UTF8Control;
import org.tinymediamanager.ui.components.table.TmmTableFormat;
/**
* The MovieInMovieSetTableFormat. Used as definition for the movie table in the movie set module
*
* @author Manuel Laggner
*/
public class MovieInMovieSetTableFormat extends TmmTableFormat {
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("messages", new UTF8Control()); //$NON-NLS-1$
public MovieInMovieSetTableFormat() {
/*
* title
*/
Column col = new Column(BUNDLE.getString("metatag.title"), "title", Movie::getTitleSortable, String.class);
addColumn(col);
/*
* year
*/
col = new Column(BUNDLE.getString("metatag.year"), "year", MediaEntity::getYear, Movie.class);
col.setColumnResizeable(false);
addColumn(col);
/*
* watched
*/
col = new Column(BUNDLE.getString("metatag.watched"), "watched", movie -> getCheckIcon(movie.isWatched()), ImageIcon.class);
col.setHeaderIcon(IconManager.WATCHED);
col.setColumnResizeable(false);
addColumn(col);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy