/[classpath]/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4.2.5 by gnu_andrew, Tue Sep 20 18:46:33 2005 UTC revision 1.4.2.6 by gnu_andrew, Wed Nov 2 00:43:54 2005 UTC
# Line 56  import java.beans.PropertyChangeListener Line 56  import java.beans.PropertyChangeListener
56  import java.beans.PropertyVetoException;  import java.beans.PropertyVetoException;
57  import java.beans.VetoableChangeListener;  import java.beans.VetoableChangeListener;
58    
 import javax.swing.BorderFactory;  
59  import javax.swing.DefaultDesktopManager;  import javax.swing.DefaultDesktopManager;
60  import javax.swing.DesktopManager;  import javax.swing.DesktopManager;
61  import javax.swing.JComponent;  import javax.swing.JComponent;
62  import javax.swing.JDesktopPane;  import javax.swing.JDesktopPane;
63  import javax.swing.JInternalFrame;  import javax.swing.JInternalFrame;
64  import javax.swing.KeyStroke;  import javax.swing.KeyStroke;
65    import javax.swing.LookAndFeel;
66  import javax.swing.SwingConstants;  import javax.swing.SwingConstants;
67  import javax.swing.SwingUtilities;  import javax.swing.SwingUtilities;
 import javax.swing.UIDefaults;  
68  import javax.swing.UIManager;  import javax.swing.UIManager;
69  import javax.swing.border.AbstractBorder;  import javax.swing.border.AbstractBorder;
 import javax.swing.border.BevelBorder;  
 import javax.swing.border.Border;  
70  import javax.swing.event.InternalFrameEvent;  import javax.swing.event.InternalFrameEvent;
71  import javax.swing.event.InternalFrameListener;  import javax.swing.event.InternalFrameListener;
72  import javax.swing.event.MouseInputAdapter;  import javax.swing.event.MouseInputAdapter;
# Line 448  public class BasicInternalFrameUI extend Line 445  public class BasicInternalFrameUI extend
445       */       */
446      public void addLayoutComponent(String name, Component c)      public void addLayoutComponent(String name, Component c)
447      {      {
448          // Nothing to do here.
449      }      }
450    
451      /**      /**
# Line 637  public class BasicInternalFrameUI extend Line 635  public class BasicInternalFrameUI extend
635       */       */
636      public void removeLayoutComponent(Component c)      public void removeLayoutComponent(Component c)
637      {      {
638          // Nothing to do here.
639      }      }
640    }    }
641    
# Line 950  public class BasicInternalFrameUI extend Line 949  public class BasicInternalFrameUI extend
949            if (frame.isSelected())            if (frame.isSelected())
950              activateFrame(frame);              activateFrame(frame);
951            else            else
952              getDesktopManager().deactivateFrame(frame);              deactivateFrame(frame);
953          }          }
954        else if (evt.getPropertyName().equals(JInternalFrame.ROOT_PANE_PROPERTY)        else if (evt.getPropertyName().equals(JInternalFrame.ROOT_PANE_PROPERTY)
955                 || evt.getPropertyName().equals(                 || evt.getPropertyName().equals(
# Line 1138  public class BasicInternalFrameUI extend Line 1137  public class BasicInternalFrameUI extend
1137     */     */
1138    public BasicInternalFrameUI(JInternalFrame b)    public BasicInternalFrameUI(JInternalFrame b)
1139    {    {
1140        // Nothing to do here.
1141    }    }
1142    
1143    /**    /**
# Line 1204  public class BasicInternalFrameUI extend Line 1204  public class BasicInternalFrameUI extend
1204     */     */
1205    protected void installDefaults()    protected void installDefaults()
1206      {      {
1207        UIDefaults defaults = UIManager.getLookAndFeelDefaults();        LookAndFeel.installBorder(frame, "InternalFrame.border");
1208        Border border = defaults.getBorder("InternalFrame.border");        frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon"));
       frame.setBorder(border);  
       frame.setFrameIcon(defaults.getIcon("InternalFrame.icon"));  
1209        // InternalFrames are invisible by default.        // InternalFrames are invisible by default.
1210        frame.setVisible(false);        frame.setVisible(false);
1211    }    }
# Line 1705  public class BasicInternalFrameUI extend Line 1703  public class BasicInternalFrameUI extend
1703    }    }
1704    
1705    /**    /**
1706       * This is a convenience method that deactivates the JInternalFrame.
1707       *
1708       * @param f the JInternalFrame to deactivate
1709       */
1710      protected void deactivateFrame(JInternalFrame f)
1711      {
1712        getDesktopManager().deactivateFrame(f);
1713      }
1714    
1715      /**
1716     * This method returns a new ComponentListener for the JDesktopPane.     * This method returns a new ComponentListener for the JDesktopPane.
1717     *     *
1718     * @return A new ComponentListener.     * @return A new ComponentListener.

Legend:
Removed from v.1.4.2.5  
changed lines
  Added in v.1.4.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26