Package jtrackbase.gui

Source Code of jtrackbase.gui.ListGenrePanel

/* License see bottom */
package jtrackbase.gui;

import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

import jtrackbase.db.Genre;
import jtrackbase.db.GenreFacade;
import jtrackbase.gui.table.EntityTableModel;
import jtrackbase.gui.table.GenreTableModel;

public class ListGenrePanel extends AbstractListPanel<Genre> {
  public static final String PANEL_NAME = "Genre";

  public ListGenrePanel() {
    super(PANEL_NAME);
  }

  @Override
  protected EntityTableModel<Genre> createEmptyModel() {
    return new GenreTableModel();
  }

  @Override
  protected EntityTableModel<Genre> createFullModel() {
    return new GenreTableModel(GenreFacade.findAll());
  }

  @Override
  protected void detailEntity(Genre entity) {
    JOptionPane.showMessageDialog(SwingUtilities.getRoot(this),
        "Cannot detail genres yet", "Not supported",
        JOptionPane.WARNING_MESSAGE);
  }
 
}

/*
    Copyright (C) 2008  Onkobu Tanaake

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 for more details.

    You should have received a copy of the GNU General Public License
    along with this program (gplv3.txt).
*/
TOP

Related Classes of jtrackbase.gui.ListGenrePanel

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.