1 7 8 package org.gjt.jclasslib.mdi; 9 10 import javax.swing.*; 11 12 18 public abstract class BasicInternalFrame extends JInternalFrame { 19 20 24 public static final Class [] CONSTRUCTOR_ARGUMENTS = 25 new Class [] {BasicDesktopManager.class, String .class}; 26 27 28 protected final BasicDesktopManager desktopManager; 29 30 35 protected BasicInternalFrame(BasicDesktopManager desktopManager, String title) { 36 super(title, true, true, true, true); 37 this.desktopManager = desktopManager; 38 } 39 40 45 public Object getInitParam() { 46 return null; 47 } 48 49 52 protected void setupInternalFrame() { 53 54 setBounds(desktopManager.getNextInternalFrameBounds()); 55 56 addVetoableChangeListener(desktopManager); 57 addInternalFrameListener(desktopManager); 58 desktopManager.addInternalFrame(this); 59 60 61 if (desktopManager.getParentFrame().isVisible()) { 62 setVisible(true); 63 } 64 } 65 66 } 67 | Popular Tags |