Package jtrackbase.gui

Source Code of jtrackbase.gui.ListMediumPanel

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

import java.awt.BorderLayout;

import javax.swing.JDialog;

import jtrackbase.db.Medium;
import jtrackbase.db.MediumFacade;
import jtrackbase.gui.table.EntityTableModel;
import jtrackbase.gui.table.MediumTableModel;

public class ListMediumPanel extends AbstractListPanel<Medium> {
  public static final String PANEL_NAME = "Medium";

  public ListMediumPanel() {
    super(PANEL_NAME);
  }

  @Override
  protected EntityTableModel<Medium> createEmptyModel() {
    return new MediumTableModel();
  }

  @Override
  protected EntityTableModel<Medium> createFullModel() {
    return new MediumTableModel(MediumFacade.findAll());
  }

  @Override
  protected void detailEntity(Medium entity) {
    MediumPanel mp=new MediumPanel(entity);
    JDialog jd=new JDialog();
    jd.setLayout(new BorderLayout());
    jd.add(mp, BorderLayout.CENTER);
    jd.setVisible(true);
    jd.pack();
  }
}
/*
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.ListMediumPanel

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.