jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
changeset 29886 545c0c3809b8
parent 27565 729f9700483a
child 30471 c1568a2416a8
equal deleted inserted replaced
29885:6eb60fac3383 29886:545c0c3809b8
     1 /*
     1 /*
     2  * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
  1764      * DragGestureRecognizer class requested, and associates it with the
  1764      * DragGestureRecognizer class requested, and associates it with the
  1765      * DragSource, Component and DragGestureListener specified.
  1765      * DragSource, Component and DragGestureListener specified.
  1766      *
  1766      *
  1767      * subclasses should override this to provide their own implementation
  1767      * subclasses should override this to provide their own implementation
  1768      *
  1768      *
       
  1769      * @param <T> the type of DragGestureRecognizer to create
  1769      * @param abstractRecognizerClass The abstract class of the required recognizer
  1770      * @param abstractRecognizerClass The abstract class of the required recognizer
  1770      * @param ds                      The DragSource
  1771      * @param ds                      The DragSource
  1771      * @param c                       The Component target for the DragGestureRecognizer
  1772      * @param c                       The Component target for the DragGestureRecognizer
  1772      * @param srcActions              The actions permitted for the gesture
  1773      * @param srcActions              The actions permitted for the gesture
  1773      * @param dgl                     The DragGestureListener
  1774      * @param dgl                     The DragGestureListener
  1865             desktopPropsSupport.firePropertyChange(name, oldValue, newValue);
  1866             desktopPropsSupport.firePropertyChange(name, oldValue, newValue);
  1866         }
  1867         }
  1867     }
  1868     }
  1868 
  1869 
  1869     /**
  1870     /**
  1870      * an opportunity to lazily evaluate desktop property values.
  1871      * An opportunity to lazily evaluate desktop property values.
       
  1872      * @return the desktop property or null
       
  1873      * @param name the name
  1871      */
  1874      */
  1872     protected Object lazilyLoadDesktopProperty(String name) {
  1875     protected Object lazilyLoadDesktopProperty(String name) {
  1873         return null;
  1876         return null;
  1874     }
  1877     }
  1875 
  1878 
  1945      */
  1948      */
  1946     public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
  1949     public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
  1947         return desktopPropsSupport.getPropertyChangeListeners(propertyName);
  1950         return desktopPropsSupport.getPropertyChangeListeners(propertyName);
  1948     }
  1951     }
  1949 
  1952 
       
  1953     /**
       
  1954      * The desktop properties.
       
  1955      */
  1950     protected final Map<String,Object> desktopProperties =
  1956     protected final Map<String,Object> desktopProperties =
  1951             new HashMap<String,Object>();
  1957             new HashMap<String,Object>();
       
  1958     /**
       
  1959      * The desktop properties change support.
       
  1960      */
  1952     protected final PropertyChangeSupport desktopPropsSupport =
  1961     protected final PropertyChangeSupport desktopPropsSupport =
  1953             Toolkit.createPropertyChangeSupport(this);
  1962             Toolkit.createPropertyChangeSupport(this);
  1954 
  1963 
  1955     /**
  1964     /**
  1956      * Returns whether the always-on-top mode is supported by this toolkit.
  1965      * Returns whether the always-on-top mode is supported by this toolkit.