< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/PopupControl.java

Print this page


   1 /*
   2  * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   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


  42 import javafx.css.CssParser;
  43 import javafx.scene.Node;
  44 import javafx.scene.Parent;
  45 import javafx.scene.Scene;
  46 import javafx.scene.layout.Pane;
  47 import javafx.stage.PopupWindow;
  48 import com.sun.javafx.application.PlatformImpl;
  49 import javafx.css.CssMetaData;
  50 import javafx.css.PseudoClass;
  51 import com.sun.javafx.css.StyleManager;
  52 import com.sun.javafx.scene.NodeHelper;
  53 import com.sun.javafx.scene.ParentHelper;
  54 import javafx.css.Styleable;
  55 import javafx.css.StyleableStringProperty;
  56 import javafx.css.converter.StringConverter;
  57 import com.sun.javafx.scene.control.Logging;
  58 import com.sun.javafx.scene.layout.PaneHelper;
  59 import com.sun.javafx.stage.PopupWindowHelper;
  60 import javafx.css.StyleableProperty;
  61 import javafx.stage.Window;
  62 import sun.util.logging.PlatformLogger;
  63 import sun.util.logging.PlatformLogger.Level;
  64 
  65 /**
  66  * An extension of PopupWindow that allows for CSS styling.
  67  * @since JavaFX 2.0
  68  */
  69 public class PopupControl extends PopupWindow implements Skinnable, Styleable {
  70 
  71     /**
  72      * Sentinel value which can be passed to a control's setMinWidth(), setMinHeight(),
  73      * setMaxWidth() or setMaxHeight() methods to indicate that the preferred dimension
  74      * should be used for that max and/or min constraint.
  75      */
  76     public static final double USE_PREF_SIZE = Double.NEGATIVE_INFINITY;
  77 
  78      /**
  79       * Sentinel value which can be passed to a control's setMinWidth(), setMinHeight(),
  80       * setPrefWidth(), setPrefHeight(), setMaxWidth(), setMaxHeight() methods
  81       * to reset the control's size constraint back to it's intrinsic size returned
  82       * by computeMinWidth(), computeMinHeight(), computePrefWidth(), computePrefHeight(),
  83       * computeMaxWidth(), or computeMaxHeight().


   1 /*
   2  * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   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


  42 import javafx.css.CssParser;
  43 import javafx.scene.Node;
  44 import javafx.scene.Parent;
  45 import javafx.scene.Scene;
  46 import javafx.scene.layout.Pane;
  47 import javafx.stage.PopupWindow;
  48 import com.sun.javafx.application.PlatformImpl;
  49 import javafx.css.CssMetaData;
  50 import javafx.css.PseudoClass;
  51 import com.sun.javafx.css.StyleManager;
  52 import com.sun.javafx.scene.NodeHelper;
  53 import com.sun.javafx.scene.ParentHelper;
  54 import javafx.css.Styleable;
  55 import javafx.css.StyleableStringProperty;
  56 import javafx.css.converter.StringConverter;
  57 import com.sun.javafx.scene.control.Logging;
  58 import com.sun.javafx.scene.layout.PaneHelper;
  59 import com.sun.javafx.stage.PopupWindowHelper;
  60 import javafx.css.StyleableProperty;
  61 import javafx.stage.Window;
  62 import com.sun.javafx.logging.PlatformLogger;
  63 import com.sun.javafx.logging.PlatformLogger.Level;
  64 
  65 /**
  66  * An extension of PopupWindow that allows for CSS styling.
  67  * @since JavaFX 2.0
  68  */
  69 public class PopupControl extends PopupWindow implements Skinnable, Styleable {
  70 
  71     /**
  72      * Sentinel value which can be passed to a control's setMinWidth(), setMinHeight(),
  73      * setMaxWidth() or setMaxHeight() methods to indicate that the preferred dimension
  74      * should be used for that max and/or min constraint.
  75      */
  76     public static final double USE_PREF_SIZE = Double.NEGATIVE_INFINITY;
  77 
  78      /**
  79       * Sentinel value which can be passed to a control's setMinWidth(), setMinHeight(),
  80       * setPrefWidth(), setPrefHeight(), setMaxWidth(), setMaxHeight() methods
  81       * to reset the control's size constraint back to it's intrinsic size returned
  82       * by computeMinWidth(), computeMinHeight(), computePrefWidth(), computePrefHeight(),
  83       * computeMaxWidth(), or computeMaxHeight().


< prev index next >