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 com.sun.webkit.plugin; 27 28 import java.io.IOError; 29 import java.net.URL; 30 import java.util.logging.Logger; 31 32 import com.sun.webkit.graphics.WCGraphicsContext; 33 34 35 final class DefaultPlugin implements Plugin { 36 37 private final static Logger log = 38 Logger.getLogger("com.sun.browser.plugin.DefaultPlugin"); 39 40 //private JLabel nullComp; 41 42 private void init(final String pluginDetails) { 43 //nullComp = new JLabel(pluginDetails); 44 //nullComp.setHorizontalAlignment(JLabel.CENTER); 45 //nullComp.setVisible(true); 46 } 47 48 DefaultPlugin(URL url, String type, String[] pNames, String[] pValues) { 49 init("Default Plugin for: " + (null==url ? "(null)" : url.toExternalForm())); 50 } 51 52 @Override 53 public void paint(WCGraphicsContext g, int intX, int intY, int intWidth, int intHeight) 54 { 55 //if(g instanceof WCGraphics2DContext){ 56 //nullComp.paint( ((WCGraphics2DContext)g).getImageGraphics() ); 57 //} 58 g.fillRect(x, y, w, h, 0x11aaffff); | 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 com.sun.webkit.plugin; 27 28 import java.io.IOError; 29 import java.net.URL; 30 31 import com.sun.javafx.logging.PlatformLogger; 32 import com.sun.webkit.graphics.WCGraphicsContext; 33 34 35 final class DefaultPlugin implements Plugin { 36 37 private final static PlatformLogger log = 38 PlatformLogger.getLogger("com.sun.browser.plugin.DefaultPlugin"); 39 40 //private JLabel nullComp; 41 42 private void init(final String pluginDetails) { 43 //nullComp = new JLabel(pluginDetails); 44 //nullComp.setHorizontalAlignment(JLabel.CENTER); 45 //nullComp.setVisible(true); 46 } 47 48 DefaultPlugin(URL url, String type, String[] pNames, String[] pValues) { 49 init("Default Plugin for: " + (null==url ? "(null)" : url.toExternalForm())); 50 } 51 52 @Override 53 public void paint(WCGraphicsContext g, int intX, int intY, int intWidth, int intHeight) 54 { 55 //if(g instanceof WCGraphics2DContext){ 56 //nullComp.paint( ((WCGraphics2DContext)g).getImageGraphics() ); 57 //} 58 g.fillRect(x, y, w, h, 0x11aaffff); |