Package jtrackbase.gui

Source Code of jtrackbase.gui.ListLabelPanel

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

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

import jtrackbase.db.Label;
import jtrackbase.db.LabelFacade;
import jtrackbase.gui.table.EntityTableModel;
import jtrackbase.gui.table.LabelTableModel;

public class ListLabelPanel extends AbstractListPanel<Label> {
  public static final String PANEL_NAME="Label";
 
  public ListLabelPanel() {
    super(PANEL_NAME);
  }
 
  @Override
  protected EntityTableModel<Label> createEmptyModel() {
    return new LabelTableModel();
  }

  @Override
  protected EntityTableModel<Label> createFullModel() {
    return new LabelTableModel(LabelFacade.findAll());
  }

  @Override
  protected void detailEntity(Label entity) {
    JOptionPane.showMessageDialog(SwingUtilities.getRoot(this),
        "Cannot detail labels 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.ListLabelPanel

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.