View Javadoc
1 /***************************************************************************** 2 * Virtual Mockup for Machine Vision 3 * Copyright (C) 2001-2003 Fabio R. de Miranda, João E. Kogler Jr., 4 * Carlos S. Santos. 5 * Virtual Mockup for Machine Vision Project funded by SENAC-SP 6 * 7 * Permission is granted to redistribute and/or modify this 8 * software under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This software is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License (http://www.gnu.org/copyleft/lesser.html) 16 * for more details. 17 * 18 *****************************************************************************/ 19 20 package camera3d.test; 21 22 import javax.swing.*; 23 import camera3d.*; 24 import camera3d.gui.*; 25 26 /*** 27 * 28 * @author Fábio Roberto de Miranda 29 */ 30 31 class InternalPaneTest extends JFrame { 32 33 private JDesktopPane desktop = new JDesktopPane(); 34 35 public InternalPaneTest() { 36 //createFrame(); 37 this.setContentPane(desktop); 38 desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE); //1.3 code 39 this.pack(); 40 this.setVisible(true); 41 } 42 public static void main(String[] args) { 43 InternalPaneTest internalPaneTest1 = new InternalPaneTest(); 44 internalPaneTest1.add(new ViewportFrame()); 45 } 46 47 protected void createFrame() { 48 ViewportFrame frame = new ViewportFrame(); 49 } 50 51 public void add(ViewportFrame vpFrame){ 52 vpFrame.setInternalFrame(true); 53 vpFrame.setVisible(true); //necessary as of kestrel 54 desktop.add(vpFrame.getJInternalFrame()); 55 try { 56 vpFrame.getJInternalFrame().setSelected(true); 57 } catch (java.beans.PropertyVetoException e) {} 58 59 } 60 61 }

This page was automatically generated by Maven