1 /*
2 * Copyright (c) 2010, 2015, 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
66 import java.util.Iterator;
67 import java.util.List;
68 import java.util.Map;
69 import java.util.Set;
70 import java.util.WeakHashMap;
71 import java.util.concurrent.CountDownLatch;
72 import java.util.concurrent.Future;
73 import com.sun.glass.ui.CommonDialogs.FileChooserResult;
74 import com.sun.glass.utils.NativeLibLoader;
75 import com.sun.javafx.PlatformUtil;
76 import com.sun.javafx.beans.event.AbstractNotifyListener;
77 import com.sun.javafx.embed.HostInterface;
78 import com.sun.javafx.geom.Path2D;
79 import com.sun.javafx.geom.transform.BaseTransform;
80 import com.sun.javafx.jmx.HighlightRegion;
81 import com.sun.javafx.perf.PerformanceTracker;
82 import com.sun.javafx.runtime.VersionInfo;
83 import com.sun.javafx.runtime.async.AsyncOperation;
84 import com.sun.javafx.runtime.async.AsyncOperationListener;
85 import com.sun.javafx.scene.SceneHelper;
86 import com.sun.javafx.scene.text.HitInfo;
87 import com.sun.javafx.scene.text.TextLayoutFactory;
88 import com.sun.javafx.sg.prism.NGCamera;
89 import com.sun.javafx.sg.prism.NGLightBase;
90 import com.sun.javafx.sg.prism.NGNode;
91 import com.sun.scenario.DelayedRunnable;
92 import com.sun.scenario.animation.AbstractMasterTimer;
93 import com.sun.scenario.effect.AbstractShadow.ShadowMode;
94 import com.sun.scenario.effect.Color4f;
95 import com.sun.scenario.effect.FilterContext;
96 import com.sun.scenario.effect.Filterable;
97
98
99 public abstract class Toolkit {
100 private static String tk;
101 private static Toolkit TOOLKIT;
102 private static Thread fxUserThread = null;
103
104 private static final String QUANTUM_TOOLKIT = "com.sun.javafx.tk.quantum.QuantumToolkit";
105 private static final String DEFAULT_TOOLKIT = QUANTUM_TOOLKIT;
106
643 StrokeType type,
644 double strokewidth,
645 StrokeLineCap cap,
646 StrokeLineJoin join,
647 float miterLimit);
648
649 public abstract com.sun.javafx.geom.Shape
650 createStrokedShape(com.sun.javafx.geom.Shape shape,
651 StrokeType type,
652 double strokewidth,
653 StrokeLineCap cap,
654 StrokeLineJoin join,
655 float miterLimit,
656 float[] dashArray,
657 float dashOffset);
658
659 public abstract int getKeyCodeForChar(String character);
660 public abstract Dimension2D getBestCursorSize(int preferredWidth, int preferredHeight);
661 public abstract int getMaximumCursorColors();
662 public abstract PathElement[] convertShapeToFXPath(Object shape);
663 public abstract HitInfo convertHitInfoToFX(Object hit);
664
665 public abstract Filterable toFilterable(Image img);
666 public abstract FilterContext getFilterContext(Object config);
667
668 public abstract boolean isForwardTraversalKey(KeyEvent e);
669 public abstract boolean isBackwardTraversalKey(KeyEvent e);
670
671 public abstract AbstractMasterTimer getMasterTimer();
672
673 public abstract FontLoader getFontLoader();
674 public abstract TextLayoutFactory getTextLayoutFactory();
675
676 public abstract Object createSVGPathObject(SVGPath svgpath);
677 public abstract Path2D createSVGPath2D(SVGPath svgpath);
678
679 /**
680 * Tests whether the pixel on the given coordinates in the given image
681 * is non-empty (not fully transparent). Return value is not defined
682 * for pixels out of the image bounds.
683 */
|
1 /*
2 * Copyright (c) 2010, 2016, 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
66 import java.util.Iterator;
67 import java.util.List;
68 import java.util.Map;
69 import java.util.Set;
70 import java.util.WeakHashMap;
71 import java.util.concurrent.CountDownLatch;
72 import java.util.concurrent.Future;
73 import com.sun.glass.ui.CommonDialogs.FileChooserResult;
74 import com.sun.glass.utils.NativeLibLoader;
75 import com.sun.javafx.PlatformUtil;
76 import com.sun.javafx.beans.event.AbstractNotifyListener;
77 import com.sun.javafx.embed.HostInterface;
78 import com.sun.javafx.geom.Path2D;
79 import com.sun.javafx.geom.transform.BaseTransform;
80 import com.sun.javafx.jmx.HighlightRegion;
81 import com.sun.javafx.perf.PerformanceTracker;
82 import com.sun.javafx.runtime.VersionInfo;
83 import com.sun.javafx.runtime.async.AsyncOperation;
84 import com.sun.javafx.runtime.async.AsyncOperationListener;
85 import com.sun.javafx.scene.SceneHelper;
86 import com.sun.javafx.scene.text.TextLayoutFactory;
87 import com.sun.javafx.sg.prism.NGCamera;
88 import com.sun.javafx.sg.prism.NGLightBase;
89 import com.sun.javafx.sg.prism.NGNode;
90 import com.sun.scenario.DelayedRunnable;
91 import com.sun.scenario.animation.AbstractMasterTimer;
92 import com.sun.scenario.effect.AbstractShadow.ShadowMode;
93 import com.sun.scenario.effect.Color4f;
94 import com.sun.scenario.effect.FilterContext;
95 import com.sun.scenario.effect.Filterable;
96
97
98 public abstract class Toolkit {
99 private static String tk;
100 private static Toolkit TOOLKIT;
101 private static Thread fxUserThread = null;
102
103 private static final String QUANTUM_TOOLKIT = "com.sun.javafx.tk.quantum.QuantumToolkit";
104 private static final String DEFAULT_TOOLKIT = QUANTUM_TOOLKIT;
105
642 StrokeType type,
643 double strokewidth,
644 StrokeLineCap cap,
645 StrokeLineJoin join,
646 float miterLimit);
647
648 public abstract com.sun.javafx.geom.Shape
649 createStrokedShape(com.sun.javafx.geom.Shape shape,
650 StrokeType type,
651 double strokewidth,
652 StrokeLineCap cap,
653 StrokeLineJoin join,
654 float miterLimit,
655 float[] dashArray,
656 float dashOffset);
657
658 public abstract int getKeyCodeForChar(String character);
659 public abstract Dimension2D getBestCursorSize(int preferredWidth, int preferredHeight);
660 public abstract int getMaximumCursorColors();
661 public abstract PathElement[] convertShapeToFXPath(Object shape);
662
663 public abstract Filterable toFilterable(Image img);
664 public abstract FilterContext getFilterContext(Object config);
665
666 public abstract boolean isForwardTraversalKey(KeyEvent e);
667 public abstract boolean isBackwardTraversalKey(KeyEvent e);
668
669 public abstract AbstractMasterTimer getMasterTimer();
670
671 public abstract FontLoader getFontLoader();
672 public abstract TextLayoutFactory getTextLayoutFactory();
673
674 public abstract Object createSVGPathObject(SVGPath svgpath);
675 public abstract Path2D createSVGPath2D(SVGPath svgpath);
676
677 /**
678 * Tests whether the pixel on the given coordinates in the given image
679 * is non-empty (not fully transparent). Return value is not defined
680 * for pixels out of the image bounds.
681 */
|