src/share/classes/javax/swing/DefaultDesktopManager.java

Print this page
rev 10121 : 8046485: Add missing @since tag under javax.swing.*
Reviewed-by:


  29 import com.sun.awt.AWTUtilities;
  30 import sun.awt.AWTAccessor;
  31 import sun.awt.SunToolkit;
  32 
  33 import java.awt.*;
  34 import java.beans.PropertyVetoException;
  35 
  36 /** This is an implementation of the <code>DesktopManager</code>.
  37   * It currently implements the basic behaviors for managing
  38   * <code>JInternalFrame</code>s in an arbitrary parent.
  39   * <code>JInternalFrame</code>s that are not children of a
  40   * <code>JDesktop</code> will use this component
  41   * to handle their desktop-like actions.
  42   * <p>This class provides a policy for the various JInternalFrame methods,
  43   * it is not meant to be called directly rather the various JInternalFrame
  44   * methods will call into the DesktopManager.</p>
  45   * @see JDesktopPane
  46   * @see JInternalFrame
  47   * @author David Kloba
  48   * @author Steve Wilson

  49   */
  50 @SuppressWarnings("serial") // No Interesting Non-Transient State
  51 public class DefaultDesktopManager implements DesktopManager, java.io.Serializable {
  52     final static String HAS_BEEN_ICONIFIED_PROPERTY = "wasIconOnce";
  53 
  54     final static int DEFAULT_DRAG_MODE = 0;
  55     final static int OUTLINE_DRAG_MODE = 1;
  56     final static int FASTER_DRAG_MODE = 2;
  57 
  58     int dragMode = DEFAULT_DRAG_MODE;
  59 
  60     private transient Rectangle currentBounds = null;
  61     private transient Graphics desktopGraphics = null;
  62     private transient Rectangle desktopBounds = null;
  63     private transient Rectangle[] floatingItems = {};
  64 
  65     /**
  66      * Set to true when the user actually drags a frame vs clicks on it
  67      * to start the drag operation.  This is only used when dragging with
  68      * FASTER_DRAG_MODE.




  29 import com.sun.awt.AWTUtilities;
  30 import sun.awt.AWTAccessor;
  31 import sun.awt.SunToolkit;
  32 
  33 import java.awt.*;
  34 import java.beans.PropertyVetoException;
  35 
  36 /** This is an implementation of the <code>DesktopManager</code>.
  37   * It currently implements the basic behaviors for managing
  38   * <code>JInternalFrame</code>s in an arbitrary parent.
  39   * <code>JInternalFrame</code>s that are not children of a
  40   * <code>JDesktop</code> will use this component
  41   * to handle their desktop-like actions.
  42   * <p>This class provides a policy for the various JInternalFrame methods,
  43   * it is not meant to be called directly rather the various JInternalFrame
  44   * methods will call into the DesktopManager.</p>
  45   * @see JDesktopPane
  46   * @see JInternalFrame
  47   * @author David Kloba
  48   * @author Steve Wilson
  49   * @since 1.2
  50   */
  51 @SuppressWarnings("serial") // No Interesting Non-Transient State
  52 public class DefaultDesktopManager implements DesktopManager, java.io.Serializable {
  53     final static String HAS_BEEN_ICONIFIED_PROPERTY = "wasIconOnce";
  54 
  55     final static int DEFAULT_DRAG_MODE = 0;
  56     final static int OUTLINE_DRAG_MODE = 1;
  57     final static int FASTER_DRAG_MODE = 2;
  58 
  59     int dragMode = DEFAULT_DRAG_MODE;
  60 
  61     private transient Rectangle currentBounds = null;
  62     private transient Graphics desktopGraphics = null;
  63     private transient Rectangle desktopBounds = null;
  64     private transient Rectangle[] floatingItems = {};
  65 
  66     /**
  67      * Set to true when the user actually drags a frame vs clicks on it
  68      * to start the drag operation.  This is only used when dragging with
  69      * FASTER_DRAG_MODE.