< prev index next >

modules/javafx.web/src/main/java/com/sun/webkit/ColorChooser.java

Print this page




  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 com.sun.webkit;
  27 
  28 import com.sun.javafx.scene.control.CustomColorDialog;
  29 import javafx.scene.paint.Color;
  30 import javafx.scene.web.WebView;
  31 
  32 import java.util.logging.Level;
  33 import java.util.logging.Logger;
  34 
  35 public final class ColorChooser {
  36     /**
  37      * Color conversion from double (0.0 to 1.0) to uchar (0 to 255)
  38      */
  39     private static final double COLOR_DOUBLE_TO_UCHAR_FACTOR = 255.0;
  40 
  41     /**
  42      * Color chooser dialog
  43      */
  44     private final CustomColorDialog colorChooserDialog;
  45 
  46     /**
  47      * Handle / pointer to native object
  48      */
  49     private final long pdata;
  50 
  51     private ColorChooser(WebPage webPage, Color color, long data) {
  52         this.pdata = data;
  53 
  54         WebPageClient<WebView> client = webPage.getPageClient();




  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 com.sun.webkit;
  27 
  28 import com.sun.javafx.scene.control.CustomColorDialog;
  29 import javafx.scene.paint.Color;
  30 import javafx.scene.web.WebView;
  31 



  32 public final class ColorChooser {
  33     /**
  34      * Color conversion from double (0.0 to 1.0) to uchar (0 to 255)
  35      */
  36     private static final double COLOR_DOUBLE_TO_UCHAR_FACTOR = 255.0;
  37 
  38     /**
  39      * Color chooser dialog
  40      */
  41     private final CustomColorDialog colorChooserDialog;
  42 
  43     /**
  44      * Handle / pointer to native object
  45      */
  46     private final long pdata;
  47 
  48     private ColorChooser(WebPage webPage, Color color, long data) {
  49         this.pdata = data;
  50 
  51         WebPageClient<WebView> client = webPage.getPageClient();


< prev index next >