1 /* 2 * #%L 3 * IsisFish 4 * 5 * $Id: FormInterval.java 4156 2014-12-09 11:27:18Z echatellier $ 6 * $HeadURL: https://svn.codelutin.com/isis-fish/tags/isis-fish-4.4.0.2/src/test/java/fr/ifremer/isisfish/ui/widget/FormInterval.java $ 7 * %% 8 * Copyright (C) 2001 - 2011 Ifremer, CodeLutin 9 * %% 10 * This program is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as 12 * published by the Free Software Foundation, either version 3 of the 13 * License, or (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public 21 * License along with this program. If not, see 22 * <http://www.gnu.org/licenses/gpl-3.0.html>. 23 * #L% 24 */ 25 26 package fr.ifremer.isisfish.ui.widget; 27 28 import java.awt.Frame; 29 import java.awt.event.WindowAdapter; 30 import java.awt.event.WindowEvent; 31 32 import fr.ifremer.isisfish.ui.widget.Interval; 33 import fr.ifremer.isisfish.ui.widget.IntervalPanel; 34 35 /** 36 * FormInterval. 37 */ 38 public class FormInterval extends Frame { 39 40 /** serialVersionUID. */ 41 private static final long serialVersionUID = 4911081593147906648L; 42 43 class QuitListener extends WindowAdapter { 44 public void windowClosing(WindowEvent e) { 45 e.getWindow().dispose(); 46 } 47 } 48 49 public FormInterval(Interval i) { 50 IntervalPanel ip = new IntervalPanel(); 51 this.add(ip); 52 // ip.setEnabled(false); 53 ip.setModel(i); 54 55 this.addWindowListener(new QuitListener()); 56 pack(); 57 } 58 }