src/share/classes/sun/swing/LightweightContent.java

Print this page




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.swing;
  27 
  28 import javax.swing.JComponent;

  29 
  30 /**
  31  * The interface by means of which the {@link JLightweightFrame} class
  32  * communicates to its client application.
  33  * <p>
  34  * The client application implements this interface so it can response
  35  * to requests and process notifications from {@code JLightweightFrame}.
  36  * An implementation of this interface is associated with a {@code
  37  * JLightweightFrame} instance via the {@link JLightweightFrame#setContent}
  38  * method.
  39  *
  40  * A hierarchy of components contained in the {@code JComponent} instance
  41  * returned by the {@link #getComponent} method should not contain any
  42  * heavyweight components, otherwise {@code JLightweightFrame} may fail
  43  * to paint it.
  44  *
  45  * @author Artem Ananiev
  46  * @author Anton Tarasov
  47  * @author Jim Graham
  48  */


 162      */
 163     public void focusUngrabbed();
 164 
 165     /**
 166      * {@code JLightweightFrame} calls this method to notify the client
 167      * application that the content preferred size has changed.
 168      */
 169     public void preferredSizeChanged(int width, int height);
 170 
 171     /**
 172      * {@code JLightweightFrame} calls this method to notify the client
 173      * application that the content maximum size has changed.
 174      */
 175     public void maximumSizeChanged(int width, int height);
 176 
 177     /**
 178      * {@code JLightweightFrame} calls this method to notify the client
 179      * application that the content minimum size has changed.
 180      */
 181     public void minimumSizeChanged(int width, int height);









 182 }


   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.swing;
  27 
  28 import javax.swing.JComponent;
  29 import java.awt.Cursor;
  30 
  31 /**
  32  * The interface by means of which the {@link JLightweightFrame} class
  33  * communicates to its client application.
  34  * <p>
  35  * The client application implements this interface so it can response
  36  * to requests and process notifications from {@code JLightweightFrame}.
  37  * An implementation of this interface is associated with a {@code
  38  * JLightweightFrame} instance via the {@link JLightweightFrame#setContent}
  39  * method.
  40  *
  41  * A hierarchy of components contained in the {@code JComponent} instance
  42  * returned by the {@link #getComponent} method should not contain any
  43  * heavyweight components, otherwise {@code JLightweightFrame} may fail
  44  * to paint it.
  45  *
  46  * @author Artem Ananiev
  47  * @author Anton Tarasov
  48  * @author Jim Graham
  49  */


 163      */
 164     public void focusUngrabbed();
 165 
 166     /**
 167      * {@code JLightweightFrame} calls this method to notify the client
 168      * application that the content preferred size has changed.
 169      */
 170     public void preferredSizeChanged(int width, int height);
 171 
 172     /**
 173      * {@code JLightweightFrame} calls this method to notify the client
 174      * application that the content maximum size has changed.
 175      */
 176     public void maximumSizeChanged(int width, int height);
 177 
 178     /**
 179      * {@code JLightweightFrame} calls this method to notify the client
 180      * application that the content minimum size has changed.
 181      */
 182     public void minimumSizeChanged(int width, int height);
 183 
 184     /**
 185      * {@code JLightweightFrame} calls this method to notify the client
 186      * application that in needs to set a cursor
 187      * @param cursor a cursor to set
 188      */
 189     default public void setCursor(Cursor cursor) {
 190         throw new UnsupportedOperationException("Wrong client version is used");
 191     }
 192 }