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

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

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

revision 1.1.2.3 by gnu_andrew, Sat Sep 10 15:31:51 2005 UTC revision 1.1.2.4 by gnu_andrew, Wed Nov 2 00:43:53 2005 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package javax.swing.plaf.basic;  package javax.swing.plaf.basic;
40    
41    import java.awt.Color;
42  import java.awt.Dimension;  import java.awt.Dimension;
43  import java.awt.event.ActionEvent;  import java.awt.event.ActionEvent;
44  import java.beans.PropertyVetoException;  import java.beans.PropertyVetoException;
# Line 49  import javax.swing.JComponent; Line 50  import javax.swing.JComponent;
50  import javax.swing.JDesktopPane;  import javax.swing.JDesktopPane;
51  import javax.swing.JInternalFrame;  import javax.swing.JInternalFrame;
52  import javax.swing.KeyStroke;  import javax.swing.KeyStroke;
 import javax.swing.UIDefaults;  
53  import javax.swing.UIManager;  import javax.swing.UIManager;
54  import javax.swing.plaf.ComponentUI;  import javax.swing.plaf.ComponentUI;
55  import javax.swing.plaf.DesktopPaneUI;  import javax.swing.plaf.DesktopPaneUI;
56    import javax.swing.plaf.UIResource;
57    
58  /**  /**
59   * This class is the UI delegate for JDesktopPane for the Basic look and feel.   * This class is the UI delegate for JDesktopPane for the Basic look and feel.
# Line 74  public class BasicDesktopPaneUI extends Line 75  public class BasicDesktopPaneUI extends
75      {      {
76        if (desktop.getSelectedFrame() != null)        if (desktop.getSelectedFrame() != null)
77          {          {
78            try            try
79              {              {
80                desktop.getSelectedFrame().setClosed(true);                desktop.getSelectedFrame().setClosed(true);
81              }              }
82            catch (PropertyVetoException pve)            catch (PropertyVetoException pve)
83              {              {
84              }                // We do nothing if the attempts has been vetoed.
85                }
86          }          }
87      }      }
88    
# Line 112  public class BasicDesktopPaneUI extends Line 114  public class BasicDesktopPaneUI extends
114      {      {
115        if (desktop.getSelectedFrame() != null)        if (desktop.getSelectedFrame() != null)
116          {          {
117            try            try
118              {              {
119                desktop.getSelectedFrame().setMaximum(true);                desktop.getSelectedFrame().setMaximum(true);
120              }              }
121            catch (PropertyVetoException pve)            catch (PropertyVetoException pve)
122              {              {
123              }                // We do nothing if the attempts has been vetoed.
124                }
125          }          }
126      }      }
127    
# Line 150  public class BasicDesktopPaneUI extends Line 153  public class BasicDesktopPaneUI extends
153      {      {
154        if (desktop.getSelectedFrame() != null)        if (desktop.getSelectedFrame() != null)
155          {          {
156            try            try
157              {              {
158                desktop.getSelectedFrame().setIcon(true);                desktop.getSelectedFrame().setIcon(true);
159              }              }
160            catch (PropertyVetoException pve)            catch (PropertyVetoException pve)
161              {              {
162              }                // We do nothing if the attempt has been vetoed.
163                }
164          }          }
165      }      }
166    
# Line 236  public class BasicDesktopPaneUI extends Line 240  public class BasicDesktopPaneUI extends
240        JInternalFrame frame = desktop.getSelectedFrame();        JInternalFrame frame = desktop.getSelectedFrame();
241        if (frame != null)        if (frame != null)
242          {          {
243            try            try
244              {              {
245                if (frame.isIcon())                if (frame.isIcon())
246                  frame.setIcon(false);                  frame.setIcon(false);
247                else if (frame.isMaximum())                else if (frame.isMaximum())
248                  frame.setMaximum(false);                  frame.setMaximum(false);
249              }              }
250            catch (PropertyVetoException pve)            catch (PropertyVetoException pve)
251              {              {
252              }                // We do nothing if the attempt has been vetoed.
253                }
254          }          }
255      }      }
256    
# Line 304  public class BasicDesktopPaneUI extends Line 309  public class BasicDesktopPaneUI extends
309     */     */
310    public BasicDesktopPaneUI()    public BasicDesktopPaneUI()
311    {    {
312        // Nothing to do here.
313    }    }
314    
315    /**    /**
# Line 361  public class BasicDesktopPaneUI extends Line 367  public class BasicDesktopPaneUI extends
367     */     */
368    protected void installDefaults()    protected void installDefaults()
369    {    {
370      UIDefaults defaults = UIManager.getLookAndFeelDefaults();      Color bg = desktop.getBackground();
371        if (bg == null || bg instanceof UIResource)
372      desktop.setBackground(defaults.getColor("desktop"));        desktop.setBackground(UIManager.getColor("desktop"));
373    }    }
374    
375    /**    /**
# Line 381  public class BasicDesktopPaneUI extends Line 387  public class BasicDesktopPaneUI extends
387    protected void installKeyboardActions()    protected void installKeyboardActions()
388    {    {
389      // FIXME: create actions and keystrokes.      // FIXME: create actions and keystrokes.
390      registerKeyboardAction();      registerKeyboardActions();
391    }    }
392    
393    /**    /**
# Line 405  public class BasicDesktopPaneUI extends Line 411  public class BasicDesktopPaneUI extends
411     * This method registers the actions to the appropriate Action and Input     * This method registers the actions to the appropriate Action and Input
412     * maps.     * maps.
413     */     */
414    protected void registerKeyboardAction()    protected void registerKeyboardActions()
415    {    {
416      // FIXME: Do the binding.      // FIXME: Do the binding.
417      // XXX: the gtk windows tend to intercept a lot of the      // XXX: the gtk windows tend to intercept a lot of the

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

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