feat(jdk8): move files to new folder to avoid resources compiled.

This commit is contained in:
2025-09-07 15:25:52 +08:00
parent 3f0047bf6f
commit 8c35cfb1c0
17415 changed files with 217 additions and 213 deletions

View File

@@ -0,0 +1,151 @@
/*
* Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.io.IOException;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.net.URL;
import java.net.URLConnection;
import java.applet.AudioClip;
import com.sun.media.sound.JavaSoundAudioClip;
/**
* Applet audio clip;
*
* @author Arthur van Hoff, Kara Kytle
*/
public class AppletAudioClip implements AudioClip {
// url that this AudioClip is based on
private URL url = null;
// the audio clip implementation
private AudioClip audioClip = null;
boolean DEBUG = false /*true*/;
/**
* Constructs an AppletAudioClip from an URL.
*/
public AppletAudioClip(URL url) {
// store the url
this.url = url;
try {
// create a stream from the url, and use it
// in the clip.
InputStream in = url.openStream();
createAppletAudioClip(in);
} catch (IOException e) {
/* just quell it */
if (DEBUG) {
System.err.println("IOException creating AppletAudioClip" + e);
}
}
}
/**
* Constructs an AppletAudioClip from a URLConnection.
*/
public AppletAudioClip(URLConnection uc) {
try {
// create a stream from the url, and use it
// in the clip.
createAppletAudioClip(uc.getInputStream());
} catch (IOException e) {
/* just quell it */
if (DEBUG) {
System.err.println("IOException creating AppletAudioClip" + e);
}
}
}
/**
* For constructing directly from Jar entries, or any other
* raw Audio data. Note that the data provided must include the format
* header.
*/
public AppletAudioClip(byte [] data) {
try {
// construct a stream from the byte array
InputStream in = new ByteArrayInputStream(data);
createAppletAudioClip(in);
} catch (IOException e) {
/* just quell it */
if (DEBUG) {
System.err.println("IOException creating AppletAudioClip " + e);
}
}
}
/*
* Does the real work of creating an AppletAudioClip from an InputStream.
* This function is used by both constructors.
*/
void createAppletAudioClip(InputStream in) throws IOException {
try {
audioClip = new JavaSoundAudioClip(in);
} catch (Exception e3) {
// no matter what happened, we throw an IOException to avoid changing the interfaces....
throw new IOException("Failed to construct the AudioClip: " + e3);
}
}
public synchronized void play() {
if (audioClip != null)
audioClip.play();
}
public synchronized void loop() {
if (audioClip != null)
audioClip.loop();
}
public synchronized void stop() {
if (audioClip != null)
audioClip.stop();
}
}

View File

@@ -0,0 +1,877 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.lang.NullPointerException;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.SocketPermission;
import java.net.URLConnection;
import java.net.MalformedURLException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.io.EOFException;
import java.io.File;
import java.io.FilePermission;
import java.io.IOException;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.NoSuchElementException;
import java.security.AccessController;
import java.security.AccessControlContext;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import java.security.PrivilegedActionException;
import java.security.CodeSource;
import java.security.Permission;
import java.security.PermissionCollection;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
import sun.misc.IOUtils;
import sun.net.www.ParseUtil;
import sun.security.util.SecurityConstants;
/**
* This class defines the class loader for loading applet classes and
* resources. It extends URLClassLoader to search the applet code base
* for the class or resource after checking any loaded JAR files.
*/
public class AppletClassLoader extends URLClassLoader {
private URL base; /* applet code base URL */
private CodeSource codesource; /* codesource for the base URL */
private AccessControlContext acc;
private boolean exceptionStatus = false;
private final Object threadGroupSynchronizer = new Object();
private final Object grabReleaseSynchronizer = new Object();
private boolean codebaseLookup = true;
private volatile boolean allowRecursiveDirectoryRead = true;
/*
* Creates a new AppletClassLoader for the specified base URL.
*/
protected AppletClassLoader(URL base) {
super(new URL[0]);
this.base = base;
this.codesource =
new CodeSource(base, (java.security.cert.Certificate[]) null);
acc = AccessController.getContext();
}
public void disableRecursiveDirectoryRead() {
allowRecursiveDirectoryRead = false;
}
/**
* Set the codebase lookup flag.
*/
void setCodebaseLookup(boolean codebaseLookup) {
this.codebaseLookup = codebaseLookup;
}
/*
* Returns the applet code base URL.
*/
URL getBaseURL() {
return base;
}
/*
* Returns the URLs used for loading classes and resources.
*/
public URL[] getURLs() {
URL[] jars = super.getURLs();
URL[] urls = new URL[jars.length + 1];
System.arraycopy(jars, 0, urls, 0, jars.length);
urls[urls.length - 1] = base;
return urls;
}
/*
* Adds the specified JAR file to the search path of loaded JAR files.
* Changed modifier to protected in order to be able to overwrite addJar()
* in PluginClassLoader.java
*/
protected void addJar(String name) throws IOException {
URL url;
try {
url = new URL(base, name);
} catch (MalformedURLException e) {
throw new IllegalArgumentException("name");
}
addURL(url);
// DEBUG
//URL[] urls = getURLs();
//for (int i = 0; i < urls.length; i++) {
// System.out.println("url[" + i + "] = " + urls[i]);
//}
}
/*
* Override loadClass so that class loading errors can be caught in
* order to print better error messages.
*/
public synchronized Class loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
// First check if we have permission to access the package. This
// should go away once we've added support for exported packages.
int i = name.lastIndexOf('.');
if (i != -1) {
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPackageAccess(name.substring(0, i));
}
try {
return super.loadClass(name, resolve);
} catch (ClassNotFoundException e) {
//printError(name, e.getException());
throw e;
} catch (RuntimeException e) {
//printError(name, e);
throw e;
} catch (Error e) {
//printError(name, e);
throw e;
}
}
/*
* Finds the applet class with the specified name. First searches
* loaded JAR files then the applet code base for the class.
*/
protected Class findClass(String name) throws ClassNotFoundException {
int index = name.indexOf(";");
String cookie = "";
if(index != -1) {
cookie = name.substring(index, name.length());
name = name.substring(0, index);
}
// check loaded JAR files
try {
return super.findClass(name);
} catch (ClassNotFoundException e) {
}
// Otherwise, try loading the class from the code base URL
// 4668479: Option to turn off codebase lookup in AppletClassLoader
// during resource requests. [stanley.ho]
if (codebaseLookup == false)
throw new ClassNotFoundException(name);
// final String path = name.replace('.', '/').concat(".class").concat(cookie);
String encodedName = ParseUtil.encodePath(name.replace('.', '/'), false);
final String path = (new StringBuffer(encodedName)).append(".class").append(cookie).toString();
try {
byte[] b = (byte[]) AccessController.doPrivileged(
new PrivilegedExceptionAction() {
public Object run() throws IOException {
try {
URL finalURL = new URL(base, path);
// Make sure the codebase won't be modified
if (base.getProtocol().equals(finalURL.getProtocol()) &&
base.getHost().equals(finalURL.getHost()) &&
base.getPort() == finalURL.getPort()) {
return getBytes(finalURL);
}
else {
return null;
}
} catch (Exception e) {
return null;
}
}
}, acc);
if (b != null) {
return defineClass(name, b, 0, b.length, codesource);
} else {
throw new ClassNotFoundException(name);
}
} catch (PrivilegedActionException e) {
throw new ClassNotFoundException(name, e.getException());
}
}
/**
* Returns the permissions for the given codesource object.
* The implementation of this method first calls super.getPermissions,
* to get the permissions
* granted by the super class, and then adds additional permissions
* based on the URL of the codesource.
* <p>
* If the protocol is "file"
* and the path specifies a file, permission is granted to read all files
* and (recursively) all files and subdirectories contained in
* that directory. This is so applets with a codebase of
* file:/blah/some.jar can read in file:/blah/, which is needed to
* be backward compatible. We also add permission to connect back to
* the "localhost".
*
* @param codesource the codesource
* @throws NullPointerException if {@code codesource} is {@code null}.
* @return the permissions granted to the codesource
*/
protected PermissionCollection getPermissions(CodeSource codesource)
{
final PermissionCollection perms = super.getPermissions(codesource);
URL url = codesource.getLocation();
String path = null;
Permission p;
try {
p = url.openConnection().getPermission();
} catch (java.io.IOException ioe) {
p = null;
}
if (p instanceof FilePermission) {
path = p.getName();
} else if ((p == null) && (url.getProtocol().equals("file"))) {
path = url.getFile().replace('/', File.separatorChar);
path = ParseUtil.decode(path);
}
if (path != null) {
final String rawPath = path;
if (!path.endsWith(File.separator)) {
int endIndex = path.lastIndexOf(File.separatorChar);
if (endIndex != -1) {
path = path.substring(0, endIndex + 1) + "-";
perms.add(new FilePermission(path,
SecurityConstants.FILE_READ_ACTION));
}
}
final File f = new File(rawPath);
final boolean isDirectory = f.isDirectory();
// grant codebase recursive read permission
// this should only be granted to non-UNC file URL codebase and
// the codesource path must either be a directory, or a file
// that ends with .jar or .zip
if (allowRecursiveDirectoryRead && (isDirectory ||
rawPath.toLowerCase().endsWith(".jar") ||
rawPath.toLowerCase().endsWith(".zip"))) {
Permission bperm;
try {
bperm = base.openConnection().getPermission();
} catch (java.io.IOException ioe) {
bperm = null;
}
if (bperm instanceof FilePermission) {
String bpath = bperm.getName();
if (bpath.endsWith(File.separator)) {
bpath += "-";
}
perms.add(new FilePermission(bpath,
SecurityConstants.FILE_READ_ACTION));
} else if ((bperm == null) && (base.getProtocol().equals("file"))) {
String bpath = base.getFile().replace('/', File.separatorChar);
bpath = ParseUtil.decode(bpath);
if (bpath.endsWith(File.separator)) {
bpath += "-";
}
perms.add(new FilePermission(bpath, SecurityConstants.FILE_READ_ACTION));
}
}
}
return perms;
}
/*
* Returns the contents of the specified URL as an array of bytes.
*/
private static byte[] getBytes(URL url) throws IOException {
URLConnection uc = url.openConnection();
if (uc instanceof java.net.HttpURLConnection) {
java.net.HttpURLConnection huc = (java.net.HttpURLConnection) uc;
int code = huc.getResponseCode();
if (code >= java.net.HttpURLConnection.HTTP_BAD_REQUEST) {
throw new IOException("open HTTP connection failed.");
}
}
int len = uc.getContentLength();
// Fixed #4507227: Slow performance to load
// class and resources. [stanleyh]
//
// Use buffered input stream [stanleyh]
InputStream in = new BufferedInputStream(uc.getInputStream());
byte[] b;
try {
b = IOUtils.readAllBytes(in);
if (len != -1 && b.length != len)
throw new EOFException("Expected:" + len + ", read:" + b.length);
} finally {
in.close();
}
return b;
}
// Object for synchronization around getResourceAsStream()
private Object syncResourceAsStream = new Object();
private Object syncResourceAsStreamFromJar = new Object();
// Flag to indicate getResourceAsStream() is in call
private boolean resourceAsStreamInCall = false;
private boolean resourceAsStreamFromJarInCall = false;
/**
* Returns an input stream for reading the specified resource.
*
* The search order is described in the documentation for {@link
* #getResource(String)}.<p>
*
* @param name the resource name
* @return an input stream for reading the resource, or <code>null</code>
* if the resource could not be found
* @since JDK1.1
*/
public InputStream getResourceAsStream(String name)
{
if (name == null) {
throw new NullPointerException("name");
}
try
{
InputStream is = null;
// Fixed #4507227: Slow performance to load
// class and resources. [stanleyh]
//
// The following is used to avoid calling
// AppletClassLoader.findResource() in
// super.getResourceAsStream(). Otherwise,
// unnecessary connection will be made.
//
synchronized(syncResourceAsStream)
{
resourceAsStreamInCall = true;
// Call super class
is = super.getResourceAsStream(name);
resourceAsStreamInCall = false;
}
// 4668479: Option to turn off codebase lookup in AppletClassLoader
// during resource requests. [stanley.ho]
if (codebaseLookup == true && is == null)
{
// If resource cannot be obtained,
// try to download it from codebase
URL url = new URL(base, ParseUtil.encodePath(name, false));
is = url.openStream();
}
return is;
}
catch (Exception e)
{
return null;
}
}
/**
* Returns an input stream for reading the specified resource from the
* the loaded jar files.
*
* The search order is described in the documentation for {@link
* #getResource(String)}.<p>
*
* @param name the resource name
* @return an input stream for reading the resource, or <code>null</code>
* if the resource could not be found
* @since JDK1.1
*/
public InputStream getResourceAsStreamFromJar(String name) {
if (name == null) {
throw new NullPointerException("name");
}
try {
InputStream is = null;
synchronized(syncResourceAsStreamFromJar) {
resourceAsStreamFromJarInCall = true;
// Call super class
is = super.getResourceAsStream(name);
resourceAsStreamFromJarInCall = false;
}
return is;
} catch (Exception e) {
return null;
}
}
/*
* Finds the applet resource with the specified name. First checks
* loaded JAR files then the applet code base for the resource.
*/
public URL findResource(String name) {
// check loaded JAR files
URL url = super.findResource(name);
// 6215746: Disable META-INF/* lookup from codebase in
// applet/plugin classloader. [stanley.ho]
if (name.startsWith("META-INF/"))
return url;
// 4668479: Option to turn off codebase lookup in AppletClassLoader
// during resource requests. [stanley.ho]
if (codebaseLookup == false)
return url;
if (url == null)
{
//#4805170, if it is a call from Applet.getImage()
//we should check for the image only in the archives
boolean insideGetResourceAsStreamFromJar = false;
synchronized(syncResourceAsStreamFromJar) {
insideGetResourceAsStreamFromJar = resourceAsStreamFromJarInCall;
}
if (insideGetResourceAsStreamFromJar) {
return null;
}
// Fixed #4507227: Slow performance to load
// class and resources. [stanleyh]
//
// Check if getResourceAsStream is called.
//
boolean insideGetResourceAsStream = false;
synchronized(syncResourceAsStream)
{
insideGetResourceAsStream = resourceAsStreamInCall;
}
// If getResourceAsStream is called, don't
// trigger the following code. Otherwise,
// unnecessary connection will be made.
//
if (insideGetResourceAsStream == false)
{
// otherwise, try the code base
try {
url = new URL(base, ParseUtil.encodePath(name, false));
// check if resource exists
if(!resourceExists(url))
url = null;
} catch (Exception e) {
// all exceptions, including security exceptions, are caught
url = null;
}
}
}
return url;
}
private boolean resourceExists(URL url) {
// Check if the resource exists.
// It almost works to just try to do an openConnection() but
// HttpURLConnection will return true on HTTP_BAD_REQUEST
// when the requested name ends in ".html", ".htm", and ".txt"
// and we want to be able to handle these
//
// Also, cannot just open a connection for things like FileURLConnection,
// because they succeed when connecting to a nonexistent file.
// So, in those cases we open and close an input stream.
boolean ok = true;
try {
URLConnection conn = url.openConnection();
if (conn instanceof java.net.HttpURLConnection) {
java.net.HttpURLConnection hconn =
(java.net.HttpURLConnection) conn;
// To reduce overhead, using http HEAD method instead of GET method
hconn.setRequestMethod("HEAD");
int code = hconn.getResponseCode();
if (code == java.net.HttpURLConnection.HTTP_OK) {
return true;
}
if (code >= java.net.HttpURLConnection.HTTP_BAD_REQUEST) {
return false;
}
} else {
/**
* Fix for #4182052 - stanleyh
*
* The same connection should be reused to avoid multiple
* HTTP connections
*/
// our best guess for the other cases
InputStream is = conn.getInputStream();
is.close();
}
} catch (Exception ex) {
ok = false;
}
return ok;
}
/*
* Returns an enumeration of all the applet resources with the specified
* name. First checks loaded JAR files then the applet code base for all
* available resources.
*/
public Enumeration findResources(String name) throws IOException {
final Enumeration e = super.findResources(name);
// 6215746: Disable META-INF/* lookup from codebase in
// applet/plugin classloader. [stanley.ho]
if (name.startsWith("META-INF/"))
return e;
// 4668479: Option to turn off codebase lookup in AppletClassLoader
// during resource requests. [stanley.ho]
if (codebaseLookup == false)
return e;
URL u = new URL(base, ParseUtil.encodePath(name, false));
if (!resourceExists(u)) {
u = null;
}
final URL url = u;
return new Enumeration() {
private boolean done;
public Object nextElement() {
if (!done) {
if (e.hasMoreElements()) {
return e.nextElement();
}
done = true;
if (url != null) {
return url;
}
}
throw new NoSuchElementException();
}
public boolean hasMoreElements() {
return !done && (e.hasMoreElements() || url != null);
}
};
}
/*
* Load and resolve the file specified by the applet tag CODE
* attribute. The argument can either be the relative path
* of the class file itself or just the name of the class.
*/
Class loadCode(String name) throws ClassNotFoundException {
// first convert any '/' or native file separator to .
name = name.replace('/', '.');
name = name.replace(File.separatorChar, '.');
// deal with URL rewriting
String cookie = null;
int index = name.indexOf(";");
if(index != -1) {
cookie = name.substring(index, name.length());
name = name.substring(0, index);
}
// save that name for later
String fullName = name;
// then strip off any suffixes
if (name.endsWith(".class") || name.endsWith(".java")) {
name = name.substring(0, name.lastIndexOf('.'));
}
try {
if(cookie != null)
name = (new StringBuffer(name)).append(cookie).toString();
return loadClass(name);
} catch (ClassNotFoundException e) {
}
// then if it didn't end with .java or .class, or in the
// really pathological case of a class named class or java
if(cookie != null)
fullName = (new StringBuffer(fullName)).append(cookie).toString();
return loadClass(fullName);
}
/*
* The threadgroup that the applets loaded by this classloader live
* in. In the sun.* implementation of applets, the security manager's
* (AppletSecurity) getThreadGroup returns the thread group of the
* first applet on the stack, which is the applet's thread group.
*/
private AppletThreadGroup threadGroup;
private AppContext appContext;
public ThreadGroup getThreadGroup() {
synchronized (threadGroupSynchronizer) {
if (threadGroup == null || threadGroup.isDestroyed()) {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
threadGroup = new AppletThreadGroup(base + "-threadGroup");
// threadGroup.setDaemon(true);
// threadGroup is now destroyed by AppContext.dispose()
// Create the new AppContext from within a Thread belonging
// to the newly created ThreadGroup, and wait for the
// creation to complete before returning from this method.
AppContextCreator creatorThread = new AppContextCreator(threadGroup);
// Since this thread will later be used to launch the
// applet's AWT-event dispatch thread and we want the applet
// code executing the AWT callbacks to use their own class
// loader rather than the system class loader, explicitly
// set the context class loader to the AppletClassLoader.
creatorThread.setContextClassLoader(AppletClassLoader.this);
creatorThread.start();
try {
synchronized(creatorThread.syncObject) {
while (!creatorThread.created) {
creatorThread.syncObject.wait();
}
}
} catch (InterruptedException e) { }
appContext = creatorThread.appContext;
return null;
}
});
}
return threadGroup;
}
}
/*
* Get the AppContext, if any, corresponding to this AppletClassLoader.
*/
public AppContext getAppContext() {
return appContext;
}
int usageCount = 0;
/**
* Grab this AppletClassLoader and its ThreadGroup/AppContext, so they
* won't be destroyed.
*/
public void grab() {
synchronized(grabReleaseSynchronizer) {
usageCount++;
}
getThreadGroup(); // Make sure ThreadGroup/AppContext exist
}
protected void setExceptionStatus()
{
exceptionStatus = true;
}
public boolean getExceptionStatus()
{
return exceptionStatus;
}
/**
* Release this AppletClassLoader and its ThreadGroup/AppContext.
* If nothing else has grabbed this AppletClassLoader, its ThreadGroup
* and AppContext will be destroyed.
*
* Because this method may destroy the AppletClassLoader's ThreadGroup,
* this method should NOT be called from within the AppletClassLoader's
* ThreadGroup.
*
* Changed modifier to protected in order to be able to overwrite this
* function in PluginClassLoader.java
*/
protected void release() {
AppContext tempAppContext = null;
synchronized(grabReleaseSynchronizer) {
if (usageCount > 1) {
--usageCount;
} else {
synchronized(threadGroupSynchronizer) {
tempAppContext = resetAppContext();
}
}
}
// Dispose appContext outside any sync block to
// prevent potential deadlock.
if (tempAppContext != null) {
try {
tempAppContext.dispose(); // nuke the world!
} catch (IllegalThreadStateException e) { }
}
}
/*
* reset classloader's AppContext and ThreadGroup
* This method is for subclass PluginClassLoader to
* reset superclass's AppContext and ThreadGroup but do
* not dispose the AppContext. PluginClassLoader does not
* use UsageCount to decide whether to dispose AppContext
*
* @return previous AppContext
*/
protected AppContext resetAppContext() {
AppContext tempAppContext = null;
synchronized(threadGroupSynchronizer) {
// Store app context in temp variable
tempAppContext = appContext;
usageCount = 0;
appContext = null;
threadGroup = null;
}
return tempAppContext;
}
// Hash map to store applet compatibility info
private HashMap jdk11AppletInfo = new HashMap();
private HashMap jdk12AppletInfo = new HashMap();
/**
* Set applet target level as JDK 1.1.
*
* @param clazz Applet class.
* @param bool true if JDK is targeted for JDK 1.1;
* false otherwise.
*/
void setJDK11Target(Class clazz, boolean bool)
{
jdk11AppletInfo.put(clazz.toString(), Boolean.valueOf(bool));
}
/**
* Set applet target level as JDK 1.2.
*
* @param clazz Applet class.
* @param bool true if JDK is targeted for JDK 1.2;
* false otherwise.
*/
void setJDK12Target(Class clazz, boolean bool)
{
jdk12AppletInfo.put(clazz.toString(), Boolean.valueOf(bool));
}
/**
* Determine if applet is targeted for JDK 1.1.
*
* @param applet Applet class.
* @return TRUE if applet is targeted for JDK 1.1;
* FALSE if applet is not;
* null if applet is unknown.
*/
Boolean isJDK11Target(Class clazz)
{
return (Boolean) jdk11AppletInfo.get(clazz.toString());
}
/**
* Determine if applet is targeted for JDK 1.2.
*
* @param applet Applet class.
* @return TRUE if applet is targeted for JDK 1.2;
* FALSE if applet is not;
* null if applet is unknown.
*/
Boolean isJDK12Target(Class clazz)
{
return (Boolean) jdk12AppletInfo.get(clazz.toString());
}
private static AppletMessageHandler mh =
new AppletMessageHandler("appletclassloader");
/*
* Prints a class loading error message.
*/
private static void printError(String name, Throwable e) {
String s = null;
if (e == null) {
s = mh.getMessage("filenotfound", name);
} else if (e instanceof IOException) {
s = mh.getMessage("fileioexception", name);
} else if (e instanceof ClassFormatError) {
s = mh.getMessage("fileformat", name);
} else if (e instanceof ThreadDeath) {
s = mh.getMessage("filedeath", name);
} else if (e instanceof Error) {
s = mh.getMessage("fileerror", e.toString(), name);
}
if (s != null) {
System.err.println(s);
}
}
}
/*
* The AppContextCreator class is used to create an AppContext from within
* a Thread belonging to the new AppContext's ThreadGroup. To wait for
* this operation to complete before continuing, wait for the notifyAll()
* operation on the syncObject to occur.
*/
class AppContextCreator extends Thread {
Object syncObject = new Object();
AppContext appContext = null;
volatile boolean created = false;
AppContextCreator(ThreadGroup group) {
super(group, "AppContextCreator");
}
public void run() {
appContext = SunToolkit.createNewAppContext();
created = true;
synchronized(syncObject) {
syncObject.notifyAll();
}
} // run()
} // class AppContextCreator

View File

@@ -0,0 +1,65 @@
/*
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.util.EventObject;
/**
* AppletEvent class.
*
* @author Sunita Mani
*/
public class AppletEvent extends EventObject {
private Object arg;
private int id;
public AppletEvent(Object source, int id, Object argument) {
super(source);
this.arg = argument;
this.id = id;
}
public int getID() {
return id;
}
public Object getArgument() {
return arg;
}
public String toString() {
String str = getClass().getName() + "[source=" + source + " + id="+ id;
if (arg != null) {
str += " + arg=" + arg;
}
str += " ]";
return str;
}
}

View File

@@ -0,0 +1,127 @@
/*
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.util.EventListener;
import java.io.Serializable;
import java.io.ObjectOutputStream;
import java.io.IOException;
/**
* AppletEventMulticaster class. This class manages an immutable
* structure consisting of a chain of AppletListeners and is
* responsible for dispatching events to them.
*
* @author Sunita Mani
*/
public class AppletEventMulticaster implements AppletListener {
private final AppletListener a, b;
public AppletEventMulticaster(AppletListener a, AppletListener b) {
this.a = a; this.b = b;
}
public void appletStateChanged(AppletEvent e) {
a.appletStateChanged(e);
b.appletStateChanged(e);
}
/**
* Adds Applet-listener-a with Applet-listener-b and
* returns the resulting multicast listener.
* @param a Applet-listener-a
* @param b Applet-listener-b
*/
public static AppletListener add(AppletListener a, AppletListener b) {
return addInternal(a, b);
}
/**
* Removes the old Applet-listener from Applet-listener-l and
* returns the resulting multicast listener.
* @param l Applet-listener-l
* @param oldl the Applet-listener being removed
*/
public static AppletListener remove(AppletListener l, AppletListener oldl) {
return removeInternal(l, oldl);
}
/**
* Returns the resulting multicast listener from adding listener-a
* and listener-b together.
* If listener-a is null, it returns listener-b;
* If listener-b is null, it returns listener-a
* If neither are null, then it creates and returns
* a new AppletEventMulticaster instance which chains a with b.
* @param a event listener-a
* @param b event listener-b
*/
private static AppletListener addInternal(AppletListener a, AppletListener b) {
if (a == null) return b;
if (b == null) return a;
return new AppletEventMulticaster(a, b);
}
/**
* Removes a listener from this multicaster and returns the
* resulting multicast listener.
* @param oldl the listener to be removed
*/
protected AppletListener remove(AppletListener oldl) {
if (oldl == a) return b;
if (oldl == b) return a;
AppletListener a2 = removeInternal(a, oldl);
AppletListener b2 = removeInternal(b, oldl);
if (a2 == a && b2 == b) {
return this; // it's not here
}
return addInternal(a2, b2);
}
/**
* Returns the resulting multicast listener after removing the
* old listener from listener-l.
* If listener-l equals the old listener OR listener-l is null,
* returns null.
* Else if listener-l is an instance of AppletEventMulticaster
* then it removes the old listener from it.
* Else, returns listener l.
* @param l the listener being removed from
* @param oldl the listener being removed
*/
private static AppletListener removeInternal(AppletListener l, AppletListener oldl) {
if (l == oldl || l == null) {
return null;
} else if (l instanceof AppletEventMulticaster) {
return ((AppletEventMulticaster)l).remove(oldl);
} else {
return l; // it's not here
}
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.io.IOException;
/**
* An applet IO exception.
*
* @author Koji Uno
*/
public
class AppletIOException extends IOException {
private String key = null;
private Object msgobj = null;
public AppletIOException(String key) {
super(key);
this.key = key;
}
public AppletIOException(String key, Object arg) {
this(key);
msgobj = arg;
}
public String getLocalizedMessage() {
if( msgobj != null)
return amh.getMessage(key, msgobj);
else
return amh.getMessage(key);
}
private static AppletMessageHandler amh = new AppletMessageHandler("appletioexception");
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
/**
* An applet security exception.
*
* @author Arthur van Hoff
*/
public
class AppletIllegalArgumentException extends IllegalArgumentException {
private String key = null;
public AppletIllegalArgumentException(String key) {
super(key);
this.key = key;
}
public String getLocalizedMessage() {
return amh.getMessage(key);
}
private static AppletMessageHandler amh = new AppletMessageHandler("appletillegalargumentexception");
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.awt.Toolkit;
import java.awt.Image;
import sun.awt.image.URLImageSource;
import java.net.URL;
class AppletImageRef extends sun.misc.Ref {
URL url;
/**
* Create the Ref
*/
AppletImageRef(URL url) {
this.url = url;
}
public void flush() {
super.flush();
}
/**
* Reconsitute the image. Only called when the ref has been flushed.
*/
public Object reconstitute() {
Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
return img;
}
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.util.EventListener;
/**
* Applet Listener interface. This interface is to be implemented
* by objects interested in AppletEvents.
*
* @author Sunita Mani
*/
public interface AppletListener extends EventListener {
public void appletStateChanged(AppletEvent e);
}

View File

@@ -0,0 +1,113 @@
/*
* Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.util.ResourceBundle;
import java.util.MissingResourceException;
import java.text.MessageFormat;
/**
* An hanlder of localized messages.
*
* @author Koji Uno
*/
class AppletMessageHandler {
private static ResourceBundle rb;
private String baseKey = null;
static {
try {
rb = ResourceBundle.getBundle
("sun.applet.resources.MsgAppletViewer");
} catch (MissingResourceException e) {
System.out.println(e.getMessage());
System.exit(1);
}
}
AppletMessageHandler(String baseKey) {
this.baseKey = baseKey;
}
String getMessage(String key) {
return (String)rb.getString(getQualifiedKey(key));
}
String getMessage(String key, Object arg){
String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
Object msgobj[] = new Object[1];
if (arg == null) {
arg = "null"; // mimic java.io.PrintStream.print(String)
}
msgobj[0] = arg;
return msgfmt.format(msgobj);
}
String getMessage(String key, Object arg1, Object arg2) {
String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
Object msgobj[] = new Object[2];
if (arg1 == null) {
arg1 = "null";
}
if (arg2 == null) {
arg2 = "null";
}
msgobj[0] = arg1;
msgobj[1] = arg2;
return msgfmt.format(msgobj);
}
String getMessage(String key, Object arg1, Object arg2, Object arg3) {
String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
Object msgobj[] = new Object[3];
if (arg1 == null) {
arg1 = "null";
}
if (arg2 == null) {
arg2 = "null";
}
if (arg3 == null) {
arg3 = "null";
}
msgobj[0] = arg1;
msgobj[1] = arg2;
msgobj[2] = arg3;
return msgfmt.format(msgobj);
}
String getMessage(String key, Object arg[]) {
String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
return msgfmt.format(arg);
}
String getQualifiedKey(String subKey) {
return baseKey + "." + subKey;
}
}

View File

@@ -0,0 +1,106 @@
/*
* Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COPYRIGHT goes here
*/
package sun.applet;
import java.io.*;
import java.lang.reflect.Array;
/**
* This subclass of ObjectInputStream delegates loading of classes to
* an existing ClassLoader.
*/
class AppletObjectInputStream extends ObjectInputStream
{
private AppletClassLoader loader;
/**
* Loader must be non-null;
*/
public AppletObjectInputStream(InputStream in, AppletClassLoader loader)
throws IOException, StreamCorruptedException {
super(in);
if (loader == null) {
throw new AppletIllegalArgumentException("appletillegalargumentexception.objectinputstream");
}
this.loader = loader;
}
/**
* Make a primitive array class
*/
private Class primitiveType(char type) {
switch (type) {
case 'B': return byte.class;
case 'C': return char.class;
case 'D': return double.class;
case 'F': return float.class;
case 'I': return int.class;
case 'J': return long.class;
case 'S': return short.class;
case 'Z': return boolean.class;
default: return null;
}
}
/**
* Use the given ClassLoader rather than using the system class
*/
protected Class resolveClass(ObjectStreamClass classDesc)
throws IOException, ClassNotFoundException {
String cname = classDesc.getName();
if (cname.startsWith("[")) {
// An array
Class component; // component class
int dcount; // dimension
for (dcount=1; cname.charAt(dcount)=='['; dcount++) ;
if (cname.charAt(dcount) == 'L') {
component = loader.loadClass(cname.substring(dcount+1,
cname.length()-1));
} else {
if (cname.length() != dcount+1) {
throw new ClassNotFoundException(cname);// malformed
}
component = primitiveType(cname.charAt(dcount));
}
int dim[] = new int[dcount];
for (int i=0; i<dcount; i++) {
dim[i]=0;
}
return Array.newInstance(component, dim).getClass();
} else {
return loader.loadClass(cname);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,221 @@
/*
* Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.awt.*;
import java.io.*;
import java.util.Properties;
import sun.net.www.http.HttpClient;
import sun.net.ftp.FtpClient;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import java.security.PrivilegedActionException;
import sun.security.action.*;
class AppletProps extends Frame {
TextField proxyHost;
TextField proxyPort;
Choice accessMode;
AppletProps() {
setTitle(amh.getMessage("title"));
Panel p = new Panel();
p.setLayout(new GridLayout(0, 2));
p.add(new Label(amh.getMessage("label.http.server", "Http proxy server:")));
p.add(proxyHost = new TextField());
p.add(new Label(amh.getMessage("label.http.proxy")));
p.add(proxyPort = new TextField());
p.add(new Label(amh.getMessage("label.class")));
p.add(accessMode = new Choice());
accessMode.addItem(amh.getMessage("choice.class.item.restricted"));
accessMode.addItem(amh.getMessage("choice.class.item.unrestricted"));
add("Center", p);
p = new Panel();
p.add(new Button(amh.getMessage("button.apply")));
p.add(new Button(amh.getMessage("button.reset")));
p.add(new Button(amh.getMessage("button.cancel")));
add("South", p);
move(200, 150);
pack();
reset();
}
void reset() {
AppletSecurity security = (AppletSecurity) System.getSecurityManager();
if (security != null)
security.reset();
String proxyhost = (String) AccessController.doPrivileged(
new GetPropertyAction("http.proxyHost"));
String proxyport = (String) AccessController.doPrivileged(
new GetPropertyAction("http.proxyPort"));
Boolean tmp = (Boolean) AccessController.doPrivileged(
new GetBooleanAction("package.restrict.access.sun"));
boolean packageRestrict = tmp.booleanValue();
if (packageRestrict) {
accessMode.select(amh.getMessage("choice.class.item.restricted"));
} else {
accessMode.select(amh.getMessage("choice.class.item.unrestricted"));
}
if (proxyhost != null) {
proxyHost.setText(proxyhost);
proxyPort.setText(proxyport);
} else {
proxyHost.setText("");
proxyPort.setText("");
}
}
void apply() {
String proxyHostValue = proxyHost.getText().trim();
String proxyPortValue = proxyPort.getText().trim();
// Get properties
final Properties props = (Properties) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return System.getProperties();
}
});
if (proxyHostValue.length() != 0) {
/* 4066402 */
/* Check for parsable value in proxy port number field before */
/* applying. Display warning to user until parsable value is */
/* entered. */
int proxyPortNumber = 0;
try {
proxyPortNumber = Integer.parseInt(proxyPortValue);
} catch (NumberFormatException e) {}
if (proxyPortNumber <= 0) {
proxyPort.selectAll();
proxyPort.requestFocus();
(new AppletPropsErrorDialog(this,
amh.getMessage("title.invalidproxy"),
amh.getMessage("label.invalidproxy"),
amh.getMessage("button.ok"))).show();
return;
}
/* end 4066402 */
props.put("http.proxyHost", proxyHostValue);
props.put("http.proxyPort", proxyPortValue);
} else {
props.put("http.proxyHost", "");
}
if (amh.getMessage("choice.class.item.restricted").equals(accessMode.getSelectedItem())) {
props.put("package.restrict.access.sun", "true");
} else {
props.put("package.restrict.access.sun", "false");
}
// Save properties
try {
reset();
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws IOException {
File dotAV = Main.theUserPropertiesFile;
FileOutputStream out = new FileOutputStream(dotAV);
Properties avProps = new Properties();
for (int i = 0; i < Main.avDefaultUserProps.length; i++) {
String avKey = Main.avDefaultUserProps[i][0];
avProps.setProperty(avKey, props.getProperty(avKey));
}
avProps.store(out, amh.getMessage("prop.store"));
out.close();
return null;
}
});
hide();
} catch (java.security.PrivilegedActionException e) {
System.out.println(amh.getMessage("apply.exception",
e.getException()));
// XXX what's the general feeling on stack traces to System.out?
e.printStackTrace();
reset();
}
}
public boolean action(Event evt, Object obj) {
if (amh.getMessage("button.apply").equals(obj)) {
apply();
return true;
}
if (amh.getMessage("button.reset").equals(obj)) {
reset();
return true;
}
if (amh.getMessage("button.cancel").equals(obj)) {
reset();
hide();
return true;
}
return false;
}
private static AppletMessageHandler amh = new AppletMessageHandler("appletprops");
}
/* 4066432 */
/* Dialog class to display property-related errors to user */
class AppletPropsErrorDialog extends Dialog {
public AppletPropsErrorDialog(Frame parent, String title, String message,
String buttonText) {
super(parent, title, true);
Panel p = new Panel();
add("Center", new Label(message));
p.add(new Button(buttonText));
add("South", p);
pack();
Dimension dDim = size();
Rectangle fRect = parent.bounds();
move(fRect.x + ((fRect.width - dDim.width) / 2),
fRect.y + ((fRect.height - dDim.height) / 2));
}
public boolean action(Event event, Object object) {
hide();
dispose();
return true;
}
}
/* end 4066432 */

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.net.URL;
import java.awt.Image;
import sun.misc.Ref;
/**
* Part of this class still remains only to support legacy, 100%-impure
* applications such as HotJava 1.0.1.
*/
public class AppletResourceLoader {
public static Image getImage(URL url) {
return AppletViewer.getCachedImage(url);
}
public static Ref getImageRef(URL url) {
return AppletViewer.getCachedImageRef(url);
}
public static void flushImages() {
AppletViewer.flushImageCache();
}
}

View File

@@ -0,0 +1,369 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.io.File;
import java.io.FilePermission;
import java.io.IOException;
import java.io.FileDescriptor;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.net.SocketPermission;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.security.*;
import java.lang.reflect.*;
import sun.awt.AWTSecurityManager;
import sun.awt.AppContext;
import sun.security.provider.*;
import sun.security.util.SecurityConstants;
/**
* This class defines an applet security policy
*
*/
public
class AppletSecurity extends AWTSecurityManager {
//URLClassLoader.acc
private static Field facc = null;
//AccessControlContext.context;
private static Field fcontext = null;
static {
try {
facc = URLClassLoader.class.getDeclaredField("acc");
facc.setAccessible(true);
fcontext = AccessControlContext.class.getDeclaredField("context");
fcontext.setAccessible(true);
} catch (NoSuchFieldException e) {
throw new UnsupportedOperationException(e);
}
}
/**
* Construct and initialize.
*/
public AppletSecurity() {
reset();
}
// Cache to store known restricted packages
private HashSet restrictedPackages = new HashSet();
/**
* Reset from Properties
*/
public void reset()
{
// Clear cache
restrictedPackages.clear();
AccessController.doPrivileged(new PrivilegedAction() {
public Object run()
{
// Enumerate system properties
Enumeration e = System.getProperties().propertyNames();
while (e.hasMoreElements())
{
String name = (String) e.nextElement();
if (name != null && name.startsWith("package.restrict.access."))
{
String value = System.getProperty(name);
if (value != null && value.equalsIgnoreCase("true"))
{
String pkg = name.substring(24);
// Cache restricted packages
restrictedPackages.add(pkg);
}
}
}
return null;
}
});
}
/**
* get the current (first) instance of an AppletClassLoader on the stack.
*/
private AppletClassLoader currentAppletClassLoader()
{
// try currentClassLoader first
ClassLoader loader = currentClassLoader();
if ((loader == null) || (loader instanceof AppletClassLoader))
return (AppletClassLoader)loader;
// if that fails, get all the classes on the stack and check them.
Class[] context = getClassContext();
for (int i = 0; i < context.length; i++) {
loader = context[i].getClassLoader();
if (loader instanceof AppletClassLoader)
return (AppletClassLoader)loader;
}
/*
* fix bug # 6433620 the logic here is : try to find URLClassLoader from
* class context, check its AccessControlContext to see if
* AppletClassLoader is in stack when it's created. for this kind of
* URLClassLoader, return the AppContext associated with the
* AppletClassLoader.
*/
for (int i = 0; i < context.length; i++) {
final ClassLoader currentLoader = context[i].getClassLoader();
if (currentLoader instanceof URLClassLoader) {
loader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
AccessControlContext acc = null;
ProtectionDomain[] pds = null;
try {
acc = (AccessControlContext) facc.get(currentLoader);
if (acc == null) {
return null;
}
pds = (ProtectionDomain[]) fcontext.get(acc);
if (pds == null) {
return null;
}
} catch (Exception e) {
throw new UnsupportedOperationException(e);
}
for (int i=0; i<pds.length; i++) {
ClassLoader cl = pds[i].getClassLoader();
if (cl instanceof AppletClassLoader) {
return cl;
}
}
return null;
}
});
if (loader != null) {
return (AppletClassLoader) loader;
}
}
}
// if that fails, try the context class loader
loader = Thread.currentThread().getContextClassLoader();
if (loader instanceof AppletClassLoader)
return (AppletClassLoader)loader;
// no AppletClassLoaders on the stack
return (AppletClassLoader)null;
}
/**
* Returns true if this threadgroup is in the applet's own thread
* group. This will return false if there is no current class
* loader.
*/
protected boolean inThreadGroup(ThreadGroup g) {
if (currentAppletClassLoader() == null)
return false;
else
return getThreadGroup().parentOf(g);
}
/**
* Returns true of the threadgroup of thread is in the applet's
* own threadgroup.
*/
protected boolean inThreadGroup(Thread thread) {
return inThreadGroup(thread.getThreadGroup());
}
/**
* Applets are not allowed to manipulate threads outside
* applet thread groups. However a terminated thread no longer belongs
* to any group.
*/
public void checkAccess(Thread t) {
/* When multiple applets is reloaded simultaneously, there will be
* multiple invocations to this method from plugin's SecurityManager.
* This method should not be synchronized to avoid deadlock when
* a page with multiple applets is reloaded
*/
if ((t.getState() != Thread.State.TERMINATED) && !inThreadGroup(t)) {
checkPermission(SecurityConstants.MODIFY_THREAD_PERMISSION);
}
}
private boolean inThreadGroupCheck = false;
/**
* Applets are not allowed to manipulate thread groups outside
* applet thread groups.
*/
public synchronized void checkAccess(ThreadGroup g) {
if (inThreadGroupCheck) {
// if we are in a recursive check, it is because
// inThreadGroup is calling appletLoader.getThreadGroup
// in that case, only do the super check, as appletLoader
// has a begin/endPrivileged
checkPermission(SecurityConstants.MODIFY_THREADGROUP_PERMISSION);
} else {
try {
inThreadGroupCheck = true;
if (!inThreadGroup(g)) {
checkPermission(SecurityConstants.MODIFY_THREADGROUP_PERMISSION);
}
} finally {
inThreadGroupCheck = false;
}
}
}
/**
* Throws a <code>SecurityException</code> if the
* calling thread is not allowed to access the package specified by
* the argument.
* <p>
* This method is used by the <code>loadClass</code> method of class
* loaders.
* <p>
* The <code>checkPackageAccess</code> method for class
* <code>SecurityManager</code> calls
* <code>checkPermission</code> with the
* <code>RuntimePermission("accessClassInPackage."+pkg)</code>
* permission.
*
* @param pkg the package name.
* @exception SecurityException if the caller does not have
* permission to access the specified package.
* @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)
*/
public void checkPackageAccess(final String pkgname) {
// first see if the VM-wide policy allows access to this package
super.checkPackageAccess(pkgname);
// now check the list of restricted packages
for (Iterator iter = restrictedPackages.iterator(); iter.hasNext();)
{
String pkg = (String) iter.next();
// Prevent matching "sun" and "sunir" even if they
// starts with similar beginning characters
//
if (pkgname.equals(pkg) || pkgname.startsWith(pkg + "."))
{
checkPermission(new java.lang.RuntimePermission
("accessClassInPackage." + pkgname));
}
}
}
/**
* Tests if a client can get access to the AWT event queue.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>AWTPermission("accessEventQueue")</code> permission.
*
* @since JDK1.1
* @exception SecurityException if the caller does not have
* permission to access the AWT event queue.
*/
public void checkAwtEventQueueAccess() {
AppContext appContext = AppContext.getAppContext();
AppletClassLoader appletClassLoader = currentAppletClassLoader();
if (AppContext.isMainContext(appContext) && (appletClassLoader != null)) {
// If we're about to allow access to the main EventQueue,
// and anything untrusted is on the class context stack,
// disallow access.
super.checkPermission(SecurityConstants.AWT.CHECK_AWT_EVENTQUEUE_PERMISSION);
}
} // checkAwtEventQueueAccess()
/**
* Returns the thread group of the applet. We consult the classloader
* if there is one.
*/
public ThreadGroup getThreadGroup() {
/* If any applet code is on the execution stack, we return
that applet's ThreadGroup. Otherwise, we use the default
behavior. */
AppletClassLoader appletLoader = currentAppletClassLoader();
ThreadGroup loaderGroup = (appletLoader == null) ? null
: appletLoader.getThreadGroup();
if (loaderGroup != null) {
return loaderGroup;
} else {
return super.getThreadGroup();
}
} // getThreadGroup()
/**
* Get the AppContext corresponding to the current context.
* The default implementation returns null, but this method
* may be overridden by various SecurityManagers
* (e.g. AppletSecurity) to index AppContext objects by the
* calling context.
*
* @return the AppContext corresponding to the current context.
* @see sun.awt.AppContext
* @see java.lang.SecurityManager
* @since JDK1.2.1
*/
public AppContext getAppContext() {
AppletClassLoader appletLoader = currentAppletClassLoader();
if (appletLoader == null) {
return null;
} else {
AppContext context = appletLoader.getAppContext();
// context == null when some thread in applet thread group
// has not been destroyed in AppContext.dispose()
if (context == null) {
throw new SecurityException("Applet classloader has invalid AppContext");
}
return context;
}
}
} // class AppletSecurity

View File

@@ -0,0 +1,65 @@
/*
* Copyright (c) 1995, 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
/**
* An applet security exception.
*
* @author Arthur van Hoff
*/
public
class AppletSecurityException extends SecurityException {
private String key = null;
private Object msgobj[] = null;
public AppletSecurityException(String name) {
super(name);
this.key = name;
}
public AppletSecurityException(String name, String arg) {
this(name);
msgobj = new Object[1];
msgobj[0] = (Object)arg;
}
public AppletSecurityException(String name, String arg1, String arg2) {
this(name);
msgobj = new Object[2];
msgobj[0] = (Object)arg1;
msgobj[1] = (Object)arg2;
}
public String getLocalizedMessage() {
if( msgobj != null)
return amh.getMessage(key, msgobj);
else
return amh.getMessage(key);
}
private static AppletMessageHandler amh = new AppletMessageHandler("appletsecurityexception");
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
/**
* This class defines an applet thread group.
*
* @author Arthur van Hoff
*/
public class AppletThreadGroup extends ThreadGroup {
/**
* Constructs a new thread group for an applet.
* The parent of this new group is the thread
* group of the currently running thread.
*
* @param name the name of the new thread group.
*/
public AppletThreadGroup(String name) {
this(Thread.currentThread().getThreadGroup(), name);
}
/**
* Creates a new thread group for an applet.
* The parent of this new group is the specified
* thread group.
*
* @param parent the parent thread group.
* @param name the name of the new thread group.
* @exception NullPointerException if the thread group argument is
* <code>null</code>.
* @exception SecurityException if the current thread cannot create a
* thread in the specified thread group.
* @see java.lang.SecurityException
* @since JDK1.1.1
*/
public AppletThreadGroup(ThreadGroup parent, String name) {
super(parent, name);
setMaxPriority(Thread.NORM_PRIORITY - 1);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* AppletViewerFactory.java
*/
package sun.applet;
import java.util.Hashtable;
import java.net.URL;
import java.awt.MenuBar;
public
interface AppletViewerFactory {
public AppletViewer createAppletViewer(int x, int y, URL doc, Hashtable atts);
public MenuBar getBaseMenuBar();
public boolean isStandalone();
}

View File

@@ -0,0 +1,216 @@
/*
* Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.util.*;
import java.io.*;
import java.net.URL;
import java.net.MalformedURLException;
import java.awt.*;
import java.applet.*;
import sun.tools.jar.*;
/**
* Sample applet panel class. The panel manages and manipulates the
* applet as it is being loaded. It forks a seperate thread in a new
* thread group to call the applet's init(), start(), stop(), and
* destroy() methods.
*
* @author Arthur van Hoff
*/
class AppletViewerPanel extends AppletPanel {
/* Are we debugging? */
static boolean debug = false;
/**
* The document url.
*/
URL documentURL;
/**
* The base url.
*/
URL baseURL;
/**
* The attributes of the applet.
*/
Hashtable atts;
/*
* JDK 1.1 serialVersionUID
*/
private static final long serialVersionUID = 8890989370785545619L;
/**
* Construct an applet viewer and start the applet.
*/
AppletViewerPanel(URL documentURL, Hashtable atts) {
this.documentURL = documentURL;
this.atts = atts;
String att = getParameter("codebase");
if (att != null) {
if (!att.endsWith("/")) {
att += "/";
}
try {
baseURL = new URL(documentURL, att);
} catch (MalformedURLException e) {
}
}
if (baseURL == null) {
String file = documentURL.getFile();
int i = file.lastIndexOf('/');
if (i >= 0 && i < file.length() - 1) {
try {
baseURL = new URL(documentURL, file.substring(0, i + 1));
} catch (MalformedURLException e) {
}
}
}
// when all is said & done, baseURL shouldn't be null
if (baseURL == null)
baseURL = documentURL;
}
/**
* Get an applet parameter.
*/
public String getParameter(String name) {
return (String)atts.get(name.toLowerCase());
}
/**
* Get the document url.
*/
public URL getDocumentBase() {
return documentURL;
}
/**
* Get the base url.
*/
public URL getCodeBase() {
return baseURL;
}
/**
* Get the width.
*/
public int getWidth() {
String w = getParameter("width");
if (w != null) {
return Integer.valueOf(w).intValue();
}
return 0;
}
/**
* Get the height.
*/
public int getHeight() {
String h = getParameter("height");
if (h != null) {
return Integer.valueOf(h).intValue();
}
return 0;
}
/**
* Get initial_focus
*/
public boolean hasInitialFocus()
{
// 6234219: Do not set initial focus on an applet
// during startup if applet is targeted for
// JDK 1.1/1.2. [stanley.ho]
if (isJDK11Applet() || isJDK12Applet())
return false;
String initialFocus = getParameter("initial_focus");
if (initialFocus != null)
{
if (initialFocus.toLowerCase().equals("false"))
return false;
}
return true;
}
/**
* Get the code parameter
*/
public String getCode() {
return getParameter("code");
}
/**
* Return the list of jar files if specified.
* Otherwise return null.
*/
public String getJarFiles() {
return getParameter("archive");
}
/**
* Return the value of the object param
*/
public String getSerializedObject() {
return getParameter("object");// another name?
}
/**
* Get the applet context. For now this is
* also implemented by the AppletPanel class.
*/
public AppletContext getAppletContext() {
return (AppletContext)getParent();
}
static void debug(String s) {
if(debug)
System.err.println("AppletViewerPanel:::" + s);
}
static void debug(String s, Throwable t) {
if(debug) {
t.printStackTrace();
debug(s);
}
}
}

View File

@@ -0,0 +1,528 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector;
import sun.net.www.ParseUtil;
/**
* The main entry point into AppletViewer.
*/
public class Main {
/**
* The file which contains all of the AppletViewer specific properties.
*/
static File theUserPropertiesFile;
/**
* The default key/value pairs for the required user-specific properties.
*/
static final String [][] avDefaultUserProps = {
// There's a bootstrapping problem here. If we don't have a proxyHost,
// then we will not be able to connect to a URL outside the firewall;
// however, there's no way for us to set the proxyHost without starting
// AppletViewer. This problem existed before the re-write.
{"http.proxyHost", ""},
{"http.proxyPort", "80"},
{"package.restrict.access.sun", "true"}
};
static {
File userHome = new File(System.getProperty("user.home"));
// make sure we can write to this location
userHome.canWrite();
theUserPropertiesFile = new File(userHome, ".appletviewer");
}
// i18n
private static AppletMessageHandler amh = new AppletMessageHandler("appletviewer");
/**
* Member variables set according to options passed in to AppletViewer.
*/
private boolean debugFlag = false;
private boolean helpFlag = false;
private String encoding = null;
private boolean noSecurityFlag = false;
private static boolean cmdLineTestFlag = false;
/**
* The list of valid URLs passed in to AppletViewer.
*/
private static Vector urlList = new Vector(1);
// This is used in init(). Getting rid of this is desirable but depends
// on whether the property that uses it is necessary/standard.
public static final String theVersion = System.getProperty("java.version");
/**
* The main entry point into AppletViewer.
*/
public static void main(String [] args) {
Main m = new Main();
int ret = m.run(args);
// Exit immediately if we got some sort of error along the way.
// For debugging purposes, if we have passed in "-XcmdLineTest" we
// force a premature exit.
if ((ret != 0) || (cmdLineTestFlag))
System.exit(ret);
}
private int run(String [] args) {
// DECODE ARGS
try {
if (args.length == 0) {
usage();
return 0;
}
for (int i = 0; i < args.length; ) {
int j = decodeArg(args, i);
if (j == 0) {
throw new ParseException(lookup("main.err.unrecognizedarg",
args[i]));
}
i += j;
}
} catch (ParseException e) {
System.err.println(e.getMessage());
return 1;
}
// CHECK ARGUMENTS
if (helpFlag) {
usage();
return 0;
}
if (urlList.size() == 0) {
System.err.println(lookup("main.err.inputfile"));
return 1;
}
if (debugFlag) {
// START A DEBUG SESSION
// Given the current architecture, we will end up decoding the
// arguments again, but at least we are guaranteed to have
// arguments which are valid.
return invokeDebugger(args);
}
// INSTALL THE SECURITY MANAGER (if necessary)
if (!noSecurityFlag && (System.getSecurityManager() == null))
init();
// LAUNCH APPLETVIEWER FOR EACH URL
for (int i = 0; i < urlList.size(); i++) {
try {
// XXX 5/17 this parsing method should be changed/fixed so that
// it doesn't do both parsing of the html file and launching of
// the AppletPanel
AppletViewer.parse((URL) urlList.elementAt(i), encoding);
} catch (IOException e) {
System.err.println(lookup("main.err.io", e.getMessage()));
return 1;
}
}
return 0;
}
private static void usage() {
System.out.println(lookup("usage"));
}
/**
* Decode a single argument in an array and return the number of elements
* used.
*
* @param args The array of arguments.
* @param i The argument to decode.
* @return The number of array elements used when the argument was
* decoded.
* @exception ParseException
* Thrown when there is a problem with something in the
* argument array.
*/
private int decodeArg(String [] args, int i) throws ParseException {
String arg = args[i];
int argc = args.length;
if ("-help".equalsIgnoreCase(arg) || "-?".equals(arg)) {
helpFlag = true;
return 1;
} else if ("-encoding".equals(arg) && (i < argc - 1)) {
if (encoding != null)
throw new ParseException(lookup("main.err.dupoption", arg));
encoding = args[++i];
return 2;
} else if ("-debug".equals(arg)) {
debugFlag = true;
return 1;
} else if ("-Xnosecurity".equals(arg)) {
// This is an undocumented (and, in the future, unsupported)
// flag which prevents AppletViewer from installing its own
// SecurityManager.
System.err.println();
System.err.println(lookup("main.warn.nosecmgr"));
System.err.println();
noSecurityFlag = true;
return 1;
} else if ("-XcmdLineTest".equals(arg)) {
// This is an internal flag which should be used for command-line
// testing. It instructs AppletViewer to force a premature exit
// immediately after the applet has been launched.
cmdLineTestFlag = true;
return 1;
} else if (arg.startsWith("-")) {
throw new ParseException(lookup("main.err.unsupportedopt", arg));
} else {
// we found what we hope is a url
URL url = parseURL(arg);
if (url != null) {
urlList.addElement(url);
return 1;
}
}
return 0;
}
/**
* Following the relevant RFC, construct a valid URL based on the passed in
* string.
*
* @param url a string which represents either a relative or absolute URL.
* @return a URL when the passed in string can be interpreted according
* to the RFC, <code>null</code> otherwise.
* @exception ParseException
* Thrown when we are unable to construct a proper URL from the
* passed in string.
*/
private URL parseURL(String url) throws ParseException {
URL u = null;
// prefix of the urls with 'file' scheme
String prefix = "file:";
try {
if (url.indexOf(':') <= 1)
{
// appletviewer accepts only unencoded filesystem paths
u = ParseUtil.fileToEncodedURL(new File(url));
} else if (url.startsWith(prefix) &&
url.length() != prefix.length() &&
!(new File(url.substring(prefix.length())).isAbsolute()))
{
// relative file URL, like this "file:index.html"
// ensure that this file URL is absolute
// ParseUtil.fileToEncodedURL should be done last (see 6329251)
String path = ParseUtil.fileToEncodedURL(new File(System.getProperty("user.dir"))).getPath() +
url.substring(prefix.length());
u = new URL("file", "", path);
} else {
// appletviewer accepts only encoded urls
u = new URL(url);
}
} catch (MalformedURLException e) {
throw new ParseException(lookup("main.err.badurl",
url, e.getMessage()));
}
return u;
}
/**
* Invoke the debugger with the arguments passed in to appletviewer.
*
* @param args The arguments passed into the debugger.
* @return <code>0</code> if the debugger is invoked successfully,
* <code>1</code> otherwise.
*/
private int invokeDebugger(String [] args) {
// CONSTRUCT THE COMMAND LINE
String [] newArgs = new String[args.length + 1];
int current = 0;
// Add a -classpath argument that prevents
// the debugger from launching appletviewer with the default of
// ".". appletviewer's classpath should never contain valid
// classes since they will result in security exceptions.
// Ideally, the classpath should be set to "", but the VM won't
// allow an empty classpath, so a phony directory name is used.
String phonyDir = System.getProperty("java.home") +
File.separator + "phony";
newArgs[current++] = "-Djava.class.path=" + phonyDir;
// Appletviewer's main class is the debuggee
newArgs[current++] = "sun.applet.Main";
// Append all the of the original appletviewer arguments,
// leaving out the "-debug" option.
for (int i = 0; i < args.length; i++) {
if (!("-debug".equals(args[i]))) {
newArgs[current++] = args[i];
}
}
// LAUNCH THE DEBUGGER
// Reflection is used for two reasons:
// 1) The debugger classes are on classpath and thus must be loaded
// by the application class loader. (Currently, appletviewer are
// loaded through the boot class path out of rt.jar.)
// 2) Reflection removes any build dependency between appletviewer
// and jdb.
try {
Class c = Class.forName("com.sun.tools.example.debug.tty.TTY", true,
ClassLoader.getSystemClassLoader());
Method m = c.getDeclaredMethod("main",
new Class[] { String[].class });
m.invoke(null, new Object[] { newArgs });
} catch (ClassNotFoundException cnfe) {
System.err.println(lookup("main.debug.cantfinddebug"));
return 1;
} catch (NoSuchMethodException nsme) {
System.err.println(lookup("main.debug.cantfindmain"));
return 1;
} catch (InvocationTargetException ite) {
System.err.println(lookup("main.debug.exceptionindebug"));
return 1;
} catch (IllegalAccessException iae) {
System.err.println(lookup("main.debug.cantaccess"));
return 1;
}
return 0;
}
private void init() {
// GET APPLETVIEWER USER-SPECIFIC PROPERTIES
Properties avProps = getAVProps();
// ADD OTHER RANDOM PROPERTIES
// XXX 5/18 need to revisit why these are here, is there some
// standard for what is available?
// Standard browser properties
avProps.put("browser", "sun.applet.AppletViewer");
avProps.put("browser.version", "1.06");
avProps.put("browser.vendor", "Oracle Corporation");
avProps.put("http.agent", "Java(tm) 2 SDK, Standard Edition v" + theVersion);
// Define which packages can be extended by applets
// XXX 5/19 probably not needed, not checked in AppletSecurity
avProps.put("package.restrict.definition.java", "true");
avProps.put("package.restrict.definition.sun", "true");
// Define which properties can be read by applets.
// A property named by "key" can be read only when its twin
// property "key.applet" is true. The following ten properties
// are open by default. Any other property can be explicitly
// opened up by the browser user by calling appletviewer with
// -J-Dkey.applet=true
avProps.put("java.version.applet", "true");
avProps.put("java.vendor.applet", "true");
avProps.put("java.vendor.url.applet", "true");
avProps.put("java.class.version.applet", "true");
avProps.put("os.name.applet", "true");
avProps.put("os.version.applet", "true");
avProps.put("os.arch.applet", "true");
avProps.put("file.separator.applet", "true");
avProps.put("path.separator.applet", "true");
avProps.put("line.separator.applet", "true");
// Read in the System properties. If something is going to be
// over-written, warn about it.
Properties sysProps = System.getProperties();
for (Enumeration e = sysProps.propertyNames(); e.hasMoreElements(); ) {
String key = (String) e.nextElement();
String val = (String) sysProps.getProperty(key);
String oldVal;
if ((oldVal = (String) avProps.setProperty(key, val)) != null)
System.err.println(lookup("main.warn.prop.overwrite", key,
oldVal, val));
}
// INSTALL THE PROPERTY LIST
System.setProperties(avProps);
// Create and install the security manager
if (!noSecurityFlag) {
System.setSecurityManager(new AppletSecurity());
} else {
System.err.println(lookup("main.nosecmgr"));
}
// REMIND: Create and install a socket factory!
}
/**
* Read the AppletViewer user-specific properties. Typically, these
* properties should reside in the file $USER/.appletviewer. If this file
* does not exist, one will be created. Information for this file will
* be gleaned from $USER/.hotjava/properties. If that file does not exist,
* then default values will be used.
*
* @return A Properties object containing all of the AppletViewer
* user-specific properties.
*/
private Properties getAVProps() {
Properties avProps = new Properties();
File dotAV = theUserPropertiesFile;
if (dotAV.exists()) {
// we must have already done the conversion
if (dotAV.canRead()) {
// just read the file
avProps = getAVProps(dotAV);
} else {
// send out warning and use defaults
System.err.println(lookup("main.warn.cantreadprops",
dotAV.toString()));
avProps = setDefaultAVProps();
}
} else {
// create the $USER/.appletviewer file
// see if $USER/.hotjava/properties exists
File userHome = new File(System.getProperty("user.home"));
File dotHJ = new File(userHome, ".hotjava");
dotHJ = new File(dotHJ, "properties");
if (dotHJ.exists()) {
// just read the file
avProps = getAVProps(dotHJ);
} else {
// send out warning and use defaults
System.err.println(lookup("main.warn.cantreadprops",
dotHJ.toString()));
avProps = setDefaultAVProps();
}
// SAVE THE FILE
try (FileOutputStream out = new FileOutputStream(dotAV)) {
avProps.store(out, lookup("main.prop.store"));
} catch (IOException e) {
System.err.println(lookup("main.err.prop.cantsave",
dotAV.toString()));
}
}
return avProps;
}
/**
* Set the AppletViewer user-specific properties to be the default values.
*
* @return A Properties object containing all of the AppletViewer
* user-specific properties, set to the default values.
*/
private Properties setDefaultAVProps() {
Properties avProps = new Properties();
for (int i = 0; i < avDefaultUserProps.length; i++) {
avProps.setProperty(avDefaultUserProps[i][0],
avDefaultUserProps[i][1]);
}
return avProps;
}
/**
* Given a file, find only the properties that are setable by AppletViewer.
*
* @param inFile A Properties file from which we select the properties of
* interest.
* @return A Properties object containing all of the AppletViewer
* user-specific properties.
*/
private Properties getAVProps(File inFile) {
Properties avProps = new Properties();
// read the file
Properties tmpProps = new Properties();
try (FileInputStream in = new FileInputStream(inFile)) {
tmpProps.load(new BufferedInputStream(in));
} catch (IOException e) {
System.err.println(lookup("main.err.prop.cantread", inFile.toString()));
}
// pick off the properties we care about
for (int i = 0; i < avDefaultUserProps.length; i++) {
String value = tmpProps.getProperty(avDefaultUserProps[i][0]);
if (value != null) {
// the property exists in the file, so replace the default
avProps.setProperty(avDefaultUserProps[i][0], value);
} else {
// just use the default
avProps.setProperty(avDefaultUserProps[i][0],
avDefaultUserProps[i][1]);
}
}
return avProps;
}
/**
* Methods for easier i18n handling.
*/
private static String lookup(String key) {
return amh.getMessage(key);
}
private static String lookup(String key, String arg0) {
return amh.getMessage(key, arg0);
}
private static String lookup(String key, String arg0, String arg1) {
return amh.getMessage(key, arg0, arg1);
}
private static String lookup(String key, String arg0, String arg1,
String arg2) {
return amh.getMessage(key, arg0, arg1, arg2);
}
class ParseException extends RuntimeException
{
public ParseException(String msg) {
super(msg);
}
public ParseException(Throwable t) {
super(t.getMessage());
this.t = t;
}
Throwable t = null;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "Dismiss"},
{"appletviewer.tool.title", "Applet Viewer: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Restart"},
{"appletviewer.menuitem.reload", "Reload"},
{"appletviewer.menuitem.stop", "Stop"},
{"appletviewer.menuitem.save", "Save..."},
{"appletviewer.menuitem.start", "Start"},
{"appletviewer.menuitem.clone", "Clone..."},
{"appletviewer.menuitem.tag", "Tag..."},
{"appletviewer.menuitem.info", "Info..."},
{"appletviewer.menuitem.edit", "Edit"},
{"appletviewer.menuitem.encoding", "Character Encoding"},
{"appletviewer.menuitem.print", "Print..."},
{"appletviewer.menuitem.props", "Properties..."},
{"appletviewer.menuitem.close", "Close"},
{"appletviewer.menuitem.quit", "Quit"},
{"appletviewer.label.hello", "Hello..."},
{"appletviewer.status.start", "starting applet..."},
{"appletviewer.appletsave.filedialogtitle","Serialize Applet into File"},
{"appletviewer.appletsave.err1", "serializing an {0} to {1}"},
{"appletviewer.appletsave.err2", "in appletSave: {0}"},
{"appletviewer.applettag", "Tag shown"},
{"appletviewer.applettag.textframe", "Applet HTML Tag"},
{"appletviewer.appletinfo.applet", "-- no applet info --"},
{"appletviewer.appletinfo.param", "-- no parameter info --"},
{"appletviewer.appletinfo.textframe", "Applet Info"},
{"appletviewer.appletprint.fail", "Printing failed."},
{"appletviewer.appletprint.finish", "Finished printing."},
{"appletviewer.appletprint.cancel", "Printing cancelled."},
{"appletviewer.appletencoding", "Character Encoding: {0}"},
{"appletviewer.parse.warning.requiresname", "Warning: <param name=... value=...> tag requires name attribute."},
{"appletviewer.parse.warning.paramoutside", "Warning: <param> tag outside <applet> ... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Warning: <applet> tag requires code attribute."},
{"appletviewer.parse.warning.applet.requiresheight", "Warning: <applet> tag requires height attribute."},
{"appletviewer.parse.warning.applet.requireswidth", "Warning: <applet> tag requires width attribute."},
{"appletviewer.parse.warning.object.requirescode", "Warning: <object> tag requires code attribute."},
{"appletviewer.parse.warning.object.requiresheight", "Warning: <object> tag requires height attribute."},
{"appletviewer.parse.warning.object.requireswidth", "Warning: <object> tag requires width attribute."},
{"appletviewer.parse.warning.embed.requirescode", "Warning: <embed> tag requires code attribute."},
{"appletviewer.parse.warning.embed.requiresheight", "Warning: <embed> tag requires height attribute."},
{"appletviewer.parse.warning.embed.requireswidth", "Warning: <embed> tag requires width attribute."},
{"appletviewer.parse.warning.appnotLongersupported", "Warning: <app> tag no longer supported, use <applet> instead:"},
{"appletviewer.usage", "Usage: appletviewer <options> url(s)\n\nwhere <options> include:\n -debug Start the applet viewer in the Java debugger\n -encoding <encoding> Specify character encoding used by HTML files\n -J<runtime flag> Pass argument to the java interpreter\n\nThe -J option is non-standard and subject to change without notice."},
{"appletviewer.main.err.unsupportedopt", "Unsupported option: {0}"},
{"appletviewer.main.err.unrecognizedarg", "Unrecognized argument: {0}"},
{"appletviewer.main.err.dupoption", "Duplicate use of option: {0}"},
{"appletviewer.main.err.inputfile", "No input files specified."},
{"appletviewer.main.err.badurl", "Bad URL: {0} ( {1} )"},
{"appletviewer.main.err.io", "I/O exception while reading: {0}"},
{"appletviewer.main.err.readablefile", "Make sure that {0} is a file and is readable."},
{"appletviewer.main.err.correcturl", "Is {0} the correct URL?"},
{"appletviewer.main.prop.store", "User-specific properties for AppletViewer"},
{"appletviewer.main.err.prop.cantread", "Can''t read user properties file: {0}"},
{"appletviewer.main.err.prop.cantsave", "Can''t save user properties file: {0}"},
{"appletviewer.main.warn.nosecmgr", "Warning: disabling security."},
{"appletviewer.main.debug.cantfinddebug", "Can''t find the debugger!"},
{"appletviewer.main.debug.cantfindmain", "Can''t find main method in the debugger!"},
{"appletviewer.main.debug.exceptionindebug", "Exception in the debugger!"},
{"appletviewer.main.debug.cantaccess", "Can''t access the debugger!"},
{"appletviewer.main.nosecmgr", "Warning: SecurityManager not installed!"},
{"appletviewer.main.warning", "Warning: No applets were started. Make sure the input contains an <applet> tag."},
{"appletviewer.main.warn.prop.overwrite", "Warning: Temporarily overwriting system property at user''s request: key: {0} old value: {1} new value: {2}"},
{"appletviewer.main.warn.cantreadprops", "Warning: Can''t read AppletViewer properties file: {0} Using defaults."},
{"appletioexception.loadclass.throw.interrupted", "class loading interrupted: {0}"},
{"appletioexception.loadclass.throw.notloaded", "class not loaded: {0}"},
{"appletclassloader.loadcode.verbose", "Opening stream to: {0} to get {1}"},
{"appletclassloader.filenotfound", "File not found when looking for: {0}"},
{"appletclassloader.fileformat", "File format exception when loading: {0}"},
{"appletclassloader.fileioexception", "I/O exception when loading: {0}"},
{"appletclassloader.fileexception", "{0} exception when loading: {1}"},
{"appletclassloader.filedeath", "{0} killed when loading: {1}"},
{"appletclassloader.fileerror", "{0} error when loading: {1}"},
{"appletclassloader.findclass.verbose.openstream", "Opening stream to: {0} to get {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource for name: {0}"},
{"appletclassloader.getresource.verbose.found", "Found resource: {0} as a system resource"},
{"appletclassloader.getresourceasstream.verbose", "Found resource: {0} as a system resource"},
{"appletpanel.runloader.err", "Either object or code parameter!"},
{"appletpanel.runloader.exception", "exception while deserializing {0}"},
{"appletpanel.destroyed", "Applet destroyed."},
{"appletpanel.loaded", "Applet loaded."},
{"appletpanel.started", "Applet started."},
{"appletpanel.inited", "Applet initialized."},
{"appletpanel.stopped", "Applet stopped."},
{"appletpanel.disposed", "Applet disposed."},
{"appletpanel.nocode", "APPLET tag missing CODE parameter."},
{"appletpanel.notfound", "load: class {0} not found."},
{"appletpanel.nocreate", "load: {0} can''t be instantiated."},
{"appletpanel.noconstruct", "load: {0} is not public or has no public constructor."},
{"appletpanel.death", "killed"},
{"appletpanel.exception", "exception: {0}."},
{"appletpanel.exception2", "exception: {0}: {1}."},
{"appletpanel.error", "error: {0}."},
{"appletpanel.error2", "error: {0}: {1}."},
{"appletpanel.notloaded", "Init: applet not loaded."},
{"appletpanel.notinited", "Start: applet not initialized."},
{"appletpanel.notstarted", "Stop: applet not started."},
{"appletpanel.notstopped", "Destroy: applet not stopped."},
{"appletpanel.notdestroyed", "Dispose: applet not destroyed."},
{"appletpanel.notdisposed", "Load: applet not disposed."},
{"appletpanel.bail", "Interrupted: bailing out."},
{"appletpanel.filenotfound", "File not found when looking for: {0}"},
{"appletpanel.fileformat", "File format exception when loading: {0}"},
{"appletpanel.fileioexception", "I/O exception when loading: {0}"},
{"appletpanel.fileexception", "{0} exception when loading: {1}"},
{"appletpanel.filedeath", "{0} killed when loading: {1}"},
{"appletpanel.fileerror", "{0} error when loading: {1}"},
{"appletpanel.badattribute.exception", "HTML parsing: incorrect value for width/height attribute"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requires non-null loader"},
{"appletprops.title", "AppletViewer Properties"},
{"appletprops.label.http.server", "Http proxy server:"},
{"appletprops.label.http.proxy", "Http proxy port:"},
{"appletprops.label.network", "Network access:"},
{"appletprops.choice.network.item.none", "None"},
{"appletprops.choice.network.item.applethost", "Applet Host"},
{"appletprops.choice.network.item.unrestricted", "Unrestricted"},
{"appletprops.label.class", "Class access:"},
{"appletprops.choice.class.item.restricted", "Restricted"},
{"appletprops.choice.class.item.unrestricted", "Unrestricted"},
{"appletprops.label.unsignedapplet", "Allow unsigned applets:"},
{"appletprops.choice.unsignedapplet.no", "No"},
{"appletprops.choice.unsignedapplet.yes", "Yes"},
{"appletprops.button.apply", "Apply"},
{"appletprops.button.cancel", "Cancel"},
{"appletprops.button.reset", "Reset"},
{"appletprops.apply.exception", "Failed to save properties: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Invalid Entry"},
{"appletprops.label.invalidproxy", "Proxy Port must be a positive integer value."},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "User-specific properties for AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "Security Exception: classloader"},
{"appletsecurityexception.checkaccess.thread", "Security Exception: thread"},
{"appletsecurityexception.checkaccess.threadgroup", "Security Exception: threadgroup: {0}"},
{"appletsecurityexception.checkexit", "Security Exception: exit: {0}"},
{"appletsecurityexception.checkexec", "Security Exception: exec: {0}"},
{"appletsecurityexception.checklink", "Security Exception: link: {0}"},
{"appletsecurityexception.checkpropsaccess", "Security Exception: properties"},
{"appletsecurityexception.checkpropsaccess.key", "Security Exception: properties access {0}"},
{"appletsecurityexception.checkread.exception1", "Security Exception: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "Security Exception: file.read: {0}"},
{"appletsecurityexception.checkread", "Security Exception: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "Security Exception: {0}, {1}"},
{"appletsecurityexception.checkwrite", "Security Exception: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "Security Exception: fd.read"},
{"appletsecurityexception.checkwrite.fd", "Security Exception: fd.write"},
{"appletsecurityexception.checklisten", "Security Exception: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "Security Exception: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "Security Exception: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "Security Exception: Couldn''t connect to {0} with origin from {1}."},
{"appletsecurityexception.checkconnect.networkhost2", "Security Exception: Couldn''t resolve IP for host {0} or for {1}. "},
{"appletsecurityexception.checkconnect.networkhost3", "Security Exception: Could not resolve IP for host {0}. See the trustProxy property."},
{"appletsecurityexception.checkconnect", "Security Exception: connect: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
{"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
{"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
{"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
{"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
{"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
{"appletsecurityexception.checkconnect.unknown", "unknown class loader type. unable to check for checking connect"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_de extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "Verwerfen"},
{"appletviewer.tool.title", "Applet Viewer: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Neu starten"},
{"appletviewer.menuitem.reload", "Neu laden"},
{"appletviewer.menuitem.stop", "Stoppen"},
{"appletviewer.menuitem.save", "Speichern..."},
{"appletviewer.menuitem.start", "Starten..."},
{"appletviewer.menuitem.clone", "Klonen..."},
{"appletviewer.menuitem.tag", "Tag..."},
{"appletviewer.menuitem.info", "Informationen..."},
{"appletviewer.menuitem.edit", "Bearbeiten"},
{"appletviewer.menuitem.encoding", "Zeichencodierung"},
{"appletviewer.menuitem.print", "Drucken..."},
{"appletviewer.menuitem.props", "Eigenschaften..."},
{"appletviewer.menuitem.close", "Schlie\u00DFen"},
{"appletviewer.menuitem.quit", "Beenden"},
{"appletviewer.label.hello", "Hallo..."},
{"appletviewer.status.start", "Applet wird gestartet..."},
{"appletviewer.appletsave.filedialogtitle","Applet in Datei serialisieren"},
{"appletviewer.appletsave.err1", "{0} in {1} serialisieren"},
{"appletviewer.appletsave.err2", "in appletSave: {0}"},
{"appletviewer.applettag", "Angezeigtes Tag"},
{"appletviewer.applettag.textframe", "Applet-HTML-Tag"},
{"appletviewer.appletinfo.applet", "-- keine Applet-Informationen --"},
{"appletviewer.appletinfo.param", "-- keine Parameterinformationen --"},
{"appletviewer.appletinfo.textframe", "Applet-Informationen"},
{"appletviewer.appletprint.fail", "Druck nicht erfolgreich."},
{"appletviewer.appletprint.finish", "Druck abgeschlossen."},
{"appletviewer.appletprint.cancel", "Druck abgebrochen."},
{"appletviewer.appletencoding", "Zeichencodierung: {0}"},
{"appletviewer.parse.warning.requiresname", "Warnung: F\u00FCr <param name=... value=...>-Tag ist ein \"name\"-Attribut erforderlich."},
{"appletviewer.parse.warning.paramoutside", "Warnung: <param>-Tag au\u00DFerhalb von <applet> ... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Warnung: F\u00FCr <applet>-Tag ist ein \"code\"-Attribut erforderlich."},
{"appletviewer.parse.warning.applet.requiresheight", "Warnung: F\u00FCr <applet>-Tag ist ein \"height\"-Attribut erforderlich."},
{"appletviewer.parse.warning.applet.requireswidth", "Warnung: F\u00FCr <applet>-Tag ist ein \"width\"-Attribut erforderlich."},
{"appletviewer.parse.warning.object.requirescode", "Warnung: F\u00FCr <object>-Tag ist ein \"code\"-Attribut erforderlich."},
{"appletviewer.parse.warning.object.requiresheight", "Warnung: F\u00FCr <object>-Tag ist ein \"height\"-Attribut erforderlich."},
{"appletviewer.parse.warning.object.requireswidth", "Warnung: F\u00FCr <object>-Tag ist ein \"width\"-Attribut erforderlich."},
{"appletviewer.parse.warning.embed.requirescode", "Warnung: F\u00FCr <embed>-Tag ist ein \"code\"-Attribut erforderlich."},
{"appletviewer.parse.warning.embed.requiresheight", "Warnung: F\u00FCr <embed>-Tag ist ein \"height\"-Attribut erforderlich."},
{"appletviewer.parse.warning.embed.requireswidth", "Warnung: F\u00FCr <embed>-Tag ist ein \"width\"-Attribut erforderlich."},
{"appletviewer.parse.warning.appnotLongersupported", "Warnung: <app>-Tag wird nicht mehr unterst\u00FCtzt. Verwenden Sie stattdessen <applet>:"},
{"appletviewer.usage", "Verwendung: appletviewer <Optionen> url(s)\n\nwobei die <Optionen> Folgendes umfassen:\n -debug Applet Viewer im Java-Debugger starten\n -encoding <Codierung> Zeichencodierung f\u00FCr HTML-Dateien angeben\n -J<Laufzeitkennzeichen> Argument an den Java-Interpreter \u00FCbergeben\n\nDie Option \"-J\" ist nicht standardm\u00E4\u00DFig und kann ohne vorherige Ank\u00FCndigung ge\u00E4ndert werden."},
{"appletviewer.main.err.unsupportedopt", "Nicht unterst\u00FCtzte Option: {0}"},
{"appletviewer.main.err.unrecognizedarg", "Unbekanntes Argument: {0}"},
{"appletviewer.main.err.dupoption", "Doppelte Verwendung von Option: {0}"},
{"appletviewer.main.err.inputfile", "Keine Eingabedateien angegeben."},
{"appletviewer.main.err.badurl", "Ung\u00FCltige URL: {0} ( {1} )"},
{"appletviewer.main.err.io", "I/O-Ausnahme beim Lesen von: {0}"},
{"appletviewer.main.err.readablefile", "Stellen Sie sicher, dass {0} eine lesbare Datei ist."},
{"appletviewer.main.err.correcturl", "Ist {0} die richtige URL?"},
{"appletviewer.main.prop.store", "Benutzerspezifische Eigenschaften f\u00FCr AppletViewer"},
{"appletviewer.main.err.prop.cantread", "Benutzereigenschaftendatei kann nicht gelesen werden: {0}"},
{"appletviewer.main.err.prop.cantsave", "Benutzereigenschaftendatei kann nicht gespeichert werden: {0}"},
{"appletviewer.main.warn.nosecmgr", "Warnung: Sicherheit wird deaktiviert."},
{"appletviewer.main.debug.cantfinddebug", "Debugger kann nicht gefunden werden."},
{"appletviewer.main.debug.cantfindmain", "Hauptmethode im Debugger kann nicht gefunden werden."},
{"appletviewer.main.debug.exceptionindebug", "Ausnahme im Debugger."},
{"appletviewer.main.debug.cantaccess", "Zugriff auf Debugger nicht m\u00F6glich."},
{"appletviewer.main.nosecmgr", "Warnung: SecurityManager nicht installiert."},
{"appletviewer.main.warning", "Warnung: Es wurden keine Applets gestartet. Stellen Sie sicher, dass die Eingabe ein <applet>-Tag enth\u00E4lt."},
{"appletviewer.main.warn.prop.overwrite", "Warnung: Systemeigenschaft wird tempor\u00E4r aufgrund von Benutzeranforderung \u00FCberschrieben: Schl\u00FCssel: {0} Alter Wert: {1} Neuer Wert: {2}"},
{"appletviewer.main.warn.cantreadprops", "Warnung: AppletViewer-Eigenschaftendatei kann nicht gelesen werden: {0} Standardwerte werden verwendet."},
{"appletioexception.loadclass.throw.interrupted", "Laden der Klasse unterbrochen: {0}"},
{"appletioexception.loadclass.throw.notloaded", "Klasse nicht geladen: {0}"},
{"appletclassloader.loadcode.verbose", "\u00D6ffnen von Stream zu: {0}, um {1} abzurufen"},
{"appletclassloader.filenotfound", "Datei nicht gefunden beim Suchen nach: {0}"},
{"appletclassloader.fileformat", "Dateiformatausnahme beim Laden von: {0}"},
{"appletclassloader.fileioexception", "I/O-Ausnahme beim Laden von: {0}"},
{"appletclassloader.fileexception", "{0}-Ausnahme beim Laden von: {1}"},
{"appletclassloader.filedeath", "{0} abgebrochen beim Laden von: {1}"},
{"appletclassloader.fileerror", "{0}-Fehler beim Laden von: {1}"},
{"appletclassloader.findclass.verbose.openstream", "\u00D6ffnen von Stream zu: {0}, um {1} abzurufen"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource f\u00FCr Name: {0}"},
{"appletclassloader.getresource.verbose.found", "Ressource {0} als Systemressource gefunden"},
{"appletclassloader.getresourceasstream.verbose", "Ressource {0} als Systemressource gefunden"},
{"appletpanel.runloader.err", "Objekt oder Codeparameter."},
{"appletpanel.runloader.exception", "Ausnahme beim Deserialisieren von {0}"},
{"appletpanel.destroyed", "Applet zerst\u00F6rt."},
{"appletpanel.loaded", "Applet geladen."},
{"appletpanel.started", "Applet gestartet."},
{"appletpanel.inited", "Applet initialisiert."},
{"appletpanel.stopped", "Applet gestoppt."},
{"appletpanel.disposed", "Applet verworfen."},
{"appletpanel.nocode", "Bei APPLET-Tag fehlt CODE-Parameter."},
{"appletpanel.notfound", "Laden: Klasse {0} nicht gefunden."},
{"appletpanel.nocreate", "Laden: {0} kann nicht instanziiert werden."},
{"appletpanel.noconstruct", "Laden: {0} ist nicht \"public\" oder hat keinen \"public\"-Constructor."},
{"appletpanel.death", "abgebrochen"},
{"appletpanel.exception", "Ausnahme: {0}."},
{"appletpanel.exception2", "Ausnahme: {0}: {1}."},
{"appletpanel.error", "Fehler: {0}."},
{"appletpanel.error2", "Fehler: {0}: {1}."},
{"appletpanel.notloaded", "Init.: Applet nicht geladen."},
{"appletpanel.notinited", "Starten: Applet nicht initialisiert."},
{"appletpanel.notstarted", "Stoppen: Applet nicht gestartet."},
{"appletpanel.notstopped", "Zerst\u00F6ren: Applet nicht gestoppt."},
{"appletpanel.notdestroyed", "Verwerfen: Applet nicht zerst\u00F6rt."},
{"appletpanel.notdisposed", "Laden: Applet nicht verworfen."},
{"appletpanel.bail", "Unterbrochen: Zur\u00FCckziehen."},
{"appletpanel.filenotfound", "Datei nicht gefunden beim Suchen nach: {0}"},
{"appletpanel.fileformat", "Dateiformatausnahme beim Laden von: {0}"},
{"appletpanel.fileioexception", "I/O-Ausnahme beim Laden von: {0}"},
{"appletpanel.fileexception", "{0}-Ausnahme beim Laden von: {1}"},
{"appletpanel.filedeath", "{0} abgebrochen beim Laden von: {1}"},
{"appletpanel.fileerror", "{0}-Fehler beim Laden von: {1}"},
{"appletpanel.badattribute.exception", "HTML-Parsing: Falscher Wert f\u00FCr \"width/height\"-Attribut"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream erfordert Loader ungleich null"},
{"appletprops.title", "AppletViewer-Eigenschaften"},
{"appletprops.label.http.server", "HTTP-Proxyserver:"},
{"appletprops.label.http.proxy", "HTTP-Proxyport:"},
{"appletprops.label.network", "Netzwerkzugriff:"},
{"appletprops.choice.network.item.none", "Keine"},
{"appletprops.choice.network.item.applethost", "Applet-Host"},
{"appletprops.choice.network.item.unrestricted", "Uneingeschr\u00E4nkt"},
{"appletprops.label.class", "Klassenzugriff:"},
{"appletprops.choice.class.item.restricted", "Eingeschr\u00E4nkt"},
{"appletprops.choice.class.item.unrestricted", "Uneingeschr\u00E4nkt"},
{"appletprops.label.unsignedapplet", "Nicht signierte Applets zulassen:"},
{"appletprops.choice.unsignedapplet.no", "Nein"},
{"appletprops.choice.unsignedapplet.yes", "Ja"},
{"appletprops.button.apply", "Anwenden"},
{"appletprops.button.cancel", "Abbrechen"},
{"appletprops.button.reset", "Zur\u00FCcksetzen"},
{"appletprops.apply.exception", "Eigenschaften konnten nicht gespeichert werden: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Ung\u00FCltiger Eintrag"},
{"appletprops.label.invalidproxy", "Proxyport muss ein positiver Ganzzahlwert sein."},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "Benutzerspezifische Eigenschaften f\u00FCr AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "Sicherheitsausnahme: Class Loader"},
{"appletsecurityexception.checkaccess.thread", "Sicherheitsausnahme: Thread"},
{"appletsecurityexception.checkaccess.threadgroup", "Sicherheitsausnahme: Threadgruppe: {0}"},
{"appletsecurityexception.checkexit", "Sicherheitsausnahme: Beenden: {0}"},
{"appletsecurityexception.checkexec", "Sicherheitsausnahme: Ausf\u00FChrung: {0}"},
{"appletsecurityexception.checklink", "Sicherheitsausnahme: Link: {0}"},
{"appletsecurityexception.checkpropsaccess", "Sicherheitsausnahme: Eigenschaften"},
{"appletsecurityexception.checkpropsaccess.key", "Sicherheitsausnahme: Eigenschaftszugriff {0}"},
{"appletsecurityexception.checkread.exception1", "Sicherheitsausnahme: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "Sicherheitsausnahme: file.read: {0}"},
{"appletsecurityexception.checkread", "Sicherheitsausnahme: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "Sicherheitsausnahme: {0}, {1}"},
{"appletsecurityexception.checkwrite", "Sicherheitsausnahme: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "Sicherheitsausnahme: fd.read"},
{"appletsecurityexception.checkwrite.fd", "Sicherheitsausnahme: fd.write"},
{"appletsecurityexception.checklisten", "Sicherheitsausnahme: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "Sicherheitsausnahme: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "Sicherheitsausnahme: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "Sicherheitsausnahme: Verbindung mit {0} mit Ursprung aus {1} konnte nicht hergestellt werden."},
{"appletsecurityexception.checkconnect.networkhost2", "Sicherheitsausnahme: IP f\u00FCr Host {0} oder f\u00FCr {1} konnte nicht aufgel\u00F6st werden. "},
{"appletsecurityexception.checkconnect.networkhost3", "Sicherheitsausnahme: IP f\u00FCr Host {0} konnte nicht aufgel\u00F6st werden. Siehe trustProxy-Eigenschaft."},
{"appletsecurityexception.checkconnect", "Sicherheitsausnahme: Verbinden: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "Sicherheitsausnahme: Zugriff auf Package nicht m\u00F6glich: {0}"},
{"appletsecurityexception.checkpackagedefinition", "Sicherheitsausnahme: Package kann nicht definiert werden: {0}"},
{"appletsecurityexception.cannotsetfactory", "Sicherheitsausnahme: Factory kann nicht festgelegt werden"},
{"appletsecurityexception.checkmemberaccess", "Sicherheitsausnahme: Mitgliedszugriff pr\u00FCfen"},
{"appletsecurityexception.checkgetprintjob", "Sicherheitsausnahme: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "Sicherheitsausnahme: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "Sicherheitsausnahme: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Sicherheitsausnahme: Sicherheitsvorgang: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "Unbekannter Class Loader-Typ. Pr\u00FCfen auf getContext nicht m\u00F6glich"},
{"appletsecurityexception.checkread.unknown", "Unbekannter Class Loader-Typ. Pr\u00FCfen auf checkRead {0} nicht m\u00F6glich"},
{"appletsecurityexception.checkconnect.unknown", "Unbekannter Class Loader-Typ. Pr\u00FCfen auf checkConnect nicht m\u00F6glich"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_es extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "Descartar"},
{"appletviewer.tool.title", "Visor de Applet: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Reiniciar"},
{"appletviewer.menuitem.reload", "Volver a Cargar"},
{"appletviewer.menuitem.stop", "Parar"},
{"appletviewer.menuitem.save", "Guardar..."},
{"appletviewer.menuitem.start", "Iniciar"},
{"appletviewer.menuitem.clone", "Clonar..."},
{"appletviewer.menuitem.tag", "Etiqueta..."},
{"appletviewer.menuitem.info", "Informaci\u00F3n..."},
{"appletviewer.menuitem.edit", "Editar"},
{"appletviewer.menuitem.encoding", "Codificaci\u00F3n de Caracteres"},
{"appletviewer.menuitem.print", "Imprimir..."},
{"appletviewer.menuitem.props", "Propiedades..."},
{"appletviewer.menuitem.close", "Cerrar"},
{"appletviewer.menuitem.quit", "Salir"},
{"appletviewer.label.hello", "Hola..."},
{"appletviewer.status.start", "iniciando applet..."},
{"appletviewer.appletsave.filedialogtitle","Serializar Applet en Archivo"},
{"appletviewer.appletsave.err1", "serializando {0} en {1}"},
{"appletviewer.appletsave.err2", "en appletSave: {0}"},
{"appletviewer.applettag", "Etiqueta Mostrada"},
{"appletviewer.applettag.textframe", "Etiqueta HTML de Applet"},
{"appletviewer.appletinfo.applet", "-- ninguna informaci\u00F3n de applet --"},
{"appletviewer.appletinfo.param", "-- ninguna informaci\u00F3n de par\u00E1metros --"},
{"appletviewer.appletinfo.textframe", "Informaci\u00F3n del Applet"},
{"appletviewer.appletprint.fail", "Fallo de impresi\u00F3n."},
{"appletviewer.appletprint.finish", "Impresi\u00F3n terminada."},
{"appletviewer.appletprint.cancel", "Impresi\u00F3n cancelada."},
{"appletviewer.appletencoding", "Codificaci\u00F3n de Caracteres: {0}"},
{"appletviewer.parse.warning.requiresname", "Advertencia: la etiqueta <param name=... value=...> requiere un atributo name."},
{"appletviewer.parse.warning.paramoutside", "Advertencia: la etiqueta <param> est\u00E1 fuera de <applet> ... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Advertencia: la etiqueta <applet> requiere el atributo code."},
{"appletviewer.parse.warning.applet.requiresheight", "Advertencia: la etiqueta <applet> requiere el atributo height."},
{"appletviewer.parse.warning.applet.requireswidth", "Advertencia: la etiqueta <applet> requiere el atributo width."},
{"appletviewer.parse.warning.object.requirescode", "Advertencia: la etiqueta <object> requiere el atributo code."},
{"appletviewer.parse.warning.object.requiresheight", "Advertencia: la etiqueta <object> requiere el atributo height."},
{"appletviewer.parse.warning.object.requireswidth", "Advertencia: la etiqueta <object> requiere el atributo width."},
{"appletviewer.parse.warning.embed.requirescode", "Advertencia: la etiqueta <embed> requiere el atributo code."},
{"appletviewer.parse.warning.embed.requiresheight", "Advertencia: la etiqueta <embed> requiere el atributo height."},
{"appletviewer.parse.warning.embed.requireswidth", "Advertencia: la etiqueta <embed> requiere el atributo width."},
{"appletviewer.parse.warning.appnotLongersupported", "Advertencia: la etiqueta <app> ya no est\u00E1 soportada, utilice <applet> en su lugar:"},
{"appletviewer.usage", "Sintaxis: appletviewer <opciones> url(s)\n\ndonde <opciones> incluye:\n -debug Iniciar el visor de applet en el depurador Java\n -encoding <codificaci\u00F3n> Especificar la codificaci\u00F3n de caracteres utilizada por los archivos HTML\n -J<indicador de tiempo de ejecuci\u00F3n> Transferir argumento al int\u00E9rprete de Java\n\nLa opci\u00F3n -J es no est\u00E1ndar y est\u00E1 sujeta a cambios sin previo aviso."},
{"appletviewer.main.err.unsupportedopt", "Opci\u00F3n no soportada: {0}"},
{"appletviewer.main.err.unrecognizedarg", "Argumento no reconocido: {0}"},
{"appletviewer.main.err.dupoption", "Uso duplicado de la opci\u00F3n: {0}"},
{"appletviewer.main.err.inputfile", "No se ha especificado ning\u00FAn archivo de entrada."},
{"appletviewer.main.err.badurl", "URL Err\u00F3nea: {0} ( {1} )"},
{"appletviewer.main.err.io", "Excepci\u00F3n de E/S durante la lectura: {0}"},
{"appletviewer.main.err.readablefile", "Aseg\u00FArese de que {0} es un archivo y que se puede leer."},
{"appletviewer.main.err.correcturl", "\u00BFEs {0} la URL correcta?"},
{"appletviewer.main.prop.store", "Propiedades Espec\u00EDficas del Usuario para AppletViewer"},
{"appletviewer.main.err.prop.cantread", "No se puede leer el archivo de propiedades del usuario: {0}"},
{"appletviewer.main.err.prop.cantsave", "No se puede guardar el archivo de propiedades del usuario: {0}"},
{"appletviewer.main.warn.nosecmgr", "Advertencia: desactivando seguridad."},
{"appletviewer.main.debug.cantfinddebug", "No se ha encontrado el depurador."},
{"appletviewer.main.debug.cantfindmain", "No se ha encontrado el m\u00E9todo principal en el depurador."},
{"appletviewer.main.debug.exceptionindebug", "Excepci\u00F3n en el depurador."},
{"appletviewer.main.debug.cantaccess", "No se puede acceder al depurador."},
{"appletviewer.main.nosecmgr", "Advertencia: no se ha instalado SecurityManager."},
{"appletviewer.main.warning", "Advertencia: no se ha iniciado ning\u00FAn applet. Aseg\u00FArese de que la entrada contiene una etiqueta <applet>."},
{"appletviewer.main.warn.prop.overwrite", "Advertencia: se sobrescribir\u00E1 temporalmente la propiedad del sistema cuando lo solicite el usuario: clave: {0} valor anterior: {1} nuevo valor: {2}"},
{"appletviewer.main.warn.cantreadprops", "Advertencia: no se puede leer el archivo de propiedades de AppletViewer: {0}. Utilizando valores por defecto."},
{"appletioexception.loadclass.throw.interrupted", "carga de clase interrumpida: {0}"},
{"appletioexception.loadclass.throw.notloaded", "clase no cargada: {0}"},
{"appletclassloader.loadcode.verbose", "Abriendo flujo a: {0} para obtener {1}"},
{"appletclassloader.filenotfound", "No se ha encontrado el archivo al buscar: {0}"},
{"appletclassloader.fileformat", "Excepci\u00F3n de formato de archivo al cargar: {0}"},
{"appletclassloader.fileioexception", "Excepci\u00F3n de E/S al cargar: {0}"},
{"appletclassloader.fileexception", "Excepci\u00F3n de {0} al cargar: {1}"},
{"appletclassloader.filedeath", "{0} interrumpido al cargar: {1}"},
{"appletclassloader.fileerror", "error de {0} al cargar: {1}"},
{"appletclassloader.findclass.verbose.openstream", "Abriendo flujo a: {0} para obtener {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource para nombre: {0}"},
{"appletclassloader.getresource.verbose.found", "Recurso encontrado: {0} como un recurso de sistema"},
{"appletclassloader.getresourceasstream.verbose", "Recurso encontrado: {0} como un recurso de sistema"},
{"appletpanel.runloader.err", "Par\u00E1metro de c\u00F3digo u objeto."},
{"appletpanel.runloader.exception", "excepci\u00F3n al deserializar {0}"},
{"appletpanel.destroyed", "Applet destruido."},
{"appletpanel.loaded", "Applet cargado."},
{"appletpanel.started", "Applet iniciado."},
{"appletpanel.inited", "Applet inicializado."},
{"appletpanel.stopped", "Applet parado."},
{"appletpanel.disposed", "Applet desechado."},
{"appletpanel.nocode", "Falta el par\u00E1metro CODE en la etiqueta APPLET."},
{"appletpanel.notfound", "cargar: clase {0} no encontrada."},
{"appletpanel.nocreate", "cargar: {0} no se puede instanciar."},
{"appletpanel.noconstruct", "cargar: {0} no es p\u00FAblico o no tiene un constructor p\u00FAblico."},
{"appletpanel.death", "interrumpido"},
{"appletpanel.exception", "excepci\u00F3n: {0}."},
{"appletpanel.exception2", "excepci\u00F3n: {0}: {1}."},
{"appletpanel.error", "error: {0}."},
{"appletpanel.error2", "error: {0}: {1}."},
{"appletpanel.notloaded", "Iniciaci\u00F3n: applet no cargado."},
{"appletpanel.notinited", "Iniciar: applet no inicializado."},
{"appletpanel.notstarted", "Parar: applet no iniciado."},
{"appletpanel.notstopped", "Destruir: applet no parado."},
{"appletpanel.notdestroyed", "Desechar: applet no destruido."},
{"appletpanel.notdisposed", "Cargar: applet no desechado."},
{"appletpanel.bail", "Interrumpido: rescatando."},
{"appletpanel.filenotfound", "No se ha encontrado el archivo al buscar: {0}"},
{"appletpanel.fileformat", "Excepci\u00F3n de formato de archivo al cargar: {0}"},
{"appletpanel.fileioexception", "Excepci\u00F3n de E/S al cargar: {0}"},
{"appletpanel.fileexception", "Excepci\u00F3n de {0} al cargar: {1}"},
{"appletpanel.filedeath", "{0} interrumpido al cargar: {1}"},
{"appletpanel.fileerror", "error de {0} al cargar: {1}"},
{"appletpanel.badattribute.exception", "An\u00E1lisis HTML: valor incorrecto para el atributo width/height."},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requiere un cargador no nulo"},
{"appletprops.title", "Propiedades de AppletViewer"},
{"appletprops.label.http.server", "Servidor Proxy HTTP:"},
{"appletprops.label.http.proxy", "Puerto Proxy HTTP:"},
{"appletprops.label.network", "Acceso de Red:"},
{"appletprops.choice.network.item.none", "Ninguno"},
{"appletprops.choice.network.item.applethost", "Host del Applet"},
{"appletprops.choice.network.item.unrestricted", "No Restringido"},
{"appletprops.label.class", "Acceso de Clase:"},
{"appletprops.choice.class.item.restricted", "Restringido"},
{"appletprops.choice.class.item.unrestricted", "No Restringido"},
{"appletprops.label.unsignedapplet", "Permitir Applets no Firmados:"},
{"appletprops.choice.unsignedapplet.no", "No"},
{"appletprops.choice.unsignedapplet.yes", "S\u00ED"},
{"appletprops.button.apply", "Aplicar"},
{"appletprops.button.cancel", "Cancelar"},
{"appletprops.button.reset", "Restablecer"},
{"appletprops.apply.exception", "Fallo al guardar las propiedades: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Entrada no V\u00E1lida"},
{"appletprops.label.invalidproxy", "El puerto proxy debe ser un valor entero positivo."},
{"appletprops.button.ok", "Aceptar"},
/* end 4066432 */
{"appletprops.prop.store", "Propiedades espec\u00EDficas del usuario para AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "Excepci\u00F3n de Seguridad: classloader"},
{"appletsecurityexception.checkaccess.thread", "Excepci\u00F3n de Seguridad: thread"},
{"appletsecurityexception.checkaccess.threadgroup", "Excepci\u00F3n de Seguridad: threadgroup: {0}"},
{"appletsecurityexception.checkexit", "Excepci\u00F3n de Seguridad: salir: {0}"},
{"appletsecurityexception.checkexec", "Excepci\u00F3n de Seguridad: ejecutar: {0}"},
{"appletsecurityexception.checklink", "Excepci\u00F3n de Seguridad: enlace: {0}"},
{"appletsecurityexception.checkpropsaccess", "Excepci\u00F3n de Seguridad: propiedades"},
{"appletsecurityexception.checkpropsaccess.key", "Excepci\u00F3n de Seguridad: acceso a propiedades {0}"},
{"appletsecurityexception.checkread.exception1", "Excepci\u00F3n de Seguridad: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "Excepci\u00F3n de Seguridad: file.read: {0}"},
{"appletsecurityexception.checkread", "Excepci\u00F3n de Seguridad: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "Excepci\u00F3n de Seguridad: {0}, {1}"},
{"appletsecurityexception.checkwrite", "Excepci\u00F3n de Seguridad: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "Excepci\u00F3n de Seguridad: fd.read"},
{"appletsecurityexception.checkwrite.fd", "Excepci\u00F3n de Seguridad: fd.write"},
{"appletsecurityexception.checklisten", "Excepci\u00F3n de Seguridad: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "Excepci\u00F3n de Seguridad: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "Excepci\u00F3n de Seguridad: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "Excepci\u00F3n de Seguridad: no se puede conectar a {0} con origen de {1}."},
{"appletsecurityexception.checkconnect.networkhost2", "Excepci\u00F3n de Seguridad: no se puede resolver la IP para el host {0} o para {1}. "},
{"appletsecurityexception.checkconnect.networkhost3", "Excepci\u00F3n de Seguridad: no se puede resolver la IP para el host {0}. Consulte la propiedad trustProxy."},
{"appletsecurityexception.checkconnect", "Excepci\u00F3n de Seguridad: conexi\u00F3n: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "Excepci\u00F3n de Seguridad: no se puede acceder al paquete: {0}"},
{"appletsecurityexception.checkpackagedefinition", "Excepci\u00F3n de Seguridad: no se puede definir el paquete: {0}"},
{"appletsecurityexception.cannotsetfactory", "Excepci\u00F3n de Seguridad: no se puede definir el valor de f\u00E1brica"},
{"appletsecurityexception.checkmemberaccess", "Excepci\u00F3n de Seguridad: comprobar el acceso de miembro"},
{"appletsecurityexception.checkgetprintjob", "Excepci\u00F3n de Seguridad: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "Excepci\u00F3n de Seguridad: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "Excepci\u00F3n de Seguridad: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Excepci\u00F3n de Seguridad: operaci\u00F3n de seguridad: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "tipo de cargador de clase desconocido. no se puede comprobar para getContext"},
{"appletsecurityexception.checkread.unknown", "tipo de cargador de clase desconocido. no se puede comprobar para lectura de comprobaci\u00F3n {0}"},
{"appletsecurityexception.checkconnect.unknown", "tipo de cargador de clase desconocido. no se puede comprobar para conexi\u00F3n de comprobaci\u00F3n"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_fr extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "Abandonner"},
{"appletviewer.tool.title", "Visualiseur d''applets : {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Red\u00E9marrer"},
{"appletviewer.menuitem.reload", "Recharger"},
{"appletviewer.menuitem.stop", "Arr\u00EAter"},
{"appletviewer.menuitem.save", "Enregistrer..."},
{"appletviewer.menuitem.start", "D\u00E9marrer"},
{"appletviewer.menuitem.clone", "Cloner..."},
{"appletviewer.menuitem.tag", "Baliser..."},
{"appletviewer.menuitem.info", "Informations..."},
{"appletviewer.menuitem.edit", "Modifier"},
{"appletviewer.menuitem.encoding", "Encodage de caract\u00E8res"},
{"appletviewer.menuitem.print", "Imprimer..."},
{"appletviewer.menuitem.props", "Propri\u00E9t\u00E9s..."},
{"appletviewer.menuitem.close", "Fermer"},
{"appletviewer.menuitem.quit", "Quitter"},
{"appletviewer.label.hello", "Bonjour..."},
{"appletviewer.status.start", "d\u00E9marrage de l'applet..."},
{"appletviewer.appletsave.filedialogtitle","S\u00E9rialiser l'applet dans le fichier"},
{"appletviewer.appletsave.err1", "S\u00E9rialisation de {0} vers {1}"},
{"appletviewer.appletsave.err2", "dans appletSave : {0}"},
{"appletviewer.applettag", "Balise affich\u00E9e"},
{"appletviewer.applettag.textframe", "Balise HTML d'applet"},
{"appletviewer.appletinfo.applet", "-- aucune information d'applet --"},
{"appletviewer.appletinfo.param", "-- aucune information de param\u00E8tre --"},
{"appletviewer.appletinfo.textframe", "Informations d'applet"},
{"appletviewer.appletprint.fail", "Echec de l'impression."},
{"appletviewer.appletprint.finish", "Impression termin\u00E9e."},
{"appletviewer.appletprint.cancel", "Impression annul\u00E9e."},
{"appletviewer.appletencoding", "Encodage de caract\u00E8res : {0}"},
{"appletviewer.parse.warning.requiresname", "Avertissement : la balise <param name=... value=...> requiert un attribut de nom."},
{"appletviewer.parse.warning.paramoutside", "Avertissement : la balise <param> est en dehors des balises <applet> ... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Avertissement : la balise <applet> requiert un attribut de code."},
{"appletviewer.parse.warning.applet.requiresheight", "Avertissement : la balise <applet> requiert un attribut de hauteur."},
{"appletviewer.parse.warning.applet.requireswidth", "Avertissement : la balise <applet> requiert un attribut de largeur."},
{"appletviewer.parse.warning.object.requirescode", "Avertissement : la balise <object> requiert un attribut de code."},
{"appletviewer.parse.warning.object.requiresheight", "Avertissement : la balise <object> requiert un attribut de hauteur."},
{"appletviewer.parse.warning.object.requireswidth", "Avertissement : la balise <object> requiert un attribut de largeur."},
{"appletviewer.parse.warning.embed.requirescode", "Avertissement : la balise <embed> requiert un attribut de code."},
{"appletviewer.parse.warning.embed.requiresheight", "Avertissement : la balise <embed> requiert un attribut de hauteur."},
{"appletviewer.parse.warning.embed.requireswidth", "Avertissement : la balise <embed> requiert un attribut de largeur."},
{"appletviewer.parse.warning.appnotLongersupported", "Avertissement : la balise <app> n'est plus prise en charge, utilisez <applet> \u00E0 la place :"},
{"appletviewer.usage", "Syntaxe : appletviewer <options> url(s)\n\no\u00F9 <options> inclut :\n -debug D\u00E9marrer le visualiseur d'applets dans le d\u00E9bogueur Java\n -encoding <encoding> Indiquer l'encodage de caract\u00E8res utilis\u00E9 par les fichiers HTML\n -J<runtime flag> Transmettre l'argument \u00E0 l'interpr\u00E9teur Java\n\nL'option -J n'est pas standard et elle peut \u00EAtre modifi\u00E9e sans pr\u00E9avis."},
{"appletviewer.main.err.unsupportedopt", "Option non prise en charge : {0}"},
{"appletviewer.main.err.unrecognizedarg", "Argument non reconnu : {0}"},
{"appletviewer.main.err.dupoption", "Utilisation en double de l''option : {0}"},
{"appletviewer.main.err.inputfile", "Aucun fichier d'entr\u00E9e indiqu\u00E9."},
{"appletviewer.main.err.badurl", "URL incorrecte : {0} ({1})"},
{"appletviewer.main.err.io", "Exception d''E/S lors de la lecture : {0}"},
{"appletviewer.main.err.readablefile", "Assurez-vous que {0} est un fichier accessible en lecture."},
{"appletviewer.main.err.correcturl", "L''\u00E9l\u00E9ment {0} est-il l''URL correcte ?"},
{"appletviewer.main.prop.store", "Propri\u00E9t\u00E9s utilisateur pour AppletViewer"},
{"appletviewer.main.err.prop.cantread", "Impossible de lire le fichier de propri\u00E9t\u00E9s utilisateur : {0}"},
{"appletviewer.main.err.prop.cantsave", "Impossible d''enregistrer le fichier de propri\u00E9t\u00E9s utilisateur : {0}"},
{"appletviewer.main.warn.nosecmgr", "Avertissement : d\u00E9sactivation de la s\u00E9curit\u00E9."},
{"appletviewer.main.debug.cantfinddebug", "D\u00E9bogueur introuvable."},
{"appletviewer.main.debug.cantfindmain", "La m\u00E9thode principale est introuvable dans le d\u00E9bogueur."},
{"appletviewer.main.debug.exceptionindebug", "Exception d\u00E9tect\u00E9e dans le d\u00E9bogueur."},
{"appletviewer.main.debug.cantaccess", "Impossible d'acc\u00E9der au d\u00E9bogueur."},
{"appletviewer.main.nosecmgr", "Avertissement : SecurityManager n'est pas install\u00E9."},
{"appletviewer.main.warning", "Avertissement : aucune applet n'a \u00E9t\u00E9 d\u00E9marr\u00E9e. Assurez-vous que l'entr\u00E9e contient une balise <applet>."},
{"appletviewer.main.warn.prop.overwrite", "Avertissement : remplacement temporaire de la propri\u00E9t\u00E9 syst\u00E8me \u00E0 la demande de l''utilisateur - Cl\u00E9 : {0}, ancienne valeur : {1}, nouvelle valeur : {2}"},
{"appletviewer.main.warn.cantreadprops", "Avertissement : impossible de lire le fichier de propri\u00E9t\u00E9s d''AppletViewer : {0} Utilisation des valeurs par d\u00E9faut."},
{"appletioexception.loadclass.throw.interrupted", "chargement de classe interrompu : {0}"},
{"appletioexception.loadclass.throw.notloaded", "classe non charg\u00E9e : {0}"},
{"appletclassloader.loadcode.verbose", "Ouverture du flux de donn\u00E9es dans {0} pour obtenir {1}"},
{"appletclassloader.filenotfound", "Fichier introuvable lors de la recherche de {0}"},
{"appletclassloader.fileformat", "Exception de format de fichier d\u00E9tect\u00E9e lors du chargement de : {0}"},
{"appletclassloader.fileioexception", "Exception d''E/S lors du chargement de : {0}"},
{"appletclassloader.fileexception", "Exception {0} lors du chargement de : {1}"},
{"appletclassloader.filedeath", "Fermeture de {0} lors du chargement de : {1}"},
{"appletclassloader.fileerror", "Erreur {0} lors du chargement de : {1}"},
{"appletclassloader.findclass.verbose.openstream", "Ouverture du flux de donn\u00E9es dans {0} pour obtenir {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource pour le nom : {0}"},
{"appletclassloader.getresource.verbose.found", "Ressource {0} trouv\u00E9e en tant que ressource syst\u00E8me"},
{"appletclassloader.getresourceasstream.verbose", "Ressource {0} trouv\u00E9e en tant que ressource syst\u00E8me"},
{"appletpanel.runloader.err", "Param\u00E8tre d'objet ou de code."},
{"appletpanel.runloader.exception", "exception lors de la d\u00E9s\u00E9rialisation de {0}"},
{"appletpanel.destroyed", "Applet d\u00E9truite."},
{"appletpanel.loaded", "Applet charg\u00E9e."},
{"appletpanel.started", "Applet d\u00E9marr\u00E9e."},
{"appletpanel.inited", "Applet initialis\u00E9e."},
{"appletpanel.stopped", "Applet arr\u00EAt\u00E9e."},
{"appletpanel.disposed", "Applet \u00E9limin\u00E9e."},
{"appletpanel.nocode", "Param\u00E8tre CODE manquant dans la balise APPLET."},
{"appletpanel.notfound", "Charger : la classe {0} est introuvable."},
{"appletpanel.nocreate", "Charger : impossible d''instantier {0}."},
{"appletpanel.noconstruct", "Charger : l''\u00E9l\u00E9ment {0} n''est pas public ou ne poss\u00E8de aucun constructeur public."},
{"appletpanel.death", "arr\u00EAt\u00E9"},
{"appletpanel.exception", "exception : {0}."},
{"appletpanel.exception2", "exception : {0} : {1}."},
{"appletpanel.error", "erreur : {0}."},
{"appletpanel.error2", "erreur : {0} : {1}."},
{"appletpanel.notloaded", "Initialiser : applet non charg\u00E9e."},
{"appletpanel.notinited", "D\u00E9marrer : applet non initialis\u00E9e."},
{"appletpanel.notstarted", "Arr\u00EAter : applet non d\u00E9marr\u00E9e."},
{"appletpanel.notstopped", "D\u00E9truire : applet non arr\u00EAt\u00E9e."},
{"appletpanel.notdestroyed", "Eliminer : applet non d\u00E9truite."},
{"appletpanel.notdisposed", "Charger : applet non \u00E9limin\u00E9e."},
{"appletpanel.bail", "Interrompu : r\u00E9solution."},
{"appletpanel.filenotfound", "Fichier introuvable lors de la recherche de {0}"},
{"appletpanel.fileformat", "Exception de format de fichier d\u00E9tect\u00E9e lors du chargement de : {0}"},
{"appletpanel.fileioexception", "Exception d''E/S lors du chargement de : {0}"},
{"appletpanel.fileexception", "Exception {0} lors du chargement de : {1}"},
{"appletpanel.filedeath", "Fermeture de {0} lors du chargement de : {1}"},
{"appletpanel.fileerror", "Erreur {0} lors du chargement de : {1}"},
{"appletpanel.badattribute.exception", "Analyse HTML : valeur incorrecte pour l'attribut de largeur/hauteur"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requiert un chargeur non NULL"},
{"appletprops.title", "Propri\u00E9t\u00E9s d'AppletViewer"},
{"appletprops.label.http.server", "Serveur proxy HTTP :"},
{"appletprops.label.http.proxy", "Port proxy HTTP :"},
{"appletprops.label.network", "Acc\u00E8s au r\u00E9seau :"},
{"appletprops.choice.network.item.none", "Aucun"},
{"appletprops.choice.network.item.applethost", "H\u00F4te de l'applet"},
{"appletprops.choice.network.item.unrestricted", "Sans restriction"},
{"appletprops.label.class", "Acc\u00E8s \u00E0 la classe :"},
{"appletprops.choice.class.item.restricted", "Avec restriction"},
{"appletprops.choice.class.item.unrestricted", "Sans restriction"},
{"appletprops.label.unsignedapplet", "Autoriser les applets non sign\u00E9es :"},
{"appletprops.choice.unsignedapplet.no", "Non"},
{"appletprops.choice.unsignedapplet.yes", "Oui"},
{"appletprops.button.apply", "Appliquer"},
{"appletprops.button.cancel", "Annuler"},
{"appletprops.button.reset", "R\u00E9initialiser"},
{"appletprops.apply.exception", "Echec de l''enregistrement des propri\u00E9t\u00E9s : {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Entr\u00E9e non valide"},
{"appletprops.label.invalidproxy", "Le port proxy doit \u00EAtre un entier positif."},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "Propri\u00E9t\u00E9s utilisateur pour AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "Exception de s\u00E9curit\u00E9 : chargeur de classe"},
{"appletsecurityexception.checkaccess.thread", "Exception de s\u00E9curit\u00E9 : thread"},
{"appletsecurityexception.checkaccess.threadgroup", "Exception de s\u00E9curit\u00E9 : groupe de threads : {0}"},
{"appletsecurityexception.checkexit", "Exception de s\u00E9curit\u00E9 : sortie : {0}"},
{"appletsecurityexception.checkexec", "Exception de s\u00E9curit\u00E9 : ex\u00E9cution : {0}"},
{"appletsecurityexception.checklink", "Exception de s\u00E9curit\u00E9 : lien : {0}"},
{"appletsecurityexception.checkpropsaccess", "Exception de s\u00E9curit\u00E9 : propri\u00E9t\u00E9s"},
{"appletsecurityexception.checkpropsaccess.key", "Exception de s\u00E9curit\u00E9 : acc\u00E8s aux propri\u00E9t\u00E9s {0}"},
{"appletsecurityexception.checkread.exception1", "Exception de s\u00E9curit\u00E9 : {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "Exception de s\u00E9curit\u00E9 : file.read : {0}"},
{"appletsecurityexception.checkread", "Exception de s\u00E9curit\u00E9 : file.read : {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "Exception de s\u00E9curit\u00E9 : {0}, {1}"},
{"appletsecurityexception.checkwrite", "Exception de s\u00E9curit\u00E9 : file.write : {0} == {1}"},
{"appletsecurityexception.checkread.fd", "Exception de s\u00E9curit\u00E9 : fd.read"},
{"appletsecurityexception.checkwrite.fd", "Exception de s\u00E9curit\u00E9 : fd.write"},
{"appletsecurityexception.checklisten", "Exception de s\u00E9curit\u00E9 : socket.listen : {0}"},
{"appletsecurityexception.checkaccept", "Exception de s\u00E9curit\u00E9 : socket.accept : {0} : {1}"},
{"appletsecurityexception.checkconnect.networknone", "Exception de s\u00E9curit\u00E9 : socket.connect : {0} -> {1}"},
{"appletsecurityexception.checkconnect.networkhost1", "Exception de s\u00E9curit\u00E9 : impossible de se connecter \u00E0 {0} dont l''origine est {1}."},
{"appletsecurityexception.checkconnect.networkhost2", "Exception de s\u00E9curit\u00E9 : impossible de r\u00E9soudre l''adresse IP pour l''h\u00F4te {0} ou pour {1}. "},
{"appletsecurityexception.checkconnect.networkhost3", "Exception de s\u00E9curit\u00E9 : impossible de r\u00E9soudre l''adresse IP pour l''h\u00F4te {0}. Voir la propri\u00E9t\u00E9 trustProxy."},
{"appletsecurityexception.checkconnect", "Exception de s\u00E9curit\u00E9 : connexion : {0} -> {1}"},
{"appletsecurityexception.checkpackageaccess", "Exception de s\u00E9curit\u00E9 : impossible d''acc\u00E9der au package : {0}"},
{"appletsecurityexception.checkpackagedefinition", "Exception de s\u00E9curit\u00E9 : impossible de d\u00E9finir le package : {0}"},
{"appletsecurityexception.cannotsetfactory", "Exception de s\u00E9curit\u00E9 : impossible de d\u00E9finir la fabrique"},
{"appletsecurityexception.checkmemberaccess", "Exception de s\u00E9curit\u00E9 : v\u00E9rifier l'acc\u00E8s des membres"},
{"appletsecurityexception.checkgetprintjob", "Exception de s\u00E9curit\u00E9 : getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "Exception de s\u00E9curit\u00E9 : getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "Exception de s\u00E9curit\u00E9 : getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Exception de s\u00E9curit\u00E9 : op\u00E9ration de s\u00E9curit\u00E9 : {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "type de chargeur de classe inconnu, impossible de rechercher getContext"},
{"appletsecurityexception.checkread.unknown", "type de chargeur de classe inconnu, impossible de rechercher la v\u00E9rification de lecture {0}"},
{"appletsecurityexception.checkconnect.unknown", "type de chargeur de classe inconnu, impossible de rechercher la v\u00E9rification de connexion"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_it extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "Chiudi"},
{"appletviewer.tool.title", "Visualizzatore applet: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Riavvia"},
{"appletviewer.menuitem.reload", "Ricarica"},
{"appletviewer.menuitem.stop", "Arresta"},
{"appletviewer.menuitem.save", "Salva..."},
{"appletviewer.menuitem.start", "Avvia"},
{"appletviewer.menuitem.clone", "Copia..."},
{"appletviewer.menuitem.tag", "Tag..."},
{"appletviewer.menuitem.info", "Informazioni..."},
{"appletviewer.menuitem.edit", "Modifica"},
{"appletviewer.menuitem.encoding", "Codifica caratteri"},
{"appletviewer.menuitem.print", "Stampa..."},
{"appletviewer.menuitem.props", "Propriet\u00E0..."},
{"appletviewer.menuitem.close", "Chiudi"},
{"appletviewer.menuitem.quit", "Esci"},
{"appletviewer.label.hello", "Benvenuti..."},
{"appletviewer.status.start", "avvio applet in corso..."},
{"appletviewer.appletsave.filedialogtitle","Serializza applet in file"},
{"appletviewer.appletsave.err1", "serializzazione di {0} in {1}"},
{"appletviewer.appletsave.err2", "in appletSave: {0}"},
{"appletviewer.applettag", "Tag visualizzata"},
{"appletviewer.applettag.textframe", "Applet tag HTML"},
{"appletviewer.appletinfo.applet", "-- nessuna informazione sull'applet --"},
{"appletviewer.appletinfo.param", "-- nessuna informazione sul parametro --"},
{"appletviewer.appletinfo.textframe", "Informazioni applet"},
{"appletviewer.appletprint.fail", "Stampa non riuscita."},
{"appletviewer.appletprint.finish", "Stampa completata."},
{"appletviewer.appletprint.cancel", "Stampa annullata."},
{"appletviewer.appletencoding", "Codifica caratteri: {0}"},
{"appletviewer.parse.warning.requiresname", "Avvertenza: la tag <param name=... value=...> richiede un attributo name."},
{"appletviewer.parse.warning.paramoutside", "Avvertenza: la tag <param> non rientra in <applet>... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Avvertenza: la tag <applet> richiede un attributo code."},
{"appletviewer.parse.warning.applet.requiresheight", "Avvertenza: la tag <applet> richiede un attributo height."},
{"appletviewer.parse.warning.applet.requireswidth", "Avvertenza: la tag <applet> richiede un attributo width."},
{"appletviewer.parse.warning.object.requirescode", "Avvertenza: la tag <object> richiede un attributo code."},
{"appletviewer.parse.warning.object.requiresheight", "Avvertenza: la tag <object> richiede un attributo height."},
{"appletviewer.parse.warning.object.requireswidth", "Avvertenza: la tag <object> richiede un attributo width."},
{"appletviewer.parse.warning.embed.requirescode", "Avvertenza: la tag <embed> richiede un attributo code."},
{"appletviewer.parse.warning.embed.requiresheight", "Avvertenza: la tag <embed> richiede un attributo height."},
{"appletviewer.parse.warning.embed.requireswidth", "Avvertenza: la tag <embed> richiede un attributo width."},
{"appletviewer.parse.warning.appnotLongersupported", "Avvertenza: la tag <app> non \u00E8 pi\u00F9 supportata. Utilizzare <applet>:"},
{"appletviewer.usage", "Uso: appletviewer <opzioni> url(s)\n\ndove <opzioni> includono:\n -debug Avvia il visualizzatore applet nel debugger Java\n -encoding <codifica> Specifica la codifica dei caratteri utilizzata dai file HTML\n -J<flag runtime> Passa l'argomento all'interpreter Java\n\nL'opzione -J non \u00E8 standard ed \u00E8 soggetta a modifica senza preavviso."},
{"appletviewer.main.err.unsupportedopt", "Opzione non supportata: {0}"},
{"appletviewer.main.err.unrecognizedarg", "Argomento non riconosciuto: {0}"},
{"appletviewer.main.err.dupoption", "Uso duplicato dell''opzione: {0}"},
{"appletviewer.main.err.inputfile", "Nessun file di input specificato."},
{"appletviewer.main.err.badurl", "URL non valido: {0} ( {1} )"},
{"appletviewer.main.err.io", "Eccezione I/O durante la lettura di {0}"},
{"appletviewer.main.err.readablefile", "Assicurarsi che {0} sia un file e che sia leggibile."},
{"appletviewer.main.err.correcturl", "{0} \u00E8 l''URL corretto?"},
{"appletviewer.main.prop.store", "Propriet\u00E0 specifiche dell'utente per AppletViewer"},
{"appletviewer.main.err.prop.cantread", "Impossibile leggere il file delle propriet\u00E0 utente: {0}"},
{"appletviewer.main.err.prop.cantsave", "Impossibile salvare il file delle propriet\u00E0 utente: {0}"},
{"appletviewer.main.warn.nosecmgr", "Avvertenza: la sicurezza verr\u00E0 disabilitata."},
{"appletviewer.main.debug.cantfinddebug", "Impossibile trovare il debugger."},
{"appletviewer.main.debug.cantfindmain", "Impossibile trovare il metodo principale nel debugger."},
{"appletviewer.main.debug.exceptionindebug", "Eccezione nel debugger."},
{"appletviewer.main.debug.cantaccess", "Impossibile accedere al debugger."},
{"appletviewer.main.nosecmgr", "Avvertenza: SecurityManager non installato."},
{"appletviewer.main.warning", "Avvertenza: nessuna applet avviata. Assicurarsi che l'input contenga una tag <applet>."},
{"appletviewer.main.warn.prop.overwrite", "Avvertenza: la propriet\u00E0 di sistema verr\u00E0 sovrascritta temporaneamente su richiesta dell''utente. Chiave {0}, valore precedente {1}, nuovo valore {2}."},
{"appletviewer.main.warn.cantreadprops", "Avvertenza: impossibile leggere il file delle propriet\u00E0 AppletViewer {0}. Verranno utilizzate le impostazioni predefinite."},
{"appletioexception.loadclass.throw.interrupted", "caricamento della classe interrotto: {0}"},
{"appletioexception.loadclass.throw.notloaded", "classe non caricata: {0}"},
{"appletclassloader.loadcode.verbose", "Apertura del flusso per {0} per recuperare {1}"},
{"appletclassloader.filenotfound", "File non trovato durante la ricerca di {0}"},
{"appletclassloader.fileformat", "Eccezione di formato file durante il caricamento di {0}"},
{"appletclassloader.fileioexception", "Eccezione I/O durante il caricamento di {0}"},
{"appletclassloader.fileexception", "Eccezione {0} durante il caricamento di {1}"},
{"appletclassloader.filedeath", "{0} terminato durante il caricamento di {1}"},
{"appletclassloader.fileerror", "Errore {0} durante il caricamento di {1}"},
{"appletclassloader.findclass.verbose.openstream", "Apertura del flusso per {0} per recuperare {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource per il nome: {0}"},
{"appletclassloader.getresource.verbose.found", "\u00C8 stata trovata la risorsa {0} come risorsa di sistema"},
{"appletclassloader.getresourceasstream.verbose", "\u00C8 stata trovata la risorsa {0} come risorsa di sistema"},
{"appletpanel.runloader.err", "Parametro di oggetto o di codice."},
{"appletpanel.runloader.exception", "eccezione durante la deserializzazione di {0}"},
{"appletpanel.destroyed", "Applet rimossa."},
{"appletpanel.loaded", "Applet caricata."},
{"appletpanel.started", "Applet avviata."},
{"appletpanel.inited", "Applet inizializzata."},
{"appletpanel.stopped", "Applet arrestata."},
{"appletpanel.disposed", "Applet eliminata."},
{"appletpanel.nocode", "Nella tag APPLET manca il parametro CODE."},
{"appletpanel.notfound", "caricamento: classe {0} non trovata."},
{"appletpanel.nocreate", "caricamento: impossibile creare un''istanza di {0}."},
{"appletpanel.noconstruct", "caricamento: {0} non \u00E8 pubblico o non ha un costruttore pubblico."},
{"appletpanel.death", "terminato"},
{"appletpanel.exception", "eccezione: {0}"},
{"appletpanel.exception2", "eccezione: {0}: {1}."},
{"appletpanel.error", "errore: {0}."},
{"appletpanel.error2", "errore: {0}: {1}."},
{"appletpanel.notloaded", "Inizializzazione: applet non caricata."},
{"appletpanel.notinited", "Avvio: applet non inizializzata."},
{"appletpanel.notstarted", "Arresto: applet non avviata."},
{"appletpanel.notstopped", "Rimozione: applet non arrestata."},
{"appletpanel.notdestroyed", "Eliminazione: applet non rimossa."},
{"appletpanel.notdisposed", "Caricamento: applet non eliminata."},
{"appletpanel.bail", "Interrotto: chiusura."},
{"appletpanel.filenotfound", "File non trovato durante la ricerca di {0}"},
{"appletpanel.fileformat", "Eccezione di formato file durante il caricamento di {0}"},
{"appletpanel.fileioexception", "Eccezione I/O durante il caricamento di {0}"},
{"appletpanel.fileexception", "Eccezione {0} durante il caricamento di {1}"},
{"appletpanel.filedeath", "{0} terminato durante il caricamento di {1}"},
{"appletpanel.fileerror", "Errore {0} durante il caricamento di {1}"},
{"appletpanel.badattribute.exception", "Analisi HTML: valore errato per l'attributo width/height"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream richiede un loader non nullo"},
{"appletprops.title", "Propriet\u00E0 AppletViewer"},
{"appletprops.label.http.server", "Server proxy http:"},
{"appletprops.label.http.proxy", "Porta proxy http:"},
{"appletprops.label.network", "Accesso alla rete:"},
{"appletprops.choice.network.item.none", "Nessuno"},
{"appletprops.choice.network.item.applethost", "Host applet"},
{"appletprops.choice.network.item.unrestricted", "Non limitato"},
{"appletprops.label.class", "Accesso alla classe:"},
{"appletprops.choice.class.item.restricted", "Limitato"},
{"appletprops.choice.class.item.unrestricted", "Non limitato"},
{"appletprops.label.unsignedapplet", "Consenti applet senza firma:"},
{"appletprops.choice.unsignedapplet.no", "No"},
{"appletprops.choice.unsignedapplet.yes", "S\u00EC"},
{"appletprops.button.apply", "Applica"},
{"appletprops.button.cancel", "Annulla"},
{"appletprops.button.reset", "Reimposta"},
{"appletprops.apply.exception", "Salvataggio delle propriet\u00E0 non riuscito: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Voce non valida"},
{"appletprops.label.invalidproxy", "La porta del proxy deve essere un valore intero positivo."},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "Propriet\u00E0 specifiche dell'utente per AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "Eccezione di sicurezza: classloader"},
{"appletsecurityexception.checkaccess.thread", "Eccezione di sicurezza: thread"},
{"appletsecurityexception.checkaccess.threadgroup", "Eccezione di sicurezza: threadgroup: {0}"},
{"appletsecurityexception.checkexit", "Eccezione di sicurezza: exit: {0}"},
{"appletsecurityexception.checkexec", "Eccezione di sicurezza: exec: {0}"},
{"appletsecurityexception.checklink", "Eccezione di sicurezza: link: {0}"},
{"appletsecurityexception.checkpropsaccess", "Eccezione di sicurezza: properties"},
{"appletsecurityexception.checkpropsaccess.key", "Eccezione di sicurezza: properties access {0}"},
{"appletsecurityexception.checkread.exception1", "Eccezione di sicurezza: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "Eccezione di sicurezza: file.read: {0}"},
{"appletsecurityexception.checkread", "Eccezione di sicurezza: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "Eccezione di sicurezza: {0}, {1}"},
{"appletsecurityexception.checkwrite", "Eccezione di sicurezza: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "Eccezione di sicurezza: fd.read"},
{"appletsecurityexception.checkwrite.fd", "Eccezione di sicurezza: fd.write"},
{"appletsecurityexception.checklisten", "Eccezione di sicurezza: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "Eccezione di sicurezza: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "Eccezione di sicurezza: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "Eccezione di sicurezza: impossibile connettersi a {0} con origine da {1}."},
{"appletsecurityexception.checkconnect.networkhost2", "Eccezione di sicurezza: impossibile risolvere l''IP per l''host {0} o per {1}. "},
{"appletsecurityexception.checkconnect.networkhost3", "Eccezione di sicurezza: impossibile non risolvere l''IP per l''host {0}. Vedere la propriet\u00E0 trustProxy."},
{"appletsecurityexception.checkconnect", "Eccezione di sicurezza: connect: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "Eccezione di sicurezza: impossibile accedere al package {0}"},
{"appletsecurityexception.checkpackagedefinition", "Eccezione di sicurezza: impossibile definire il package {0}"},
{"appletsecurityexception.cannotsetfactory", "Eccezione di sicurezza: impossibile impostare il factory"},
{"appletsecurityexception.checkmemberaccess", "Eccezione di sicurezza: controllare l'accesso dei membri"},
{"appletsecurityexception.checkgetprintjob", "Eccezione di sicurezza: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "Eccezione di sicurezza: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "Eccezione di sicurezza: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Eccezione di sicurezza: operazione di sicurezza {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "tipo di loader della classe sconosciuto. Impossibile verificare la presenza di getContext."},
{"appletsecurityexception.checkread.unknown", "tipo di loader della classe sconosciuto. Impossibile verificare la presenza della lettura di controllo {0}."},
{"appletsecurityexception.checkconnect.unknown", "tipo di loader della classe sconosciuto. Impossibile verificare la presenza della connessione di controllo."},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_ja extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "\u53D6\u6D88"},
{"appletviewer.tool.title", "\u30A2\u30D7\u30EC\u30C3\u30C8\u30FB\u30D3\u30E5\u30FC\u30A2: {0}"},
{"appletviewer.menu.applet", "\u30A2\u30D7\u30EC\u30C3\u30C8"},
{"appletviewer.menuitem.restart", "\u518D\u8D77\u52D5"},
{"appletviewer.menuitem.reload", "\u518D\u30ED\u30FC\u30C9"},
{"appletviewer.menuitem.stop", "\u505C\u6B62"},
{"appletviewer.menuitem.save", "\u4FDD\u5B58..."},
{"appletviewer.menuitem.start", "\u958B\u59CB"},
{"appletviewer.menuitem.clone", "\u30AF\u30ED\u30FC\u30F3..."},
{"appletviewer.menuitem.tag", "\u30BF\u30B0..."},
{"appletviewer.menuitem.info", "\u60C5\u5831..."},
{"appletviewer.menuitem.edit", "\u7DE8\u96C6"},
{"appletviewer.menuitem.encoding", "\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"},
{"appletviewer.menuitem.print", "\u5370\u5237..."},
{"appletviewer.menuitem.props", "\u30D7\u30ED\u30D1\u30C6\u30A3..."},
{"appletviewer.menuitem.close", "\u9589\u3058\u308B"},
{"appletviewer.menuitem.quit", "\u7D42\u4E86"},
{"appletviewer.label.hello", "Hello..."},
{"appletviewer.status.start", "\u30A2\u30D7\u30EC\u30C3\u30C8\u3092\u958B\u59CB\u3057\u3066\u3044\u307E\u3059..."},
{"appletviewer.appletsave.filedialogtitle","\u30A2\u30D7\u30EC\u30C3\u30C8\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA"},
{"appletviewer.appletsave.err1", "{0}\u3092{1}\u306B\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA"},
{"appletviewer.appletsave.err2", "appletSave\u5185: {0}"},
{"appletviewer.applettag", "\u30BF\u30B0\u306E\u8868\u793A"},
{"appletviewer.applettag.textframe", "\u30A2\u30D7\u30EC\u30C3\u30C8HTML\u30BF\u30B0"},
{"appletviewer.appletinfo.applet", "-- \u30A2\u30D7\u30EC\u30C3\u30C8\u60C5\u5831\u306A\u3057 --"},
{"appletviewer.appletinfo.param", "-- \u30D1\u30E9\u30E1\u30FC\u30BF\u60C5\u5831\u306A\u3057 --"},
{"appletviewer.appletinfo.textframe", "\u30A2\u30D7\u30EC\u30C3\u30C8\u60C5\u5831"},
{"appletviewer.appletprint.fail", "\u5370\u5237\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},
{"appletviewer.appletprint.finish", "\u5370\u5237\u3092\u7D42\u4E86\u3057\u307E\u3057\u305F\u3002"},
{"appletviewer.appletprint.cancel", "\u5370\u5237\u304C\u53D6\u308A\u6D88\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletviewer.appletencoding", "\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0: {0}"},
{"appletviewer.parse.warning.requiresname", "\u8B66\u544A: <param name=... value=...>\u30BF\u30B0\u306Bname\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.paramoutside", "\u8B66\u544A: <param>\u30BF\u30B0\u304C<applet> ... </applet>\u306E\u5916\u5074\u3067\u3059\u3002"},
{"appletviewer.parse.warning.applet.requirescode", "\u8B66\u544A: <applet>\u30BF\u30B0\u306Bcode\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.applet.requiresheight", "\u8B66\u544A: <applet>\u30BF\u30B0\u306Bheight\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.applet.requireswidth", "\u8B66\u544A: <applet>\u30BF\u30B0\u306Bwidth\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.object.requirescode", "\u8B66\u544A: <object>\u30BF\u30B0\u306Bcode\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.object.requiresheight", "\u8B66\u544A: <object>\u30BF\u30B0\u306Bheight\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.object.requireswidth", "\u8B66\u544A: <object>\u30BF\u30B0\u306Bwidth\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.embed.requirescode", "\u8B66\u544A: <embed>\u30BF\u30B0\u306Bcode\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed>\u30BF\u30B0\u306Bheight\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed>\u30BF\u30B0\u306Bwidth\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: <app>\u30BF\u30B0\u306F\u73FE\u5728\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u304B\u308F\u308A\u306B<applet>\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
{"appletviewer.usage", "\u4F7F\u7528\u65B9\u6CD5: appletviewer <options> url(s)\n\n<options>\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:\n -debug Java\u30C7\u30D0\u30C3\u30AC\u3067\u30A2\u30D7\u30EC\u30C3\u30C8\u30FB\u30D3\u30E5\u30FC\u30A2\u3092\u958B\u59CB\u3059\u308B\n -encoding <encoding> HTML\u30D5\u30A1\u30A4\u30EB\u306B\u3088\u3063\u3066\u4F7F\u7528\u3055\u308C\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B\n -J<runtime flag> \u5F15\u6570\u3092Java\u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u306B\u6E21\u3059\n\n-J\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u3001\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
{"appletviewer.main.err.unsupportedopt", "\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3: {0}"},
{"appletviewer.main.err.unrecognizedarg", "\u8A8D\u8B58\u3055\u308C\u306A\u3044\u5F15\u6570: {0}"},
{"appletviewer.main.err.dupoption", "\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4F7F\u7528\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059: {0}"},
{"appletviewer.main.err.inputfile", "\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletviewer.main.err.badurl", "\u4E0D\u6B63\u306AURL: {0} ( {1} )"},
{"appletviewer.main.err.io", "\u8AAD\u8FBC\u307F\u4E2D\u306E\u5165\u51FA\u529B\u4F8B\u5916\u3067\u3059: {0}"},
{"appletviewer.main.err.readablefile", "{0}\u304C\u30D5\u30A1\u30A4\u30EB\u3067\u3042\u308A\u3001\u8AAD\u8FBC\u307F\u53EF\u80FD\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
{"appletviewer.main.err.correcturl", "{0}\u306F\u6B63\u3057\u3044URL\u3067\u3059\u304B\u3002"},
{"appletviewer.main.prop.store", "AppletViewer\u7528\u306E\u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D7\u30ED\u30D1\u30C6\u30A3"},
{"appletviewer.main.err.prop.cantread", "\u30E6\u30FC\u30B6\u30FC\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093: {0}"},
{"appletviewer.main.err.prop.cantsave", "\u30E6\u30FC\u30B6\u30FC\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093: {0}"},
{"appletviewer.main.warn.nosecmgr", "\u8B66\u544A: \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u3092\u7121\u52B9\u5316\u3057\u307E\u3059\u3002"},
{"appletviewer.main.debug.cantfinddebug", "\u30C7\u30D0\u30C3\u30AC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"},
{"appletviewer.main.debug.cantfindmain", "\u30C7\u30D0\u30C3\u30AC\u306E\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"},
{"appletviewer.main.debug.exceptionindebug", "\u30C7\u30D0\u30C3\u30AC\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002"},
{"appletviewer.main.debug.cantaccess", "\u30C7\u30D0\u30C3\u30AC\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\u3002"},
{"appletviewer.main.nosecmgr", "\u8B66\u544A: SecurityManager\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletviewer.main.warning", "\u8B66\u544A: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u958B\u59CB\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u5165\u529B\u306B<applet>\u30BF\u30B0\u304C\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
{"appletviewer.main.warn.prop.overwrite", "\u8B66\u544A: \u30E6\u30FC\u30B6\u30FC\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u4E00\u6642\u7684\u306B\u4E0A\u66F8\u304D\u3057\u307E\u3059: \u30AD\u30FC: {0} \u53E4\u3044\u5024: {1} \u65B0\u3057\u3044\u5024: {2}"},
{"appletviewer.main.warn.cantreadprops", "\u8B66\u544A: AppletViewer\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002"},
{"appletioexception.loadclass.throw.interrupted", "\u30AF\u30E9\u30B9\u306E\u30ED\u30FC\u30C9\u304C\u4E2D\u65AD\u3057\u307E\u3057\u305F: {0}"},
{"appletioexception.loadclass.throw.notloaded", "\u30AF\u30E9\u30B9\u304C\u30ED\u30FC\u30C9\u3055\u308C\u307E\u305B\u3093: {0}"},
{"appletclassloader.loadcode.verbose", "{1}\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306E{0}\u3078\u306E\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u958B\u304D\u307E\u3059"},
{"appletclassloader.filenotfound", "{0}\u306E\u691C\u7D22\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
{"appletclassloader.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletclassloader.fileioexception", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletclassloader.fileexception", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletclassloader.filedeath", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u304C\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3057\u305F"},
{"appletclassloader.fileerror", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletclassloader.findclass.verbose.openstream", "{1}\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306E{0}\u3078\u306E\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u958B\u304D\u307E\u3059"},
{"appletclassloader.getresource.verbose.forname", "\u540D\u524D{0}\u306EAppletClassLoader.getResource\u3067\u3059"},
{"appletclassloader.getresource.verbose.found", "\u30EA\u30BD\u30FC\u30B9{0}\u304C\u30B7\u30B9\u30C6\u30E0\u30FB\u30EA\u30BD\u30FC\u30B9\u3068\u3057\u3066\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"},
{"appletclassloader.getresourceasstream.verbose", "\u30EA\u30BD\u30FC\u30B9{0}\u304C\u30B7\u30B9\u30C6\u30E0\u30FB\u30EA\u30BD\u30FC\u30B9\u3068\u3057\u3066\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"},
{"appletpanel.runloader.err", "\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u307E\u305F\u306F\u30B3\u30FC\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002"},
{"appletpanel.runloader.exception", "{0}\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletpanel.destroyed", "\u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u7834\u68C4\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletpanel.loaded", "\u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletpanel.started", "\u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u958B\u59CB\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletpanel.inited", "\u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u521D\u671F\u5316\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletpanel.stopped", "\u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u505C\u6B62\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletpanel.disposed", "\u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u7834\u68C4\u3055\u308C\u307E\u3057\u305F\u3002"},
{"appletpanel.nocode", "APPLET\u30BF\u30B0\u306BCODE\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002"},
{"appletpanel.notfound", "\u30ED\u30FC\u30C9: \u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"},
{"appletpanel.nocreate", "\u30ED\u30FC\u30C9: {0}\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093\u3002"},
{"appletpanel.noconstruct", "\u30ED\u30FC\u30C9: {0}\u306Fpublic\u3067\u306A\u3044\u304B\u3001public\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u6301\u3063\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.death", "\u5F37\u5236\u7D42\u4E86\u3055\u308C\u307E\u3057\u305F"},
{"appletpanel.exception", "\u4F8B\u5916: {0}\u3002"},
{"appletpanel.exception2", "\u4F8B\u5916: {0}: {1}\u3002"},
{"appletpanel.error", "\u30A8\u30E9\u30FC: {0}\u3002"},
{"appletpanel.error2", "\u30A8\u30E9\u30FC: {0}: {1}\u3002"},
{"appletpanel.notloaded", "\u521D\u671F\u5316: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u30ED\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.notinited", "\u958B\u59CB: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u521D\u671F\u5316\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.notstarted", "\u505C\u6B62: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u958B\u59CB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.notstopped", "\u7834\u68C4: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u505C\u6B62\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.notdestroyed", "\u7834\u68C4: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u7834\u68C4\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.notdisposed", "\u30ED\u30FC\u30C9: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u7834\u68C4\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{"appletpanel.bail", "\u4E2D\u65AD\u6E08: \u7D42\u4E86\u3057\u3066\u3044\u307E\u3059\u3002"},
{"appletpanel.filenotfound", "{0}\u306E\u691C\u7D22\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
{"appletpanel.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletpanel.fileioexception", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletpanel.fileexception", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletpanel.filedeath", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u304C\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3057\u305F"},
{"appletpanel.fileerror", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
{"appletpanel.badattribute.exception", "HTML\u89E3\u6790: width\u307E\u305F\u306Fheight\u5C5E\u6027\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream\u306F\u975Enull\u306E\u30ED\u30FC\u30C0\u30FC\u304C\u5FC5\u8981\u3067\u3059"},
{"appletprops.title", "AppletViewer\u30D7\u30ED\u30D1\u30C6\u30A3"},
{"appletprops.label.http.server", "Http\u30D7\u30ED\u30AD\u30B7\u30FB\u30B5\u30FC\u30D0\u30FC:"},
{"appletprops.label.http.proxy", "Http\u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8:"},
{"appletprops.label.network", "\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u30FB\u30A2\u30AF\u30BB\u30B9:"},
{"appletprops.choice.network.item.none", "\u306A\u3057"},
{"appletprops.choice.network.item.applethost", "\u30A2\u30D7\u30EC\u30C3\u30C8\u30FB\u30DB\u30B9\u30C8"},
{"appletprops.choice.network.item.unrestricted", "\u5236\u9650\u306A\u3057"},
{"appletprops.label.class", "\u30AF\u30E9\u30B9\u30FB\u30A2\u30AF\u30BB\u30B9:"},
{"appletprops.choice.class.item.restricted", "\u5236\u9650\u4ED8\u304D"},
{"appletprops.choice.class.item.unrestricted", "\u5236\u9650\u306A\u3057"},
{"appletprops.label.unsignedapplet", "\u7F72\u540D\u3055\u308C\u3066\u3044\u306A\u3044\u30A2\u30D7\u30EC\u30C3\u30C8\u3092\u8A31\u53EF:"},
{"appletprops.choice.unsignedapplet.no", "\u3044\u3044\u3048"},
{"appletprops.choice.unsignedapplet.yes", "\u306F\u3044"},
{"appletprops.button.apply", "\u9069\u7528"},
{"appletprops.button.cancel", "\u53D6\u6D88"},
{"appletprops.button.reset", "\u30EA\u30BB\u30C3\u30C8"},
{"appletprops.apply.exception", "\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F"},
/* 4066432 */
{"appletprops.title.invalidproxy", "\u30A8\u30F3\u30C8\u30EA\u304C\u7121\u52B9\u3067\u3059"},
{"appletprops.label.invalidproxy", "\u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8\u306F\u6B63\u306E\u6574\u6570\u5024\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "AppletViewer\u7528\u306E\u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D7\u30ED\u30D1\u30C6\u30A3"},
{"appletsecurityexception.checkcreateclassloader", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30AF\u30E9\u30B9\u30ED\u30FC\u30C0\u30FC"},
{"appletsecurityexception.checkaccess.thread", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30B9\u30EC\u30C3\u30C9"},
{"appletsecurityexception.checkaccess.threadgroup", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30B9\u30EC\u30C3\u30C9\u30B0\u30EB\u30FC\u30D7: {0}"},
{"appletsecurityexception.checkexit", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u7D42\u4E86: {0}"},
{"appletsecurityexception.checkexec", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u5B9F\u884C: {0}"},
{"appletsecurityexception.checklink", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30EA\u30F3\u30AF: {0}"},
{"appletsecurityexception.checkpropsaccess", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30D7\u30ED\u30D1\u30C6\u30A3"},
{"appletsecurityexception.checkpropsaccess.key", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30A2\u30AF\u30BB\u30B9{0}"},
{"appletsecurityexception.checkread.exception1", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: file.read: {0}"},
{"appletsecurityexception.checkread", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: {0}, {1}"},
{"appletsecurityexception.checkwrite", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: fd.read"},
{"appletsecurityexception.checkwrite.fd", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: fd.write"},
{"appletsecurityexception.checklisten", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: {1}\u306E\u8D77\u70B9\u3092\u4F7F\u7528\u3057\u3066{0}\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},
{"appletsecurityexception.checkconnect.networkhost2", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30DB\u30B9\u30C8{0}\u307E\u305F\u306F{1}\u306EIP\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002 "},
{"appletsecurityexception.checkconnect.networkhost3", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30DB\u30B9\u30C8{0}\u306EIP\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002trustProxy\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
{"appletsecurityexception.checkconnect", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u63A5\u7D9A: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {0}"},
{"appletsecurityexception.checkpackagedefinition", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u5B9A\u7FA9\u3067\u304D\u307E\u305B\u3093: {0}"},
{"appletsecurityexception.cannotsetfactory", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093"},
{"appletsecurityexception.checkmemberaccess", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30E1\u30F3\u30D0\u30FC\u30FB\u30A2\u30AF\u30BB\u30B9\u306E\u78BA\u8A8D"},
{"appletsecurityexception.checkgetprintjob", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u4F8B\u5916: \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u64CD\u4F5C: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "\u4E0D\u660E\u306A\u30AF\u30E9\u30B9\u30ED\u30FC\u30C0\u30FC\u30FB\u30BF\u30A4\u30D7\u3067\u3059\u3002getContext\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093"},
{"appletsecurityexception.checkread.unknown", "\u4E0D\u660E\u306A\u30AF\u30E9\u30B9\u30ED\u30FC\u30C0\u30FC\u30FB\u30BF\u30A4\u30D7\u3067\u3059\u3002{0}\u306E\u8AAD\u53D6\u308A\u30C1\u30A7\u30C3\u30AF\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093"},
{"appletsecurityexception.checkconnect.unknown", "\u4E0D\u660E\u306A\u30AF\u30E9\u30B9\u30ED\u30FC\u30C0\u30FC\u30FB\u30BF\u30A4\u30D7\u3067\u3059\u3002\u63A5\u7D9A\u30C1\u30A7\u30C3\u30AF\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_ko extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "\uD574\uC81C"},
{"appletviewer.tool.title", "\uC560\uD50C\uB9BF \uBDF0\uC5B4: {0}"},
{"appletviewer.menu.applet", "\uC560\uD50C\uB9BF"},
{"appletviewer.menuitem.restart", "\uC7AC\uC2DC\uC791"},
{"appletviewer.menuitem.reload", "\uC7AC\uB85C\uB4DC"},
{"appletviewer.menuitem.stop", "\uC815\uC9C0"},
{"appletviewer.menuitem.save", "\uC800\uC7A5..."},
{"appletviewer.menuitem.start", "\uC2DC\uC791"},
{"appletviewer.menuitem.clone", "\uBCF5\uC81C..."},
{"appletviewer.menuitem.tag", "\uD0DC\uADF8 \uC9C0\uC815..."},
{"appletviewer.menuitem.info", "\uC815\uBCF4..."},
{"appletviewer.menuitem.edit", "\uD3B8\uC9D1"},
{"appletviewer.menuitem.encoding", "\uBB38\uC790 \uC778\uCF54\uB529"},
{"appletviewer.menuitem.print", "\uC778\uC1C4..."},
{"appletviewer.menuitem.props", "\uC18D\uC131..."},
{"appletviewer.menuitem.close", "\uB2EB\uAE30"},
{"appletviewer.menuitem.quit", "\uC885\uB8CC"},
{"appletviewer.label.hello", "\uC2DC\uC791..."},
{"appletviewer.status.start", "\uC560\uD50C\uB9BF\uC744 \uC2DC\uC791\uD558\uB294 \uC911..."},
{"appletviewer.appletsave.filedialogtitle","\uD30C\uC77C\uB85C \uC560\uD50C\uB9BF \uC9C1\uB82C\uD654"},
{"appletviewer.appletsave.err1", "{0}\uC744(\uB97C) {1}(\uC73C)\uB85C \uC9C1\uB82C\uD654\uD558\uB294 \uC911"},
{"appletviewer.appletsave.err2", "appletSave\uC5D0 \uC624\uB958 \uBC1C\uC0DD: {0}"},
{"appletviewer.applettag", "\uD0DC\uADF8\uAC00 \uD45C\uC2DC\uB428"},
{"appletviewer.applettag.textframe", "\uC560\uD50C\uB9BF HTML \uD0DC\uADF8"},
{"appletviewer.appletinfo.applet", "-- \uC560\uD50C\uB9BF \uC815\uBCF4 \uC5C6\uC74C --"},
{"appletviewer.appletinfo.param", "-- \uB9E4\uAC1C\uBCC0\uC218 \uC815\uBCF4 \uC5C6\uC74C --"},
{"appletviewer.appletinfo.textframe", "\uC560\uD50C\uB9BF \uC815\uBCF4"},
{"appletviewer.appletprint.fail", "\uC778\uC1C4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
{"appletviewer.appletprint.finish", "\uC778\uC1C4\uB97C \uC644\uB8CC\uD588\uC2B5\uB2C8\uB2E4."},
{"appletviewer.appletprint.cancel", "\uC778\uC1C4\uAC00 \uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletviewer.appletencoding", "\uBB38\uC790 \uC778\uCF54\uB529: {0}"},
{"appletviewer.parse.warning.requiresname", "\uACBD\uACE0: <param name=... value=...> \uD0DC\uADF8\uC5D0\uB294 name \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.paramoutside", "\uACBD\uACE0: <param> \uD0DC\uADF8\uAC00 <applet> ... </applet> \uBC16\uC5D0 \uC788\uC2B5\uB2C8\uB2E4."},
{"appletviewer.parse.warning.applet.requirescode", "\uACBD\uACE0: <applet> \uD0DC\uADF8\uC5D0\uB294 code \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.applet.requiresheight", "\uACBD\uACE0: <applet> \uD0DC\uADF8\uC5D0\uB294 height \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.applet.requireswidth", "\uACBD\uACE0: <applet> \uD0DC\uADF8\uC5D0\uB294 width \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.object.requirescode", "\uACBD\uACE0: <object> \uD0DC\uADF8\uC5D0\uB294 code \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.object.requiresheight", "\uACBD\uACE0: <object> \uD0DC\uADF8\uC5D0\uB294 height \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.object.requireswidth", "\uACBD\uACE0: <object> \uD0DC\uADF8\uC5D0\uB294 width \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.embed.requirescode", "\uACBD\uACE0: <embed> \uD0DC\uADF8\uC5D0\uB294 code \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.embed.requiresheight", "\uACBD\uACE0: <embed> \uD0DC\uADF8\uC5D0\uB294 height \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.embed.requireswidth", "\uACBD\uACE0: <embed> \uD0DC\uADF8\uC5D0\uB294 width \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletviewer.parse.warning.appnotLongersupported", "\uACBD\uACE0: <app> \uD0DC\uADF8\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 <applet>\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."},
{"appletviewer.usage", "\uC0AC\uC6A9\uBC95: appletviewer <options> url(s)\n\n\uC5EC\uAE30\uC11C <options>\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n -debug Java \uB514\uBC84\uAC70\uC5D0\uC11C \uC560\uD50C\uB9BF \uBDF0\uC5B4\uB97C \uC2DC\uC791\uD569\uB2C8\uB2E4.\n -encoding <encoding> HTML \uD30C\uC77C\uC5D0 \uC0AC\uC6A9\uB420 \uBB38\uC790 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -J<runtime flag> Java \uC778\uD130\uD504\uB9AC\uD130\uB85C \uC778\uC218\uB97C \uC804\uB2EC\uD569\uB2C8\uB2E4.\n\n-J \uC635\uC158\uC740 \uD45C\uC900\uC774 \uC544\uB2C8\uBA70 \uC608\uACE0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
{"appletviewer.main.err.unsupportedopt", "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC635\uC158: {0}"},
{"appletviewer.main.err.unrecognizedarg", "\uC54C \uC218 \uC5C6\uB294 \uC778\uC218: {0}"},
{"appletviewer.main.err.dupoption", "\uC911\uBCF5\uB41C \uC635\uC158 \uC0AC\uC6A9: {0}"},
{"appletviewer.main.err.inputfile", "\uC9C0\uC815\uB41C \uC785\uB825 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletviewer.main.err.badurl", "\uC798\uBABB\uB41C URL: {0}({1})"},
{"appletviewer.main.err.io", "\uC77D\uB294 \uC911 I/O \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {0}"},
{"appletviewer.main.err.readablefile", "{0}\uC774(\uAC00) \uD30C\uC77C\uC774\uBA70 \uC77D\uAE30 \uAC00\uB2A5\uD55C \uC0C1\uD0DC\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
{"appletviewer.main.err.correcturl", "{0}\uC774(\uAC00) \uC62C\uBC14\uB978 URL\uC785\uB2C8\uAE4C?"},
{"appletviewer.main.prop.store", "\uC0AC\uC6A9\uC790 \uAD00\uB828 AppletViewer \uC18D\uC131"},
{"appletviewer.main.err.prop.cantread", "\uC0AC\uC6A9\uC790 \uC18D\uC131 \uD30C\uC77C\uC744 \uC77D\uC744 \uC218 \uC5C6\uC74C: {0}"},
{"appletviewer.main.err.prop.cantsave", "\uC0AC\uC6A9\uC790 \uC18D\uC131 \uD30C\uC77C\uC744 \uC800\uC7A5\uD560 \uC218 \uC5C6\uC74C: {0}"},
{"appletviewer.main.warn.nosecmgr", "\uACBD\uACE0: \uBCF4\uC548\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."},
{"appletviewer.main.debug.cantfinddebug", "\uB514\uBC84\uAC70\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"},
{"appletviewer.main.debug.cantfindmain", "\uB514\uBC84\uAC70\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"},
{"appletviewer.main.debug.exceptionindebug", "\uB514\uBC84\uAC70\uC5D0 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4!"},
{"appletviewer.main.debug.cantaccess", "\uB514\uBC84\uAC70\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"},
{"appletviewer.main.nosecmgr", "\uACBD\uACE0: SecurityManager\uAC00 \uC124\uCE58\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"},
{"appletviewer.main.warning", "\uACBD\uACE0: \uC2DC\uC791\uB41C \uC560\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. <applet> \uD0DC\uADF8\uAC00 \uC785\uB825\uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
{"appletviewer.main.warn.prop.overwrite", "\uACBD\uACE0: \uC0AC\uC6A9\uC790\uC758 \uC694\uCCAD\uC5D0 \uB530\uB77C \uC77C\uC2DC\uC801\uC73C\uB85C \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uACB9\uCCD0 \uC4F0\uB294 \uC911: \uD0A4: {0}, \uC774\uC804 \uAC12: {1}, \uC0C8 \uAC12: {2}"},
{"appletviewer.main.warn.cantreadprops", "\uACBD\uACE0: AppletViewer \uC18D\uC131 \uD30C\uC77C\uC744 \uC77D\uC744 \uC218 \uC5C6\uC74C: {0}. \uAE30\uBCF8\uAC12\uC744 \uC0AC\uC6A9\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."},
{"appletioexception.loadclass.throw.interrupted", "\uD074\uB798\uC2A4 \uB85C\uB4DC\uAC00 \uC911\uB2E8\uB428: {0}"},
{"appletioexception.loadclass.throw.notloaded", "\uD074\uB798\uC2A4\uAC00 \uB85C\uB4DC\uB418\uC9C0 \uC54A\uC74C: {0}"},
{"appletclassloader.loadcode.verbose", "{1}\uC744(\uB97C) \uAC00\uC838\uC624\uAE30 \uC704\uD574 {0}\uC5D0 \uB300\uD55C \uC2A4\uD2B8\uB9BC\uC744 \uC5EC\uB294 \uC911"},
{"appletclassloader.filenotfound", "{0}\uC744(\uB97C) \uAC80\uC0C9\uD558\uB294 \uC911 \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."},
{"appletclassloader.fileformat", "\uB85C\uB4DC \uC911 \uD30C\uC77C \uD615\uC2DD \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {0}"},
{"appletclassloader.fileioexception", "\uB85C\uB4DC \uC911 I/O \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {0}"},
{"appletclassloader.fileexception", "\uB85C\uB4DC \uC911 {0} \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {1}"},
{"appletclassloader.filedeath", "\uB85C\uB4DC \uC911 {0}\uC774(\uAC00) \uC885\uB8CC\uB428: {1}"},
{"appletclassloader.fileerror", "\uB85C\uB4DC \uC911 {0} \uC624\uB958 \uBC1C\uC0DD: {1}"},
{"appletclassloader.findclass.verbose.openstream", "{1}\uC744(\uB97C) \uAC00\uC838\uC624\uAE30 \uC704\uD574 {0}\uC5D0 \uB300\uD55C \uC2A4\uD2B8\uB9BC\uC744 \uC5EC\uB294 \uC911"},
{"appletclassloader.getresource.verbose.forname", "\uC774\uB984\uC5D0 \uB300\uD55C AppletClassLoader.getResource: {0}"},
{"appletclassloader.getresource.verbose.found", "\uC2DC\uC2A4\uD15C \uB9AC\uC18C\uC2A4\uB85C {0} \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4."},
{"appletclassloader.getresourceasstream.verbose", "\uC2DC\uC2A4\uD15C \uB9AC\uC18C\uC2A4\uB85C {0} \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.runloader.err", "\uAC1D\uCCB4 \uB610\uB294 \uCF54\uB4DC \uB9E4\uAC1C\uBCC0\uC218\uC785\uB2C8\uB2E4!"},
{"appletpanel.runloader.exception", "{0}\uC758 \uC9C1\uB82C\uD654\uB97C \uD574\uC81C\uD558\uB294 \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."},
{"appletpanel.destroyed", "\uC560\uD50C\uB9BF\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.loaded", "\uC560\uD50C\uB9BF\uC774 \uB85C\uB4DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.started", "\uC560\uD50C\uB9BF\uC774 \uC2DC\uC791\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.inited", "\uC560\uD50C\uB9BF\uC774 \uCD08\uAE30\uD654\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.stopped", "\uC560\uD50C\uB9BF\uC774 \uC815\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.disposed", "\uC560\uD50C\uB9BF\uC774 \uBC30\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.nocode", "APPLET \uD0DC\uADF8\uC5D0 CODE \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{"appletpanel.notfound", "\uB85C\uB4DC: {0} \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletpanel.nocreate", "\uB85C\uB4DC: {0}\uC744(\uB97C) \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletpanel.noconstruct", "\uB85C\uB4DC: {0}\uC740(\uB294) \uACF5\uC6A9\uC774 \uC544\uB2C8\uAC70\uB098 \uACF5\uC6A9 \uC0DD\uC131\uC790\uB97C \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
{"appletpanel.death", "\uC885\uB8CC\uB428"},
{"appletpanel.exception", "\uC608\uC678\uC0AC\uD56D: {0}."},
{"appletpanel.exception2", "\uC608\uC678\uC0AC\uD56D: {0}: {1}."},
{"appletpanel.error", "\uC624\uB958: {0}."},
{"appletpanel.error2", "\uC624\uB958: {0}: {1}."},
{"appletpanel.notloaded", "\uCD08\uAE30\uD654: \uC560\uD50C\uB9BF\uC774 \uB85C\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.notinited", "\uC2DC\uC791: \uC560\uD50C\uB9BF\uC774 \uCD08\uAE30\uD654\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.notstarted", "\uC815\uC9C0: \uC560\uD50C\uB9BF\uC774 \uC2DC\uC791\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.notstopped", "\uC0AD\uC81C: \uC560\uD50C\uB9BF\uC774 \uC815\uC9C0\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.notdestroyed", "\uBC30\uCE58: \uC560\uD50C\uB9BF\uC774 \uC0AD\uC81C\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.notdisposed", "\uB85C\uB4DC: \uC560\uD50C\uB9BF\uC774 \uBC30\uCE58\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
{"appletpanel.bail", "\uC911\uB2E8\uB428: \uC911\uB2E8\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."},
{"appletpanel.filenotfound", "{0}\uC744(\uB97C) \uAC80\uC0C9\uD558\uB294 \uC911 \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."},
{"appletpanel.fileformat", "\uB85C\uB4DC \uC911 \uD30C\uC77C \uD615\uC2DD \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {0}"},
{"appletpanel.fileioexception", "\uB85C\uB4DC \uC911 I/O \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {0}"},
{"appletpanel.fileexception", "\uB85C\uB4DC \uC911 {0} \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {1}"},
{"appletpanel.filedeath", "\uB85C\uB4DC \uC911 {0}\uC774(\uAC00) \uC885\uB8CC\uB428: {1}"},
{"appletpanel.fileerror", "\uB85C\uB4DC \uC911 {0} \uC624\uB958 \uBC1C\uC0DD: {1}"},
{"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38 \uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream\uC5D0 \uB110\uC774 \uC544\uB2CC \uB85C\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletprops.title", "AppletViewer \uC18D\uC131"},
{"appletprops.label.http.server", "HTTP \uD504\uB85D\uC2DC \uC11C\uBC84:"},
{"appletprops.label.http.proxy", "HTTP \uD504\uB85D\uC2DC \uD3EC\uD2B8:"},
{"appletprops.label.network", "\uB124\uD2B8\uC6CC\uD06C \uC561\uC138\uC2A4:"},
{"appletprops.choice.network.item.none", "\uC5C6\uC74C"},
{"appletprops.choice.network.item.applethost", "\uC560\uD50C\uB9BF \uD638\uC2A4\uD2B8"},
{"appletprops.choice.network.item.unrestricted", "\uC81C\uD55C\uB418\uC9C0 \uC54A\uC74C"},
{"appletprops.label.class", "\uD074\uB798\uC2A4 \uC561\uC138\uC2A4:"},
{"appletprops.choice.class.item.restricted", "\uC81C\uD55C\uB428"},
{"appletprops.choice.class.item.unrestricted", "\uC81C\uD55C\uB418\uC9C0 \uC54A\uC74C"},
{"appletprops.label.unsignedapplet", "\uC11C\uBA85\uB418\uC9C0 \uC54A\uC740 \uC560\uD50C\uB9BF \uD5C8\uC6A9:"},
{"appletprops.choice.unsignedapplet.no", "\uC544\uB2C8\uC624"},
{"appletprops.choice.unsignedapplet.yes", "\uC608"},
{"appletprops.button.apply", "\uC801\uC6A9"},
{"appletprops.button.cancel", "\uCDE8\uC18C"},
{"appletprops.button.reset", "\uC7AC\uC124\uC815"},
{"appletprops.apply.exception", "\uC18D\uC131 \uC800\uC7A5 \uC2E4\uD328: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "\uBD80\uC801\uD569\uD55C \uD56D\uBAA9"},
{"appletprops.label.invalidproxy", "\uD504\uB85D\uC2DC \uD3EC\uD2B8\uB294 \uC591\uC758 \uC815\uC218 \uAC12\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
{"appletprops.button.ok", "\uD655\uC778"},
/* end 4066432 */
{"appletprops.prop.store", "\uC0AC\uC6A9\uC790 \uAD00\uB828 AppletViewer \uC18D\uC131"},
{"appletsecurityexception.checkcreateclassloader", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uD074\uB798\uC2A4 \uB85C\uB354"},
{"appletsecurityexception.checkaccess.thread", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC2A4\uB808\uB4DC"},
{"appletsecurityexception.checkaccess.threadgroup", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC2A4\uB808\uB4DC \uADF8\uB8F9: {0}"},
{"appletsecurityexception.checkexit", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC885\uB8CC: {0}"},
{"appletsecurityexception.checkexec", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC2E4\uD589: {0}"},
{"appletsecurityexception.checklink", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uB9C1\uD06C: {0}"},
{"appletsecurityexception.checkpropsaccess", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC18D\uC131"},
{"appletsecurityexception.checkpropsaccess.key", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC18D\uC131 \uC561\uC138\uC2A4 {0}"},
{"appletsecurityexception.checkread.exception1", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: file.read: {0}"},
{"appletsecurityexception.checkread", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: {0}, {1}"},
{"appletsecurityexception.checkwrite", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: fd.read"},
{"appletsecurityexception.checkwrite.fd", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: fd.write"},
{"appletsecurityexception.checklisten", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: {1}\uC5D0\uC11C {0}\uC5D0 \uC811\uC18D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletsecurityexception.checkconnect.networkhost2", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: {0} \uD638\uC2A4\uD2B8 \uB610\uB294 {1}\uC5D0 \uB300\uD55C IP\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "},
{"appletsecurityexception.checkconnect.networkhost3", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: {0} \uD638\uC2A4\uD2B8\uC5D0 \uB300\uD55C IP\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. trustProxy \uC18D\uC131\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624."},
{"appletsecurityexception.checkconnect", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uC811\uC18D: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uD328\uD0A4\uC9C0\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uC74C: {0}"},
{"appletsecurityexception.checkpackagedefinition", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uD328\uD0A4\uC9C0\uB97C \uC815\uC758\uD560 \uC218 \uC5C6\uC74C: {0}"},
{"appletsecurityexception.cannotsetfactory", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uD329\uD1A0\uB9AC\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletsecurityexception.checkmemberaccess", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uBA64\uBC84 \uC561\uC138\uC2A4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
{"appletsecurityexception.checkgetprintjob", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "\uBCF4\uC548 \uC608\uC678\uC0AC\uD56D: \uBCF4\uC548 \uC791\uC5C5: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "\uC54C \uC218 \uC5C6\uB294 \uD074\uB798\uC2A4 \uB85C\uB354 \uC720\uD615\uC785\uB2C8\uB2E4. getContext\uB97C \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletsecurityexception.checkread.unknown", "\uC54C \uC218 \uC5C6\uB294 \uD074\uB798\uC2A4 \uB85C\uB354 \uC720\uD615\uC785\uB2C8\uB2E4. {0} \uC77D\uAE30\uB97C \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{"appletsecurityexception.checkconnect.unknown", "\uC54C \uC218 \uC5C6\uB294 \uD074\uB798\uC2A4 \uB85C\uB354 \uC720\uD615\uC785\uB2C8\uB2E4. \uC811\uC18D\uC744 \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_pt_BR extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "Rejeitar"},
{"appletviewer.tool.title", "Visualizador do Applet: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Reiniciar"},
{"appletviewer.menuitem.reload", "Recarregar"},
{"appletviewer.menuitem.stop", "Interromper"},
{"appletviewer.menuitem.save", "Salvar"},
{"appletviewer.menuitem.start", "Iniciar"},
{"appletviewer.menuitem.clone", "Clonar..."},
{"appletviewer.menuitem.tag", "Tag..."},
{"appletviewer.menuitem.info", "Informa\u00E7\u00F5es..."},
{"appletviewer.menuitem.edit", "Editar"},
{"appletviewer.menuitem.encoding", "Codifica\u00E7\u00E3o do Caractere"},
{"appletviewer.menuitem.print", "Imprimir..."},
{"appletviewer.menuitem.props", "Propriedades..."},
{"appletviewer.menuitem.close", "Fechar"},
{"appletviewer.menuitem.quit", "Sair"},
{"appletviewer.label.hello", "Ol\u00E1..."},
{"appletviewer.status.start", "iniciando o applet..."},
{"appletviewer.appletsave.filedialogtitle","Serializar Applet no Arquivo"},
{"appletviewer.appletsave.err1", "serializando um {0} para {1}"},
{"appletviewer.appletsave.err2", "no appletSave: {0}"},
{"appletviewer.applettag", "Tag mostrada"},
{"appletviewer.applettag.textframe", "Tag HTML do Applet"},
{"appletviewer.appletinfo.applet", "-- nenhuma informa\u00E7\u00E3o do applet --"},
{"appletviewer.appletinfo.param", "-- sem informa\u00E7\u00E3o de par\u00E2metro --"},
{"appletviewer.appletinfo.textframe", "Informa\u00E7\u00F5es do Applet"},
{"appletviewer.appletprint.fail", "Falha na impress\u00E3o."},
{"appletviewer.appletprint.finish", "Impress\u00E3o finalizada."},
{"appletviewer.appletprint.cancel", "Impress\u00E3o cancelada."},
{"appletviewer.appletencoding", "Codifica\u00E7\u00E3o de Caractere: {0}"},
{"appletviewer.parse.warning.requiresname", "Advert\u00EAncia: a tag <param name=... value=...> requer um atributo de nome."},
{"appletviewer.parse.warning.paramoutside", "Advert\u00EAncia: a tag <param> externa <applet> ... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Advert\u00EAncia: a tag <applet> requer um atributo de c\u00F3digo."},
{"appletviewer.parse.warning.applet.requiresheight", "Advert\u00EAncia: a tag <applet> requer um atributo de altura."},
{"appletviewer.parse.warning.applet.requireswidth", "Advert\u00EAncia: a tag <applet> requer um atributo de largura."},
{"appletviewer.parse.warning.object.requirescode", "Advert\u00EAncia: a tag <object> requer um atributo de c\u00F3digo."},
{"appletviewer.parse.warning.object.requiresheight", "Advert\u00EAncia: a tag <object> requer um atributo de altura."},
{"appletviewer.parse.warning.object.requireswidth", "Advert\u00EAncia: a tag <object> requer um atributo de largura."},
{"appletviewer.parse.warning.embed.requirescode", "Advert\u00EAncia: a tag <embed> requer um atributo de c\u00F3digo."},
{"appletviewer.parse.warning.embed.requiresheight", "Advert\u00EAncia: a tag <embed> requer um atributo de altura."},
{"appletviewer.parse.warning.embed.requireswidth", "Advert\u00EAncia: a tag <embed> requer um atributo de largura."},
{"appletviewer.parse.warning.appnotLongersupported", "Advert\u00EAncia: a tag <app> n\u00E3o \u00E9 mais suportada; use <applet>:"},
{"appletviewer.usage", "Uso: appletviewer <op\u00E7\u00F5es> url(s)\n\nem que as <op\u00E7\u00F5es> incluem:\n -debug Inicia o visualizador do applet no depurador Java\n -encoding <codifica\u00E7\u00E3o> Especifica a codifica\u00E7\u00E3o de caractere usada pelos arquivos HTML\n -J<flag de runtime> Informa o argumento ao intepretador java\n\nA op\u00E7\u00E3o -J n\u00E3o \u00E9 padr\u00E3o e est\u00E1 sujeita \u00E0 altera\u00E7\u00E3o sem notifica\u00E7\u00E3o."},
{"appletviewer.main.err.unsupportedopt", "Op\u00E7\u00E3o n\u00E3o suportada: {0}"},
{"appletviewer.main.err.unrecognizedarg", "Argumento n\u00E3o reconhecido: {0}"},
{"appletviewer.main.err.dupoption", "Uso duplicado da op\u00E7\u00E3o: {0}"},
{"appletviewer.main.err.inputfile", "Nenhum arquivo de entrada especificado."},
{"appletviewer.main.err.badurl", "URL Inv\u00E1lido: {0} ( {1} )"},
{"appletviewer.main.err.io", "Exce\u00E7\u00E3o de E/S ao ler: {0}"},
{"appletviewer.main.err.readablefile", "Certifique-se de que {0} seja um arquivo e seja leg\u00EDvel."},
{"appletviewer.main.err.correcturl", "O URL {0} est\u00E1 correto?"},
{"appletviewer.main.prop.store", "Propriedades espec\u00EDficas do usu\u00E1rio do AppletViewer"},
{"appletviewer.main.err.prop.cantread", "N\u00E3o \u00E9 poss\u00EDvel ler o arquivo de propriedades do usu\u00E1rio: {0}"},
{"appletviewer.main.err.prop.cantsave", "N\u00E3o \u00E9 poss\u00EDvel salvar o arquivo de propriedades do usu\u00E1rio: {0}"},
{"appletviewer.main.warn.nosecmgr", "Advert\u00EAncia: desativando a seguran\u00E7a."},
{"appletviewer.main.debug.cantfinddebug", "N\u00E3o \u00E9 poss\u00EDvel localizar o depurador!"},
{"appletviewer.main.debug.cantfindmain", "N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00E9todo main no depurador!"},
{"appletviewer.main.debug.exceptionindebug", "Exce\u00E7\u00E3o no depurador!"},
{"appletviewer.main.debug.cantaccess", "N\u00E3o \u00E9 poss\u00EDvel acessar o depurador!"},
{"appletviewer.main.nosecmgr", "Advert\u00EAncia: SecurityManager n\u00E3o instalado!"},
{"appletviewer.main.warning", "Advert\u00EAncia: Nenhum applet iniciado. Certifique-se de que a entrada contenha uma tag <applet>."},
{"appletviewer.main.warn.prop.overwrite", "Advert\u00EAncia: Substituindo a propriedade do sistema temporariamente a pedido do usu\u00E1rio: chave: {0} valor antigo: {1} valor novo: {2}"},
{"appletviewer.main.warn.cantreadprops", "Advert\u00EAncia: N\u00E3o \u00E9 poss\u00EDvel ler o arquivo de propriedades AppletViewer: {0} Usando padr\u00F5es."},
{"appletioexception.loadclass.throw.interrupted", "carregamento de classe interrompido: {0}"},
{"appletioexception.loadclass.throw.notloaded", "classe n\u00E3o carregada: {0}"},
{"appletclassloader.loadcode.verbose", "Fluxo de abertura para: {0} para obter {1}"},
{"appletclassloader.filenotfound", "Arquivo n\u00E3o encontrado ao procurar: {0}"},
{"appletclassloader.fileformat", "Exce\u00E7\u00E3o de formato do arquivo ao carregar: {0}"},
{"appletclassloader.fileioexception", "Exce\u00E7\u00E3o de E/S ao carregar: {0}"},
{"appletclassloader.fileexception", "exce\u00E7\u00E3o de {0} ao carregar: {1}"},
{"appletclassloader.filedeath", "{0} eliminado ao carregar: {1}"},
{"appletclassloader.fileerror", "erro de {0} ao carregar: {1}"},
{"appletclassloader.findclass.verbose.openstream", "Fluxo de abertura para: {0} para obter {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource do nome: {0}"},
{"appletclassloader.getresource.verbose.found", "Recurso encontrado: {0} como um recurso do sistema"},
{"appletclassloader.getresourceasstream.verbose", "Recurso encontrado: {0} como um recurso do sistema"},
{"appletpanel.runloader.err", "Par\u00E2metro de c\u00F3digo ou objeto!"},
{"appletpanel.runloader.exception", "exce\u00E7\u00E3o ao desserializar {0}"},
{"appletpanel.destroyed", "Applet destru\u00EDdo."},
{"appletpanel.loaded", "Applet carregado."},
{"appletpanel.started", "Applet iniciado."},
{"appletpanel.inited", "Applet inicializado."},
{"appletpanel.stopped", "Applet interrompido."},
{"appletpanel.disposed", "Applet descartado."},
{"appletpanel.nocode", "A tag APPLET n\u00E3o encontrou o par\u00E2metro CODE."},
{"appletpanel.notfound", "carga: classe {0} n\u00E3o encontrada."},
{"appletpanel.nocreate", "carga: {0} n\u00E3o pode ser instanciada."},
{"appletpanel.noconstruct", "carga: {0} n\u00E3o \u00E9 p\u00FAblica ou n\u00E3o tem construtor p\u00FAblico."},
{"appletpanel.death", "eliminado"},
{"appletpanel.exception", "exce\u00E7\u00E3o: {0}."},
{"appletpanel.exception2", "exce\u00E7\u00E3o: {0}: {1}."},
{"appletpanel.error", "erro: {0}."},
{"appletpanel.error2", "erro: {0}: {1}."},
{"appletpanel.notloaded", "Inic: applet n\u00E3o carregado."},
{"appletpanel.notinited", "Iniciar: applet n\u00E3o inicializado."},
{"appletpanel.notstarted", "Interromper: applet n\u00E3o inicializado."},
{"appletpanel.notstopped", "Destruir: applet n\u00E3o interrompido."},
{"appletpanel.notdestroyed", "Descartar: applet n\u00E3o destru\u00EDdo."},
{"appletpanel.notdisposed", "Carregar: applet n\u00E3o descartado."},
{"appletpanel.bail", "Interrompido: esvaziando."},
{"appletpanel.filenotfound", "Arquivo n\u00E3o encontrado ao procurar: {0}"},
{"appletpanel.fileformat", "Exce\u00E7\u00E3o de formato do arquivo ao carregar: {0}"},
{"appletpanel.fileioexception", "Exce\u00E7\u00E3o de E/S ao carregar: {0}"},
{"appletpanel.fileexception", "exce\u00E7\u00E3o de {0} ao carregar: {1}"},
{"appletpanel.filedeath", "{0} eliminado ao carregar: {1}"},
{"appletpanel.fileerror", "erro de {0} ao carregar: {1}"},
{"appletpanel.badattribute.exception", "Parsing de HTML: valor incorreto do atributo de largura/altura"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requer um carregador n\u00E3o nulo"},
{"appletprops.title", "Propriedades do AppletViewer"},
{"appletprops.label.http.server", "Servidor proxy Http:"},
{"appletprops.label.http.proxy", "Porta proxy Http:"},
{"appletprops.label.network", "Acesso de rede:"},
{"appletprops.choice.network.item.none", "Nenhum"},
{"appletprops.choice.network.item.applethost", "Host do Applet"},
{"appletprops.choice.network.item.unrestricted", "Irrestrito"},
{"appletprops.label.class", "Acesso \u00E0 classe:"},
{"appletprops.choice.class.item.restricted", "Restrito"},
{"appletprops.choice.class.item.unrestricted", "Irrestrito"},
{"appletprops.label.unsignedapplet", "Permitir applets n\u00E3o assinados:"},
{"appletprops.choice.unsignedapplet.no", "N\u00E3o"},
{"appletprops.choice.unsignedapplet.yes", "Sim"},
{"appletprops.button.apply", "Aplicar"},
{"appletprops.button.cancel", "Cancelar"},
{"appletprops.button.reset", "Redefinir"},
{"appletprops.apply.exception", "Falha ao salvar as propriedades: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Entrada Inv\u00E1lida"},
{"appletprops.label.invalidproxy", "A Porta Proxy deve ser um valor inteiro positivo."},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "Propriedades espec\u00EDficas do usu\u00E1rio do AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "Exce\u00E7\u00E3o de Seguran\u00E7a: carregador de classes"},
{"appletsecurityexception.checkaccess.thread", "Exce\u00E7\u00E3o de Seguran\u00E7a: thread"},
{"appletsecurityexception.checkaccess.threadgroup", "Exce\u00E7\u00E3o de Seguran\u00E7a: grupo de threads: {0}"},
{"appletsecurityexception.checkexit", "Exce\u00E7\u00E3o de Seguran\u00E7a: sa\u00EDda: {0}"},
{"appletsecurityexception.checkexec", "Exce\u00E7\u00E3o de Seguran\u00E7a: exec.: {0}"},
{"appletsecurityexception.checklink", "Exce\u00E7\u00E3o de Seguran\u00E7a: link: {0}"},
{"appletsecurityexception.checkpropsaccess", "Exce\u00E7\u00E3o de Seguran\u00E7a: propriedades"},
{"appletsecurityexception.checkpropsaccess.key", "Exce\u00E7\u00E3o de Seguran\u00E7a: acesso \u00E0s propriedades {0}"},
{"appletsecurityexception.checkread.exception1", "Exce\u00E7\u00E3o de Seguran\u00E7a: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "Exce\u00E7\u00E3o de Seguran\u00E7a: file.read: {0}"},
{"appletsecurityexception.checkread", "Exce\u00E7\u00E3o de Seguran\u00E7a: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "Exce\u00E7\u00E3o de Seguran\u00E7a: {0}, {1}"},
{"appletsecurityexception.checkwrite", "Exce\u00E7\u00E3o de Seguran\u00E7a: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "Exce\u00E7\u00E3o de Seguran\u00E7a: fd.read"},
{"appletsecurityexception.checkwrite.fd", "Exce\u00E7\u00E3o de Seguran\u00E7a: fd.write"},
{"appletsecurityexception.checklisten", "Exce\u00E7\u00E3o de Seguran\u00E7a: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "Exce\u00E7\u00E3o de Seguran\u00E7a: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "Exce\u00E7\u00E3o de Seguran\u00E7a: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "Exce\u00E7\u00E3o de Seguran\u00E7a: N\u00E3o foi poss\u00EDvel estabelecer conex\u00E3o com {0} com a origem de {1}."},
{"appletsecurityexception.checkconnect.networkhost2", "Exce\u00E7\u00E3o de Seguran\u00E7a: N\u00E3o foi poss\u00EDvel resolver o IP para o host {0} ou para {1}. "},
{"appletsecurityexception.checkconnect.networkhost3", "Exce\u00E7\u00E3o de Seguran\u00E7a: N\u00E3o foi poss\u00EDvel resolver o IP para o host {0}. Consulte a propriedade trustProxy."},
{"appletsecurityexception.checkconnect", "Exce\u00E7\u00E3o de Seguran\u00E7a: conectar: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "Exce\u00E7\u00E3o de Seguran\u00E7a: n\u00E3o \u00E9 poss\u00EDvel acessar o pacote: {0}"},
{"appletsecurityexception.checkpackagedefinition", "Exce\u00E7\u00E3o de Seguran\u00E7a: n\u00E3o \u00E9 poss\u00EDvel definir o pacote: {0}"},
{"appletsecurityexception.cannotsetfactory", "Exce\u00E7\u00E3o de Seguran\u00E7a: n\u00E3o \u00E9 poss\u00EDvel definir o factory"},
{"appletsecurityexception.checkmemberaccess", "Exce\u00E7\u00E3o de Seguran\u00E7a: verificar acesso do membro"},
{"appletsecurityexception.checkgetprintjob", "Exce\u00E7\u00E3o de Seguran\u00E7a: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "Exce\u00E7\u00E3o de Seguran\u00E7a: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "Exce\u00E7\u00E3o de Seguran\u00E7a: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Exce\u00E7\u00E3o de Seguran\u00E7a: opera\u00E7\u00E3o de seguran\u00E7a: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "tipo de carregador de classe desconhecido. n\u00E3o \u00E9 poss\u00EDvel verificar getContext"},
{"appletsecurityexception.checkread.unknown", "tipo de carregador de classe desconhecido. n\u00E3o \u00E9 poss\u00EDvel verificar a leitura {0}"},
{"appletsecurityexception.checkconnect.unknown", "tipo de carregador de classe desconhecido. n\u00E3o \u00E9 poss\u00EDvel verificar a conex\u00E3o"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_sv extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "St\u00E4ng"},
{"appletviewer.tool.title", "Applet Viewer: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "Starta om"},
{"appletviewer.menuitem.reload", "Ladda om"},
{"appletviewer.menuitem.stop", "Stopp"},
{"appletviewer.menuitem.save", "Spara..."},
{"appletviewer.menuitem.start", "Starta"},
{"appletviewer.menuitem.clone", "Klona..."},
{"appletviewer.menuitem.tag", "Tagg..."},
{"appletviewer.menuitem.info", "Information..."},
{"appletviewer.menuitem.edit", "Redigera"},
{"appletviewer.menuitem.encoding", "Teckenkodning"},
{"appletviewer.menuitem.print", "Skriv ut..."},
{"appletviewer.menuitem.props", "Egenskaper..."},
{"appletviewer.menuitem.close", "St\u00E4ng"},
{"appletviewer.menuitem.quit", "Avsluta"},
{"appletviewer.label.hello", "Hej..."},
{"appletviewer.status.start", "startar applet..."},
{"appletviewer.appletsave.filedialogtitle","Serialisera applet till fil"},
{"appletviewer.appletsave.err1", "serialiserar {0} till {1}"},
{"appletviewer.appletsave.err2", "i appletSave: {0}"},
{"appletviewer.applettag", "Tagg visas"},
{"appletviewer.applettag.textframe", "HTML-tagg f\u00F6r applet"},
{"appletviewer.appletinfo.applet", "-- ingen appletinformation --"},
{"appletviewer.appletinfo.param", "-- ingen parameterinformation --"},
{"appletviewer.appletinfo.textframe", "Appletinformation"},
{"appletviewer.appletprint.fail", "Kunde inte skriva ut."},
{"appletviewer.appletprint.finish", "Utskriften klar."},
{"appletviewer.appletprint.cancel", "Utskriften avbruten."},
{"appletviewer.appletencoding", "Teckenkodning: {0}"},
{"appletviewer.parse.warning.requiresname", "Varning: <param name=... value=...>-taggen kr\u00E4ver ett namnattribut."},
{"appletviewer.parse.warning.paramoutside", "Varning: <param>-taggen finns utanf\u00F6r <applet> ... </applet>."},
{"appletviewer.parse.warning.applet.requirescode", "Varning: <applet>-taggen kr\u00E4ver ett kodattribut."},
{"appletviewer.parse.warning.applet.requiresheight", "Varning: <applet>-taggen kr\u00E4ver ett h\u00F6jdattribut."},
{"appletviewer.parse.warning.applet.requireswidth", "Varning: <applet>-taggen kr\u00E4ver ett breddattribut."},
{"appletviewer.parse.warning.object.requirescode", "Varning: <object>-taggen kr\u00E4ver ett kodattribut."},
{"appletviewer.parse.warning.object.requiresheight", "Varning: <object>-taggen kr\u00E4ver ett h\u00F6jdattribut."},
{"appletviewer.parse.warning.object.requireswidth", "Varning: <object>-taggen kr\u00E4ver ett breddattribut."},
{"appletviewer.parse.warning.embed.requirescode", "Varning: <embed>-taggen kr\u00E4ver ett kodattribut."},
{"appletviewer.parse.warning.embed.requiresheight", "Varning: <embed>-taggen kr\u00E4ver ett h\u00F6jdattribut."},
{"appletviewer.parse.warning.embed.requireswidth", "Varning: <embed>-taggen kr\u00E4ver ett breddattribut."},
{"appletviewer.parse.warning.appnotLongersupported", "Varning: <app>-taggen st\u00F6ds inte l\u00E4ngre, anv\u00E4nd <applet> ist\u00E4llet:"},
{"appletviewer.usage", "Syntax: appletviewer-<alternativ> url:er \n\nd\u00E4r <alternativ> inkluderar:\n -debug Startar appletvisning i Java-fels\u00F6kningen\n -encoding <kodning> Anger teckenkodning som anv\u00E4nds i HTML-filer\n -J<k\u00F6rningsflagga> \u00D6verf\u00F6r argument till Java-tolkningen\n\nAlternativet -J \u00E4r inte standard och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande."},
{"appletviewer.main.err.unsupportedopt", "Alternativ som inte st\u00F6ds: {0}"},
{"appletviewer.main.err.unrecognizedarg", "Ok\u00E4nt argument: {0}"},
{"appletviewer.main.err.dupoption", "Duplicerat alternativ: {0}"},
{"appletviewer.main.err.inputfile", "Inga angivna indatafiler."},
{"appletviewer.main.err.badurl", "Felaktig URL: {0} ( {1} )"},
{"appletviewer.main.err.io", "I/O-undantag vid l\u00E4sning: {0}"},
{"appletviewer.main.err.readablefile", "Kontrollera att {0} \u00E4r en fil som \u00E4r l\u00E4sbar."},
{"appletviewer.main.err.correcturl", "\u00C4r {0} den korrekta URL:en?"},
{"appletviewer.main.prop.store", "Anv\u00E4ndarspecifika egenskaper f\u00F6r AppletViewer"},
{"appletviewer.main.err.prop.cantread", "Kan inte l\u00E4sa egenskapsfilen: {0}"},
{"appletviewer.main.err.prop.cantsave", "Kan inte spara egenskapsfilen: {0}"},
{"appletviewer.main.warn.nosecmgr", "Varning! S\u00E4kerheten avaktiveras."},
{"appletviewer.main.debug.cantfinddebug", "Hittar inte fels\u00F6kningsprogrammet!"},
{"appletviewer.main.debug.cantfindmain", "Hittar inte huvudmetoden i fels\u00F6kningsprogrammet!"},
{"appletviewer.main.debug.exceptionindebug", "Undantag i fels\u00F6kningsprogrammet!"},
{"appletviewer.main.debug.cantaccess", "Det finns ingen \u00E5tkomst till fels\u00F6kningsprogrammet!"},
{"appletviewer.main.nosecmgr", "Varning: SecurityManager har inte installerats!"},
{"appletviewer.main.warning", "Varning: Inga appletar har startats. Kontrollera att indata inneh\u00E5ller <applet>-tagg."},
{"appletviewer.main.warn.prop.overwrite", "Varning: Skriver tillf\u00E4lligt \u00F6ver systemegenskap enligt beg\u00E4ran fr\u00E5n anv\u00E4ndare: nyckel: {0} tidigare v\u00E4rde: {1} nytt v\u00E4rde: {2}"},
{"appletviewer.main.warn.cantreadprops", "Varning: Kan inte l\u00E4sa egenskapsfil f\u00F6r AppletViewer: {0} Standardv\u00E4rden anv\u00E4nds."},
{"appletioexception.loadclass.throw.interrupted", "klassladdning avbr\u00F6ts: {0}"},
{"appletioexception.loadclass.throw.notloaded", "klass inte laddad: {0}"},
{"appletclassloader.loadcode.verbose", "\u00D6ppnar str\u00F6m till: {0} f\u00F6r h\u00E4mtning av {1}"},
{"appletclassloader.filenotfound", "Hittade inte fil vid s\u00F6kning efter: {0}"},
{"appletclassloader.fileformat", "Undantag av filformat vid laddning av: {0}"},
{"appletclassloader.fileioexception", "I/O-undantag vid laddning: {0}"},
{"appletclassloader.fileexception", "{0} undantag vid laddning: {1}"},
{"appletclassloader.filedeath", "{0} avslutad vid laddning: {1}"},
{"appletclassloader.fileerror", "{0} fel vid laddning: {1}"},
{"appletclassloader.findclass.verbose.openstream", "\u00D6ppnar str\u00F6m till: {0} f\u00F6r h\u00E4mtning av {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource f\u00F6r namnet: {0}"},
{"appletclassloader.getresource.verbose.found", "Hittade resursen: {0} som systemresurs"},
{"appletclassloader.getresourceasstream.verbose", "Hittade resursen: {0} som systemresurs"},
{"appletpanel.runloader.err", "Antingen objekt- eller kodparameter!"},
{"appletpanel.runloader.exception", "undantag vid avserialisering {0}"},
{"appletpanel.destroyed", "Applet raderad."},
{"appletpanel.loaded", "Applet laddad."},
{"appletpanel.started", "Applet startad."},
{"appletpanel.inited", "Applet initierad."},
{"appletpanel.stopped", "Applet stoppad."},
{"appletpanel.disposed", "Applet kasserad."},
{"appletpanel.nocode", "APPLET-tagg saknar CODE-parameter."},
{"appletpanel.notfound", "load: hittade inte klassen {0}."},
{"appletpanel.nocreate", "load: {0} kan inte instansieras."},
{"appletpanel.noconstruct", "load: {0} \u00E4r inte allm\u00E4n eller saknar allm\u00E4n konstruktor."},
{"appletpanel.death", "avslutad"},
{"appletpanel.exception", "undantag: {0}."},
{"appletpanel.exception2", "undantag: {0}: {1}."},
{"appletpanel.error", "fel: {0}."},
{"appletpanel.error2", "fel {0}: {1}."},
{"appletpanel.notloaded", "Initiera: applet \u00E4r inte laddad."},
{"appletpanel.notinited", "Starta: applet \u00E4r inte initierad."},
{"appletpanel.notstarted", "Stoppa: applet har inte startats."},
{"appletpanel.notstopped", "Radera: applet har inte stoppats."},
{"appletpanel.notdestroyed", "Kassera: applet har inte raderats."},
{"appletpanel.notdisposed", "Ladda: applet har inte kasserats."},
{"appletpanel.bail", "Avbruten."},
{"appletpanel.filenotfound", "Hittade inte fil vid s\u00F6kning efter: {0}"},
{"appletpanel.fileformat", "Undantag av filformat vid laddning av: {0}"},
{"appletpanel.fileioexception", "I/O-undantag vid laddning: {0}"},
{"appletpanel.fileexception", "{0} undantag vid laddning: {1}"},
{"appletpanel.filedeath", "{0} avslutad vid laddning: {1}"},
{"appletpanel.fileerror", "{0} fel vid laddning: {1}"},
{"appletpanel.badattribute.exception", "HTML-tolkning: felaktigt v\u00E4rde f\u00F6r bredd-/h\u00F6jdattribut"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream kr\u00E4ver laddare med icke-null"},
{"appletprops.title", "AppletViewer-egenskaper"},
{"appletprops.label.http.server", "HTTP-proxyserver:"},
{"appletprops.label.http.proxy", "HTTP-proxyport:"},
{"appletprops.label.network", "N\u00E4tverks\u00E5tkomst:"},
{"appletprops.choice.network.item.none", "Ingen"},
{"appletprops.choice.network.item.applethost", "Appletv\u00E4rd"},
{"appletprops.choice.network.item.unrestricted", "Obegr\u00E4nsad"},
{"appletprops.label.class", "Klass\u00E5tkomst:"},
{"appletprops.choice.class.item.restricted", "Begr\u00E4nsad"},
{"appletprops.choice.class.item.unrestricted", "Obegr\u00E4nsad"},
{"appletprops.label.unsignedapplet", "Till\u00E5t osignerade appletar:"},
{"appletprops.choice.unsignedapplet.no", "Nej"},
{"appletprops.choice.unsignedapplet.yes", "Ja"},
{"appletprops.button.apply", "Anv\u00E4nd"},
{"appletprops.button.cancel", "Avbryt"},
{"appletprops.button.reset", "\u00C5terst\u00E4ll"},
{"appletprops.apply.exception", "Kunde inte spara egenskaper: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "Ogiltig post"},
{"appletprops.label.invalidproxy", "Proxyport m\u00E5ste vara ett positivt heltal."},
{"appletprops.button.ok", "OK"},
/* end 4066432 */
{"appletprops.prop.store", "Anv\u00E4ndarspecifika egenskaper f\u00F6r AppletViewer"},
{"appletsecurityexception.checkcreateclassloader", "S\u00E4kerhetsundantag: klassladdare"},
{"appletsecurityexception.checkaccess.thread", "S\u00E4kerhetsundantag: tr\u00E5d"},
{"appletsecurityexception.checkaccess.threadgroup", "S\u00E4kerhetsundantag: tr\u00E5dgrupp: {0}"},
{"appletsecurityexception.checkexit", "S\u00E4kerhetsundantag: utg\u00E5ng: {0}"},
{"appletsecurityexception.checkexec", "S\u00E4kerhetsundantag: exec: {0}"},
{"appletsecurityexception.checklink", "S\u00E4kerhetsundantag: l\u00E4nk: {0}"},
{"appletsecurityexception.checkpropsaccess", "S\u00E4kerhetsundantag: egenskaper"},
{"appletsecurityexception.checkpropsaccess.key", "S\u00E4kerhetsundantag: egenskaps\u00E5tkomst {0}"},
{"appletsecurityexception.checkread.exception1", "S\u00E4kerhetsundantag: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "S\u00E4kerhetsundantag: file.read: {0}"},
{"appletsecurityexception.checkread", "S\u00E4kerhetsundantag: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "S\u00E4kerhetsundantag: {0}, {1}"},
{"appletsecurityexception.checkwrite", "S\u00E4kerhetsundantag: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "S\u00E4kerhetsundantag: fd.read"},
{"appletsecurityexception.checkwrite.fd", "S\u00E4kerhetsundantag: fd.write"},
{"appletsecurityexception.checklisten", "S\u00E4kerhetsundantag: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "S\u00E4kerhetsundantag: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "S\u00E4kerhetsundantag: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "S\u00E4kerhetsundantag: Kunde inte ansluta till {0} med ursprung fr\u00E5n {1}."},
{"appletsecurityexception.checkconnect.networkhost2", "S\u00E4kerhetsundantag: Kunde inte matcha IP f\u00F6r v\u00E4rd {0} eller f\u00F6r {1}. "},
{"appletsecurityexception.checkconnect.networkhost3", "S\u00E4kerhetsundantag: Kunde inte matcha IP f\u00F6r v\u00E4rd {0}. Se egenskapen trustProxy."},
{"appletsecurityexception.checkconnect", "S\u00E4kerhetsundantag: connect: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "S\u00E4kerhetsundantag: ingen \u00E5tkomst till paket: {0}"},
{"appletsecurityexception.checkpackagedefinition", "S\u00E4kerhetsundantag: kan inte definiera paket: {0}"},
{"appletsecurityexception.cannotsetfactory", "S\u00E4kerhetsundantag: kan inte ange fabrik"},
{"appletsecurityexception.checkmemberaccess", "S\u00E4kerhetsundantag: kontrollera medlems\u00E5tkomst"},
{"appletsecurityexception.checkgetprintjob", "S\u00E4kerhetsundantag: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "S\u00E4kerhetsundantag: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "S\u00E4kerhetsundantag: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "S\u00E4kerhetsundantag: s\u00E4kerhets\u00E5tg\u00E4rd: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "ok\u00E4nd typ av klassladdare. kan inte kontrollera getContext"},
{"appletsecurityexception.checkread.unknown", "ok\u00E4nd typ av klassladdare. kan inte kontrollera kontroll\u00E4sning {0}"},
{"appletsecurityexception.checkconnect.unknown", "ok\u00E4nd typ av klassladdare. kan inte kontrollera kontrollanslutning"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_zh_CN extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "\u5173\u95ED"},
{"appletviewer.tool.title", "\u5C0F\u5E94\u7528\u7A0B\u5E8F\u67E5\u770B\u5668: {0}"},
{"appletviewer.menu.applet", "\u5C0F\u5E94\u7528\u7A0B\u5E8F"},
{"appletviewer.menuitem.restart", "\u91CD\u65B0\u542F\u52A8"},
{"appletviewer.menuitem.reload", "\u91CD\u65B0\u52A0\u8F7D"},
{"appletviewer.menuitem.stop", "\u505C\u6B62"},
{"appletviewer.menuitem.save", "\u4FDD\u5B58..."},
{"appletviewer.menuitem.start", "\u542F\u52A8"},
{"appletviewer.menuitem.clone", "\u514B\u9686..."},
{"appletviewer.menuitem.tag", "\u6807\u8BB0..."},
{"appletviewer.menuitem.info", "\u4FE1\u606F..."},
{"appletviewer.menuitem.edit", "\u7F16\u8F91"},
{"appletviewer.menuitem.encoding", "\u5B57\u7B26\u7F16\u7801"},
{"appletviewer.menuitem.print", "\u6253\u5370..."},
{"appletviewer.menuitem.props", "\u5C5E\u6027..."},
{"appletviewer.menuitem.close", "\u5173\u95ED"},
{"appletviewer.menuitem.quit", "\u9000\u51FA"},
{"appletviewer.label.hello", "\u60A8\u597D..."},
{"appletviewer.status.start", "\u6B63\u5728\u542F\u52A8\u5C0F\u5E94\u7528\u7A0B\u5E8F..."},
{"appletviewer.appletsave.filedialogtitle","\u5C06\u5C0F\u5E94\u7528\u7A0B\u5E8F\u5E8F\u5217\u5316\u4E3A\u6587\u4EF6"},
{"appletviewer.appletsave.err1", "\u5C06{0}\u5E8F\u5217\u5316\u4E3A{1}"},
{"appletviewer.appletsave.err2", "\u5728 appletSave \u4E2D: {0}"},
{"appletviewer.applettag", "\u663E\u793A\u7684\u6807\u8BB0"},
{"appletviewer.applettag.textframe", "\u5C0F\u5E94\u7528\u7A0B\u5E8F HTML \u6807\u8BB0"},
{"appletviewer.appletinfo.applet", "-- \u6CA1\u6709\u5C0F\u5E94\u7528\u7A0B\u5E8F\u4FE1\u606F --"},
{"appletviewer.appletinfo.param", "-- \u6CA1\u6709\u53C2\u6570\u4FE1\u606F --"},
{"appletviewer.appletinfo.textframe", "\u5C0F\u5E94\u7528\u7A0B\u5E8F\u4FE1\u606F"},
{"appletviewer.appletprint.fail", "\u6253\u5370\u5931\u8D25\u3002"},
{"appletviewer.appletprint.finish", "\u5DF2\u5B8C\u6210\u6253\u5370\u3002"},
{"appletviewer.appletprint.cancel", "\u6253\u5370\u5DF2\u53D6\u6D88\u3002"},
{"appletviewer.appletencoding", "\u5B57\u7B26\u7F16\u7801: {0}"},
{"appletviewer.parse.warning.requiresname", "\u8B66\u544A: <param name=... value=...> \u6807\u8BB0\u9700\u8981\u540D\u79F0\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.paramoutside", "\u8B66\u544A: <param> \u6807\u8BB0\u5728 <applet> ... </applet> \u5916\u90E8\u3002"},
{"appletviewer.parse.warning.applet.requirescode", "\u8B66\u544A: <applet> \u6807\u8BB0\u9700\u8981\u4EE3\u7801\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.applet.requiresheight", "\u8B66\u544A: <applet> \u6807\u8BB0\u9700\u8981\u9AD8\u5EA6\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.applet.requireswidth", "\u8B66\u544A: <applet> \u6807\u8BB0\u9700\u8981\u5BBD\u5EA6\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.object.requirescode", "\u8B66\u544A: <object> \u6807\u8BB0\u9700\u8981\u4EE3\u7801\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.object.requiresheight", "\u8B66\u544A: <object> \u6807\u8BB0\u9700\u8981\u9AD8\u5EA6\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.object.requireswidth", "\u8B66\u544A: <object> \u6807\u8BB0\u9700\u8981\u5BBD\u5EA6\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.embed.requirescode", "\u8B66\u544A: <embed> \u6807\u8BB0\u9700\u8981\u4EE3\u7801\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed> \u6807\u8BB0\u9700\u8981\u9AD8\u5EA6\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed> \u6807\u8BB0\u9700\u8981\u5BBD\u5EA6\u5C5E\u6027\u3002"},
{"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: \u4E0D\u518D\u652F\u6301 <app> \u6807\u8BB0, \u8BF7\u6539\u7528 <applet>:"},
{"appletviewer.usage", "\u7528\u6CD5: appletviewer <options> url\n\n\u5176\u4E2D, <options> \u5305\u62EC:\n -debug \u5728 Java \u8C03\u8BD5\u5668\u4E2D\u542F\u52A8\u5C0F\u5E94\u7528\u7A0B\u5E8F\u67E5\u770B\u5668\n -encoding <encoding> \u6307\u5B9A HTML \u6587\u4EF6\u4F7F\u7528\u7684\u5B57\u7B26\u7F16\u7801\n -J<runtime flag> \u5C06\u53C2\u6570\u4F20\u9012\u5230 java \u89E3\u91CA\u5668\n\n-J \u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002"},
{"appletviewer.main.err.unsupportedopt", "\u4E0D\u652F\u6301\u7684\u9009\u9879: {0}"},
{"appletviewer.main.err.unrecognizedarg", "\u65E0\u6CD5\u8BC6\u522B\u7684\u53C2\u6570: {0}"},
{"appletviewer.main.err.dupoption", "\u91CD\u590D\u4F7F\u7528\u9009\u9879: {0}"},
{"appletviewer.main.err.inputfile", "\u672A\u6307\u5B9A\u8F93\u5165\u6587\u4EF6\u3002"},
{"appletviewer.main.err.badurl", "\u9519\u8BEF URL: {0} ({1})"},
{"appletviewer.main.err.io", "\u8BFB\u53D6{0}\u65F6\u51FA\u73B0 I/O \u5F02\u5E38\u9519\u8BEF"},
{"appletviewer.main.err.readablefile", "\u786E\u4FDD{0}\u662F\u6587\u4EF6\u4E14\u53EF\u8BFB\u3002"},
{"appletviewer.main.err.correcturl", "{0} \u662F\u5426\u662F\u6B63\u786E\u7684 URL?"},
{"appletviewer.main.prop.store", "AppletViewer \u7684\u7528\u6237\u7279\u5B9A\u5C5E\u6027"},
{"appletviewer.main.err.prop.cantread", "\u65E0\u6CD5\u8BFB\u53D6\u7528\u6237\u5C5E\u6027\u6587\u4EF6: {0}"},
{"appletviewer.main.err.prop.cantsave", "\u65E0\u6CD5\u4FDD\u5B58\u7528\u6237\u5C5E\u6027\u6587\u4EF6: {0}"},
{"appletviewer.main.warn.nosecmgr", "\u8B66\u544A: \u7981\u7528\u5B89\u5168\u3002"},
{"appletviewer.main.debug.cantfinddebug", "\u627E\u4E0D\u5230\u8C03\u8BD5\u5668!"},
{"appletviewer.main.debug.cantfindmain", "\u5728\u8C03\u8BD5\u5668\u4E2D\u627E\u4E0D\u5230 main \u65B9\u6CD5!"},
{"appletviewer.main.debug.exceptionindebug", "\u8C03\u8BD5\u5668\u4E2D\u5B58\u5728\u5F02\u5E38\u9519\u8BEF!"},
{"appletviewer.main.debug.cantaccess", "\u65E0\u6CD5\u8BBF\u95EE\u8C03\u8BD5\u5668!"},
{"appletviewer.main.nosecmgr", "\u8B66\u544A: \u672A\u5B89\u88C5 SecurityManager!"},
{"appletviewer.main.warning", "\u8B66\u544A: \u672A\u542F\u52A8\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002\u786E\u4FDD\u8F93\u5165\u5305\u542B <applet> \u6807\u8BB0\u3002"},
{"appletviewer.main.warn.prop.overwrite", "\u8B66\u544A: \u6839\u636E\u7528\u6237\u8BF7\u6C42\u4E34\u65F6\u8986\u76D6\u7CFB\u7EDF\u5C5E\u6027: \u5173\u952E\u5B57: {0}, \u65E7\u503C: {1}, \u65B0\u503C: {2}"},
{"appletviewer.main.warn.cantreadprops", "\u8B66\u544A: \u65E0\u6CD5\u8BFB\u53D6 AppletViewer \u5C5E\u6027\u6587\u4EF6: {0}\u3002\u8BF7\u4F7F\u7528\u9ED8\u8BA4\u503C\u3002"},
{"appletioexception.loadclass.throw.interrupted", "\u7C7B\u52A0\u8F7D\u4E2D\u65AD: {0}"},
{"appletioexception.loadclass.throw.notloaded", "\u672A\u52A0\u8F7D\u7C7B: {0}"},
{"appletclassloader.loadcode.verbose", "\u6253\u5F00\u5230{0}\u7684\u6D41\u4EE5\u83B7\u53D6{1}"},
{"appletclassloader.filenotfound", "\u67E5\u627E\u65F6\u627E\u4E0D\u5230\u6587\u4EF6: {0}"},
{"appletclassloader.fileformat", "\u52A0\u8F7D\u65F6\u51FA\u73B0\u6587\u4EF6\u683C\u5F0F\u5F02\u5E38\u9519\u8BEF: {0}"},
{"appletclassloader.fileioexception", "\u52A0\u8F7D\u65F6\u51FA\u73B0 I/O \u5F02\u5E38\u9519\u8BEF: {0}"},
{"appletclassloader.fileexception", "\u52A0\u8F7D\u65F6\u51FA\u73B0{0}\u5F02\u5E38\u9519\u8BEF: {1}"},
{"appletclassloader.filedeath", "\u52A0\u8F7D\u65F6\u5DF2\u7EC8\u6B62{0}: {1}"},
{"appletclassloader.fileerror", "\u52A0\u8F7D\u65F6\u51FA\u73B0{0}\u9519\u8BEF: {1}"},
{"appletclassloader.findclass.verbose.openstream", "\u6253\u5F00\u5230{0}\u7684\u6D41\u4EE5\u83B7\u53D6{1}"},
{"appletclassloader.getresource.verbose.forname", "\u540D\u79F0\u7684 AppletClassLoader.getResource: {0}"},
{"appletclassloader.getresource.verbose.found", "\u5DF2\u627E\u5230\u4F5C\u4E3A\u7CFB\u7EDF\u8D44\u6E90\u7684\u8D44\u6E90{0}"},
{"appletclassloader.getresourceasstream.verbose", "\u5DF2\u627E\u5230\u4F5C\u4E3A\u7CFB\u7EDF\u8D44\u6E90\u7684\u8D44\u6E90{0}"},
{"appletpanel.runloader.err", "\u5BF9\u8C61\u6216\u4EE3\u7801\u53C2\u6570!"},
{"appletpanel.runloader.exception", "\u53CD\u5E8F\u5217\u5316{0}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF"},
{"appletpanel.destroyed", "\u5DF2\u9500\u6BC1\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.loaded", "\u5DF2\u52A0\u8F7D\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.started", "\u5DF2\u542F\u52A8\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.inited", "\u5DF2\u521D\u59CB\u5316\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.stopped", "\u5DF2\u505C\u6B62\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.disposed", "\u5DF2\u5904\u7406\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.nocode", "APPLET \u6807\u8BB0\u7F3A\u5C11 CODE \u53C2\u6570\u3002"},
{"appletpanel.notfound", "\u52A0\u8F7D: \u627E\u4E0D\u5230\u7C7B{0}\u3002"},
{"appletpanel.nocreate", "\u52A0\u8F7D: \u65E0\u6CD5\u5B9E\u4F8B\u5316{0}\u3002"},
{"appletpanel.noconstruct", "\u52A0\u8F7D: {0}\u4E0D\u662F\u516C\u5171\u7684, \u6216\u8005\u6CA1\u6709\u516C\u5171\u6784\u9020\u5668\u3002"},
{"appletpanel.death", "\u5DF2\u7EC8\u6B62"},
{"appletpanel.exception", "\u5F02\u5E38\u9519\u8BEF: {0}\u3002"},
{"appletpanel.exception2", "\u5F02\u5E38\u9519\u8BEF: {0}: {1}\u3002"},
{"appletpanel.error", "\u9519\u8BEF: {0}\u3002"},
{"appletpanel.error2", "\u9519\u8BEF: {0}: {1}\u3002"},
{"appletpanel.notloaded", "\u521D\u59CB\u5316: \u672A\u52A0\u8F7D\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.notinited", "\u542F\u52A8: \u672A\u521D\u59CB\u5316\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.notstarted", "\u505C\u6B62: \u672A\u542F\u52A8\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.notstopped", "\u9500\u6BC1: \u672A\u505C\u6B62\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.notdestroyed", "\u5904\u7406: \u672A\u9500\u6BC1\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.notdisposed", "\u52A0\u8F7D: \u672A\u5904\u7406\u5C0F\u5E94\u7528\u7A0B\u5E8F\u3002"},
{"appletpanel.bail", "\u5DF2\u4E2D\u65AD: \u79BB\u5F00\u3002"},
{"appletpanel.filenotfound", "\u67E5\u627E\u65F6\u627E\u4E0D\u5230\u6587\u4EF6: {0}"},
{"appletpanel.fileformat", "\u52A0\u8F7D\u65F6\u51FA\u73B0\u6587\u4EF6\u683C\u5F0F\u5F02\u5E38\u9519\u8BEF: {0}"},
{"appletpanel.fileioexception", "\u52A0\u8F7D\u65F6\u51FA\u73B0 I/O \u5F02\u5E38\u9519\u8BEF: {0}"},
{"appletpanel.fileexception", "\u52A0\u8F7D\u65F6\u51FA\u73B0{0}\u5F02\u5E38\u9519\u8BEF: {1}"},
{"appletpanel.filedeath", "\u52A0\u8F7D\u65F6\u5DF2\u7EC8\u6B62{0}: {1}"},
{"appletpanel.fileerror", "\u52A0\u8F7D\u65F6\u51FA\u73B0{0}\u9519\u8BEF: {1}"},
{"appletpanel.badattribute.exception", "HTML \u89E3\u6790: \u5BBD\u5EA6/\u9AD8\u5EA6\u5C5E\u6027\u7684\u503C\u4E0D\u6B63\u786E"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream \u9700\u8981\u975E\u7A7A\u52A0\u8F7D\u5668"},
{"appletprops.title", "AppletViewer \u5C5E\u6027"},
{"appletprops.label.http.server", "Http \u4EE3\u7406\u670D\u52A1\u5668:"},
{"appletprops.label.http.proxy", "Http \u4EE3\u7406\u7AEF\u53E3:"},
{"appletprops.label.network", "\u7F51\u7EDC\u8BBF\u95EE\u6743\u9650:"},
{"appletprops.choice.network.item.none", "\u65E0"},
{"appletprops.choice.network.item.applethost", "\u5C0F\u5E94\u7528\u7A0B\u5E8F\u4E3B\u673A"},
{"appletprops.choice.network.item.unrestricted", "\u4E0D\u53D7\u9650\u5236"},
{"appletprops.label.class", "\u7C7B\u8BBF\u95EE\u6743\u9650:"},
{"appletprops.choice.class.item.restricted", "\u53D7\u9650\u5236"},
{"appletprops.choice.class.item.unrestricted", "\u4E0D\u53D7\u9650\u5236"},
{"appletprops.label.unsignedapplet", "\u5141\u8BB8\u672A\u7B7E\u540D\u5C0F\u5E94\u7528\u7A0B\u5E8F:"},
{"appletprops.choice.unsignedapplet.no", "\u5426"},
{"appletprops.choice.unsignedapplet.yes", "\u662F"},
{"appletprops.button.apply", "\u5E94\u7528"},
{"appletprops.button.cancel", "\u53D6\u6D88"},
{"appletprops.button.reset", "\u91CD\u7F6E"},
{"appletprops.apply.exception", "\u65E0\u6CD5\u4FDD\u5B58\u5C5E\u6027: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "\u6761\u76EE\u65E0\u6548"},
{"appletprops.label.invalidproxy", "\u4EE3\u7406\u7AEF\u53E3\u5FC5\u987B\u662F\u4E00\u4E2A\u6B63\u6574\u6570\u503C\u3002"},
{"appletprops.button.ok", "\u786E\u5B9A"},
/* end 4066432 */
{"appletprops.prop.store", "AppletViewer \u7684\u7528\u6237\u7279\u5B9A\u5C5E\u6027"},
{"appletsecurityexception.checkcreateclassloader", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u7C7B\u52A0\u8F7D\u5668"},
{"appletsecurityexception.checkaccess.thread", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u7EBF\u7A0B"},
{"appletsecurityexception.checkaccess.threadgroup", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u7EBF\u7A0B\u7EC4: {0}"},
{"appletsecurityexception.checkexit", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u9000\u51FA: {0}"},
{"appletsecurityexception.checkexec", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u6267\u884C: {0}"},
{"appletsecurityexception.checklink", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u94FE\u63A5: {0}"},
{"appletsecurityexception.checkpropsaccess", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u5C5E\u6027"},
{"appletsecurityexception.checkpropsaccess.key", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u5C5E\u6027\u8BBF\u95EE{0}"},
{"appletsecurityexception.checkread.exception1", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: {0}, {1}"},
{"appletsecurityexception.checkread.exception2", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: file.read: {0}"},
{"appletsecurityexception.checkread", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: {0}, {1}"},
{"appletsecurityexception.checkwrite", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: fd.read"},
{"appletsecurityexception.checkwrite.fd", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: fd.write"},
{"appletsecurityexception.checklisten", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u65E0\u6CD5\u8FDE\u63A5\u5230\u6E90\u81EA{1}\u7684{0}\u3002"},
{"appletsecurityexception.checkconnect.networkhost2", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u65E0\u6CD5\u89E3\u6790\u4E3B\u673A{0}\u6216{1}\u7684 IP\u3002"},
{"appletsecurityexception.checkconnect.networkhost3", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u65E0\u6CD5\u89E3\u6790\u4E3B\u673A{0}\u7684 IP\u3002\u8BF7\u53C2\u9605 trustProxy \u5C5E\u6027\u3002"},
{"appletsecurityexception.checkconnect", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u8FDE\u63A5: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u65E0\u6CD5\u8BBF\u95EE\u7A0B\u5E8F\u5305: {0}"},
{"appletsecurityexception.checkpackagedefinition", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u65E0\u6CD5\u5B9A\u4E49\u7A0B\u5E8F\u5305: {0}"},
{"appletsecurityexception.cannotsetfactory", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u65E0\u6CD5\u8BBE\u7F6E\u5DE5\u5382"},
{"appletsecurityexception.checkmemberaccess", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u68C0\u67E5\u6210\u5458\u8BBF\u95EE\u6743\u9650"},
{"appletsecurityexception.checkgetprintjob", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "\u5B89\u5168\u5F02\u5E38\u9519\u8BEF: \u5B89\u5168\u64CD\u4F5C: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "\u7C7B\u52A0\u8F7D\u5668\u7C7B\u578B\u672A\u77E5\u3002\u65E0\u6CD5\u68C0\u67E5 getContext"},
{"appletsecurityexception.checkread.unknown", "\u7C7B\u52A0\u8F7D\u5668\u7C7B\u578B\u672A\u77E5\u3002\u65E0\u6CD5\u4E3A\u68C0\u67E5\u8BFB\u53D6\u6743\u9650{0}\u800C\u8FDB\u884C\u68C0\u67E5"},
{"appletsecurityexception.checkconnect.unknown", "\u7C7B\u52A0\u8F7D\u5668\u7C7B\u578B\u672A\u77E5\u3002\u65E0\u6CD5\u4E3A\u68C0\u67E5\u8FDE\u63A5\u800C\u8FDB\u884C\u68C0\u67E5"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_zh_HK extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "\u95DC\u9589"},
{"appletviewer.tool.title", "Applet \u6AA2\u8996\u5668: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "\u91CD\u65B0\u555F\u52D5"},
{"appletviewer.menuitem.reload", "\u91CD\u65B0\u8F09\u5165"},
{"appletviewer.menuitem.stop", "\u505C\u6B62"},
{"appletviewer.menuitem.save", "\u5132\u5B58..."},
{"appletviewer.menuitem.start", "\u555F\u52D5"},
{"appletviewer.menuitem.clone", "\u8907\u88FD..."},
{"appletviewer.menuitem.tag", "\u6A19\u8A18..."},
{"appletviewer.menuitem.info", "\u8CC7\u8A0A..."},
{"appletviewer.menuitem.edit", "\u7DE8\u8F2F"},
{"appletviewer.menuitem.encoding", "\u5B57\u5143\u7DE8\u78BC"},
{"appletviewer.menuitem.print", "\u5217\u5370..."},
{"appletviewer.menuitem.props", "\u5C6C\u6027..."},
{"appletviewer.menuitem.close", "\u95DC\u9589"},
{"appletviewer.menuitem.quit", "\u7D50\u675F"},
{"appletviewer.label.hello", "\u60A8\u597D..."},
{"appletviewer.status.start", "\u6B63\u5728\u555F\u52D5 Applet..."},
{"appletviewer.appletsave.filedialogtitle","\u5C07 Applet \u5E8F\u5217\u5316\u70BA\u6A94\u6848"},
{"appletviewer.appletsave.err1", "\u5C07 {0} \u5E8F\u5217\u5316\u70BA {1}"},
{"appletviewer.appletsave.err2", "\u5728 appletSave \u4E2D: {0}"},
{"appletviewer.applettag", "\u986F\u793A\u7684\u6A19\u8A18"},
{"appletviewer.applettag.textframe", "Applet HTML \u6A19\u8A18"},
{"appletviewer.appletinfo.applet", "-- \u7121 Applet \u8CC7\u8A0A --"},
{"appletviewer.appletinfo.param", "-- \u7121\u53C3\u6578\u8CC7\u8A0A --"},
{"appletviewer.appletinfo.textframe", "Applet \u8CC7\u8A0A"},
{"appletviewer.appletprint.fail", "\u5217\u5370\u5931\u6557\u3002"},
{"appletviewer.appletprint.finish", "\u5B8C\u6210\u5217\u5370\u3002"},
{"appletviewer.appletprint.cancel", "\u5217\u5370\u53D6\u6D88\u3002"},
{"appletviewer.appletencoding", "\u5B57\u5143\u7DE8\u78BC: {0}"},
{"appletviewer.parse.warning.requiresname", "\u8B66\u544A: <\u53C3\u6578\u540D\u7A31=... \u503C=...> \u6A19\u8A18\u9700\u8981\u540D\u7A31\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.paramoutside", "\u8B66\u544A: <param> \u6A19\u8A18\u5728 <applet> ... </applet> \u4E4B\u5916\u3002"},
{"appletviewer.parse.warning.applet.requirescode", "\u8B66\u544A: <applet> \u6A19\u8A18\u9700\u8981\u4EE3\u78BC\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.applet.requiresheight", "\u8B66\u544A: <applet> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.applet.requireswidth", "\u8B66\u544A: <applet> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.object.requirescode", "\u8B66\u544A: <object> \u6A19\u8A18\u9700\u8981\u4EE3\u78BC\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.object.requiresheight", "\u8B66\u544A: <object> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.object.requireswidth", "\u8B66\u544A: <object> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.embed.requirescode", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u4EE3\u78BC\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: \u4E0D\u518D\u652F\u63F4 <app> \u6A19\u8A18\uFF0C\u8ACB\u6539\u7528 <applet>:"},
{"appletviewer.usage", "\u7528\u6CD5: appletviewer <options> url(s)\n\n\u5176\u4E2D\u7684 <options> \u5305\u62EC:\n -debug \u5728 Java \u9664\u932F\u7A0B\u5F0F\u4E2D\u555F\u52D5 Applet \u6AA2\u8996\u5668\n -encoding <encoding> \u6307\u5B9A HTML \u6A94\u6848\u4F7F\u7528\u7684\u5B57\u5143\u7DE8\u78BC\n -J<runtime flag> \u5C07\u5F15\u6578\u50B3\u9001\u81F3 java \u89E3\u8B6F\u5668\n\n -J \u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002"},
{"appletviewer.main.err.unsupportedopt", "\u4E0D\u652F\u63F4\u7684\u9078\u9805: {0}"},
{"appletviewer.main.err.unrecognizedarg", "\u7121\u6CD5\u8FA8\u8B58\u7684\u5F15\u6578: {0}"},
{"appletviewer.main.err.dupoption", "\u91CD\u8907\u4F7F\u7528\u9078\u9805: {0}"},
{"appletviewer.main.err.inputfile", "\u672A\u6307\u5B9A\u8F38\u5165\u6A94\u6848\u3002"},
{"appletviewer.main.err.badurl", "\u932F\u8AA4\u7684 URL: {0} ( {1} )"},
{"appletviewer.main.err.io", "\u8B80\u53D6\u6642\u767C\u751F I/O \u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletviewer.main.err.readablefile", "\u78BA\u8A8D {0} \u70BA\u6A94\u6848\u4E14\u53EF\u8B80\u53D6\u3002"},
{"appletviewer.main.err.correcturl", "{0} \u662F\u5426\u70BA\u6B63\u78BA\u7684 URL\uFF1F"},
{"appletviewer.main.prop.store", "AppletViewer \u7684\u4F7F\u7528\u8005\u7279\u5B9A\u5C6C\u6027"},
{"appletviewer.main.err.prop.cantread", "\u7121\u6CD5\u8B80\u53D6\u4F7F\u7528\u8005\u5C6C\u6027\u6A94\u6848: {0}"},
{"appletviewer.main.err.prop.cantsave", "\u7121\u6CD5\u5132\u5B58\u4F7F\u7528\u8005\u5C6C\u6027\u6A94\u6848: {0}"},
{"appletviewer.main.warn.nosecmgr", "\u8B66\u544A: \u505C\u7528\u5B89\u5168\u529F\u80FD\u3002"},
{"appletviewer.main.debug.cantfinddebug", "\u627E\u4E0D\u5230\u9664\u932F\u7A0B\u5F0F\uFF01"},
{"appletviewer.main.debug.cantfindmain", "\u5728\u9664\u932F\u7A0B\u5F0F\u4E2D\u627E\u4E0D\u5230\u4E3B\u8981\u65B9\u6CD5\uFF01"},
{"appletviewer.main.debug.exceptionindebug", "\u9664\u932F\u7A0B\u5F0F\u767C\u751F\u7570\u5E38\u72C0\u6CC1\uFF01"},
{"appletviewer.main.debug.cantaccess", "\u7121\u6CD5\u5B58\u53D6\u9664\u932F\u7A0B\u5F0F\uFF01"},
{"appletviewer.main.nosecmgr", "\u8B66\u544A: \u672A\u5B89\u88DD SecurityManager\uFF01"},
{"appletviewer.main.warning", "\u8B66\u544A: \u672A\u555F\u52D5 Applet\u3002\u8ACB\u78BA\u8A8D\u8F38\u5165\u5305\u542B <applet> \u6A19\u8A18\u3002"},
{"appletviewer.main.warn.prop.overwrite", "\u8B66\u544A: \u4F9D\u7167\u4F7F\u7528\u8005\u8981\u6C42\uFF0C\u66AB\u6642\u8986\u5BEB\u7CFB\u7D71\u5C6C\u6027: \u7D22\u5F15\u9375: {0} \u820A\u503C: {1} \u65B0\u503C: {2}"},
{"appletviewer.main.warn.cantreadprops", "\u8B66\u544A: \u7121\u6CD5\u8B80\u53D6 AppletViewer \u5C6C\u6027\u6A94\u6848: {0} \u4F7F\u7528\u9810\u8A2D\u503C\u3002"},
{"appletioexception.loadclass.throw.interrupted", "\u985E\u5225\u8F09\u5165\u4E2D\u65B7: {0}"},
{"appletioexception.loadclass.throw.notloaded", "\u672A\u8F09\u5165\u985E\u5225: {0}"},
{"appletclassloader.loadcode.verbose", "\u958B\u555F {0} \u7684\u4E32\u6D41\u4EE5\u53D6\u5F97 {1}"},
{"appletclassloader.filenotfound", "\u5C0B\u627E {0} \u6642\u627E\u4E0D\u5230\u6A94\u6848"},
{"appletclassloader.fileformat", "\u8F09\u5165\u6642\u767C\u751F\u6A94\u6848\u683C\u5F0F\u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletclassloader.fileioexception", "\u8F09\u5165\u6642\u767C\u751F I/O \u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletclassloader.fileexception", "\u8F09\u5165\u6642\u767C\u751F {0} \u7570\u5E38\u72C0\u6CC1: {1}"},
{"appletclassloader.filedeath", "\u8F09\u5165\u6642\u522A\u9664 {0}: {1}"},
{"appletclassloader.fileerror", "\u8F09\u5165\u6642\u767C\u751F {0} \u932F\u8AA4: {1}"},
{"appletclassloader.findclass.verbose.openstream", "\u958B\u555F {0} \u7684\u4E32\u6D41\u4EE5\u53D6\u5F97 {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource \u7684\u540D\u7A31: {0}"},
{"appletclassloader.getresource.verbose.found", "\u627E\u5230\u8CC7\u6E90: {0} \u4F5C\u70BA\u7CFB\u7D71\u8CC7\u6E90"},
{"appletclassloader.getresourceasstream.verbose", "\u627E\u5230\u8CC7\u6E90: {0} \u4F5C\u70BA\u7CFB\u7D71\u8CC7\u6E90"},
{"appletpanel.runloader.err", "\u7269\u4EF6\u6216\u4EE3\u78BC\u53C3\u6578\uFF01"},
{"appletpanel.runloader.exception", "\u9084\u539F\u5E8F\u5217\u5316 {0} \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1"},
{"appletpanel.destroyed", "\u5DF2\u640D\u6BC0 Applet\u3002"},
{"appletpanel.loaded", "\u5DF2\u8F09\u5165 Applet\u3002"},
{"appletpanel.started", "\u5DF2\u555F\u7528 Applet\u3002"},
{"appletpanel.inited", "\u5DF2\u8D77\u59CB Applet\u3002"},
{"appletpanel.stopped", "\u5DF2\u505C\u6B62 Applet\u3002"},
{"appletpanel.disposed", "\u5DF2\u8655\u7F6E Applet\u3002"},
{"appletpanel.nocode", "APPLET \u6A19\u8A18\u907A\u6F0F CODE \u53C3\u6578\u3002"},
{"appletpanel.notfound", "\u8F09\u5165: \u627E\u4E0D\u5230\u985E\u5225 {0}\u3002"},
{"appletpanel.nocreate", "\u8F09\u5165: \u7121\u6CD5\u5EFA\u7ACB {0}\u3002"},
{"appletpanel.noconstruct", "\u8F09\u5165: {0} \u975E\u516C\u7528\u6216\u6C92\u6709\u516C\u7528\u5EFA\u69CB\u5B50\u3002"},
{"appletpanel.death", "\u5DF2\u522A\u9664"},
{"appletpanel.exception", "\u7570\u5E38\u72C0\u6CC1: {0}\u3002"},
{"appletpanel.exception2", "\u7570\u5E38\u72C0\u6CC1: {0}: {1}\u3002"},
{"appletpanel.error", "\u932F\u8AA4: {0}\u3002"},
{"appletpanel.error2", "\u932F\u8AA4: {0}: {1}\u3002"},
{"appletpanel.notloaded", "\u8D77\u59CB: \u672A\u8F09\u5165 Applet\u3002"},
{"appletpanel.notinited", "\u555F\u52D5: \u672A\u8D77\u59CB Applet\u3002"},
{"appletpanel.notstarted", "\u505C\u6B62: \u672A\u555F\u52D5 Applet\u3002"},
{"appletpanel.notstopped", "\u640D\u6BC0: \u672A\u505C\u6B62 Applet\u3002"},
{"appletpanel.notdestroyed", "\u8655\u7F6E: \u672A\u640D\u6BC0 Applet\u3002"},
{"appletpanel.notdisposed", "\u8F09\u5165: \u672A\u8655\u7F6E Applet\u3002"},
{"appletpanel.bail", "\u5DF2\u4E2D\u65B7: \u6B63\u5728\u7D50\u675F\u3002"},
{"appletpanel.filenotfound", "\u5C0B\u627E {0} \u6642\u627E\u4E0D\u5230\u6A94\u6848"},
{"appletpanel.fileformat", "\u8F09\u5165\u6642\u767C\u751F\u6A94\u6848\u683C\u5F0F\u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletpanel.fileioexception", "\u8F09\u5165\u6642\u767C\u751F I/O \u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletpanel.fileexception", "\u8F09\u5165\u6642\u767C\u751F {0} \u7570\u5E38\u72C0\u6CC1: {1}"},
{"appletpanel.filedeath", "\u8F09\u5165\u6642\u522A\u9664 {0}: {1}"},
{"appletpanel.fileerror", "\u8F09\u5165\u6642\u767C\u751F {0} \u932F\u8AA4: {1}"},
{"appletpanel.badattribute.exception", "HTML \u5256\u6790: \u5BEC\u5EA6/\u9AD8\u5EA6\u5C6C\u6027\u7684\u503C\u4E0D\u6B63\u78BA"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream \u9700\u8981\u975E\u7A7A\u503C\u8F09\u5165\u5668"},
{"appletprops.title", "AppletViewer \u5C6C\u6027"},
{"appletprops.label.http.server", "Http \u4EE3\u7406\u4E3B\u6A5F\u4F3A\u670D\u5668:"},
{"appletprops.label.http.proxy", "Http \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0:"},
{"appletprops.label.network", "\u7DB2\u8DEF\u5B58\u53D6:"},
{"appletprops.choice.network.item.none", "\u7121"},
{"appletprops.choice.network.item.applethost", "Applet \u4E3B\u6A5F"},
{"appletprops.choice.network.item.unrestricted", "\u4E0D\u53D7\u9650\u5236"},
{"appletprops.label.class", "\u985E\u5225\u5B58\u53D6:"},
{"appletprops.choice.class.item.restricted", "\u53D7\u9650\u5236"},
{"appletprops.choice.class.item.unrestricted", "\u4E0D\u53D7\u9650\u5236"},
{"appletprops.label.unsignedapplet", "\u5141\u8A31\u672A\u7C3D\u7F72\u7684 Applet:"},
{"appletprops.choice.unsignedapplet.no", "\u5426"},
{"appletprops.choice.unsignedapplet.yes", "\u662F"},
{"appletprops.button.apply", "\u5957\u7528"},
{"appletprops.button.cancel", "\u53D6\u6D88"},
{"appletprops.button.reset", "\u91CD\u8A2D"},
{"appletprops.apply.exception", "\u7121\u6CD5\u5132\u5B58\u5C6C\u6027: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "\u7121\u6548\u7684\u9805\u76EE"},
{"appletprops.label.invalidproxy", "\u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0\u5FC5\u9808\u662F\u6B63\u6574\u6578\u503C\u3002"},
{"appletprops.button.ok", "\u78BA\u5B9A"},
/* end 4066432 */
{"appletprops.prop.store", "AppletViewer \u7684\u4F7F\u7528\u8005\u7279\u5B9A\u5C6C\u6027"},
{"appletsecurityexception.checkcreateclassloader", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: classloader"},
{"appletsecurityexception.checkaccess.thread", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: thread"},
{"appletsecurityexception.checkaccess.threadgroup", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: threadgroup: {0}"},
{"appletsecurityexception.checkexit", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: exit: {0}"},
{"appletsecurityexception.checkexec", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: exec: {0}"},
{"appletsecurityexception.checklink", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: link: {0}"},
{"appletsecurityexception.checkpropsaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u5C6C\u6027"},
{"appletsecurityexception.checkpropsaccess.key", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u5C6C\u6027\u5B58\u53D6 {0}"},
{"appletsecurityexception.checkread.exception1", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: {0}\uFF0C{1}"},
{"appletsecurityexception.checkread.exception2", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: file.read: {0}"},
{"appletsecurityexception.checkread", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: {0}\uFF0C{1}"},
{"appletsecurityexception.checkwrite", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: fd.read"},
{"appletsecurityexception.checkwrite.fd", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: fd.write"},
{"appletsecurityexception.checklisten", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u5F9E\u4F86\u6E90 {1} \u9023\u7DDA\u81F3 {0}\u3002"},
{"appletsecurityexception.checkconnect.networkhost2", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u89E3\u6790\u4E3B\u6A5F {0} \u6216 {1} \u7684 IP\u3002"},
{"appletsecurityexception.checkconnect.networkhost3", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u89E3\u6790\u4E3B\u6A5F {0} \u7684 IP\u3002\u8ACB\u53C3\u95B1 trustProxy \u5C6C\u6027\u3002"},
{"appletsecurityexception.checkconnect", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: connect: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u5B58\u53D6\u5957\u88DD\u7A0B\u5F0F: {0}"},
{"appletsecurityexception.checkpackagedefinition", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u5B9A\u7FA9\u5957\u88DD\u7A0B\u5F0F: {0}"},
{"appletsecurityexception.cannotsetfactory", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u8A2D\u5B9A\u8655\u7406\u7AD9"},
{"appletsecurityexception.checkmemberaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u6AA2\u67E5\u6210\u54E1\u5B58\u53D6"},
{"appletsecurityexception.checkgetprintjob", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u5B89\u5168\u4F5C\u696D: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "\u4E0D\u660E\u7684\u985E\u5225\u8F09\u5165\u5668\u985E\u578B\u3002\u7121\u6CD5\u6AA2\u67E5 getContext"},
{"appletsecurityexception.checkread.unknown", "\u4E0D\u660E\u7684\u985E\u5225\u8F09\u5165\u5668\u985E\u578B\u3002\u7121\u6CD5\u6AA2\u67E5 read {0}"},
{"appletsecurityexception.checkconnect.unknown", "\u4E0D\u660E\u7684\u985E\u5225\u8F09\u5165\u5668\u985E\u578B\u3002\u7121\u6CD5\u6AA2\u67E5\u9023\u7DDA"},
};
return temp;
}
}

View File

@@ -0,0 +1,202 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.applet.resources;
import java.util.ListResourceBundle;
public class MsgAppletViewer_zh_TW extends ListResourceBundle {
public Object[][] getContents() {
Object[][] temp = new Object[][] {
{"textframe.button.dismiss", "\u95DC\u9589"},
{"appletviewer.tool.title", "Applet \u6AA2\u8996\u5668: {0}"},
{"appletviewer.menu.applet", "Applet"},
{"appletviewer.menuitem.restart", "\u91CD\u65B0\u555F\u52D5"},
{"appletviewer.menuitem.reload", "\u91CD\u65B0\u8F09\u5165"},
{"appletviewer.menuitem.stop", "\u505C\u6B62"},
{"appletviewer.menuitem.save", "\u5132\u5B58..."},
{"appletviewer.menuitem.start", "\u555F\u52D5"},
{"appletviewer.menuitem.clone", "\u8907\u88FD..."},
{"appletviewer.menuitem.tag", "\u6A19\u8A18..."},
{"appletviewer.menuitem.info", "\u8CC7\u8A0A..."},
{"appletviewer.menuitem.edit", "\u7DE8\u8F2F"},
{"appletviewer.menuitem.encoding", "\u5B57\u5143\u7DE8\u78BC"},
{"appletviewer.menuitem.print", "\u5217\u5370..."},
{"appletviewer.menuitem.props", "\u5C6C\u6027..."},
{"appletviewer.menuitem.close", "\u95DC\u9589"},
{"appletviewer.menuitem.quit", "\u7D50\u675F"},
{"appletviewer.label.hello", "\u60A8\u597D..."},
{"appletviewer.status.start", "\u6B63\u5728\u555F\u52D5 Applet..."},
{"appletviewer.appletsave.filedialogtitle","\u5C07 Applet \u5E8F\u5217\u5316\u70BA\u6A94\u6848"},
{"appletviewer.appletsave.err1", "\u5C07 {0} \u5E8F\u5217\u5316\u70BA {1}"},
{"appletviewer.appletsave.err2", "\u5728 appletSave \u4E2D: {0}"},
{"appletviewer.applettag", "\u986F\u793A\u7684\u6A19\u8A18"},
{"appletviewer.applettag.textframe", "Applet HTML \u6A19\u8A18"},
{"appletviewer.appletinfo.applet", "-- \u7121 Applet \u8CC7\u8A0A --"},
{"appletviewer.appletinfo.param", "-- \u7121\u53C3\u6578\u8CC7\u8A0A --"},
{"appletviewer.appletinfo.textframe", "Applet \u8CC7\u8A0A"},
{"appletviewer.appletprint.fail", "\u5217\u5370\u5931\u6557\u3002"},
{"appletviewer.appletprint.finish", "\u5B8C\u6210\u5217\u5370\u3002"},
{"appletviewer.appletprint.cancel", "\u5217\u5370\u53D6\u6D88\u3002"},
{"appletviewer.appletencoding", "\u5B57\u5143\u7DE8\u78BC: {0}"},
{"appletviewer.parse.warning.requiresname", "\u8B66\u544A: <\u53C3\u6578\u540D\u7A31=... \u503C=...> \u6A19\u8A18\u9700\u8981\u540D\u7A31\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.paramoutside", "\u8B66\u544A: <param> \u6A19\u8A18\u5728 <applet> ... </applet> \u4E4B\u5916\u3002"},
{"appletviewer.parse.warning.applet.requirescode", "\u8B66\u544A: <applet> \u6A19\u8A18\u9700\u8981\u4EE3\u78BC\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.applet.requiresheight", "\u8B66\u544A: <applet> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.applet.requireswidth", "\u8B66\u544A: <applet> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.object.requirescode", "\u8B66\u544A: <object> \u6A19\u8A18\u9700\u8981\u4EE3\u78BC\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.object.requiresheight", "\u8B66\u544A: <object> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.object.requireswidth", "\u8B66\u544A: <object> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.embed.requirescode", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u4EE3\u78BC\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
{"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: \u4E0D\u518D\u652F\u63F4 <app> \u6A19\u8A18\uFF0C\u8ACB\u6539\u7528 <applet>:"},
{"appletviewer.usage", "\u7528\u6CD5: appletviewer <options> url(s)\n\n\u5176\u4E2D\u7684 <options> \u5305\u62EC:\n -debug \u5728 Java \u9664\u932F\u7A0B\u5F0F\u4E2D\u555F\u52D5 Applet \u6AA2\u8996\u5668\n -encoding <encoding> \u6307\u5B9A HTML \u6A94\u6848\u4F7F\u7528\u7684\u5B57\u5143\u7DE8\u78BC\n -J<runtime flag> \u5C07\u5F15\u6578\u50B3\u9001\u81F3 java \u89E3\u8B6F\u5668\n\n -J \u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002"},
{"appletviewer.main.err.unsupportedopt", "\u4E0D\u652F\u63F4\u7684\u9078\u9805: {0}"},
{"appletviewer.main.err.unrecognizedarg", "\u7121\u6CD5\u8FA8\u8B58\u7684\u5F15\u6578: {0}"},
{"appletviewer.main.err.dupoption", "\u91CD\u8907\u4F7F\u7528\u9078\u9805: {0}"},
{"appletviewer.main.err.inputfile", "\u672A\u6307\u5B9A\u8F38\u5165\u6A94\u6848\u3002"},
{"appletviewer.main.err.badurl", "\u932F\u8AA4\u7684 URL: {0} ( {1} )"},
{"appletviewer.main.err.io", "\u8B80\u53D6\u6642\u767C\u751F I/O \u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletviewer.main.err.readablefile", "\u78BA\u8A8D {0} \u70BA\u6A94\u6848\u4E14\u53EF\u8B80\u53D6\u3002"},
{"appletviewer.main.err.correcturl", "{0} \u662F\u5426\u70BA\u6B63\u78BA\u7684 URL\uFF1F"},
{"appletviewer.main.prop.store", "AppletViewer \u7684\u4F7F\u7528\u8005\u7279\u5B9A\u5C6C\u6027"},
{"appletviewer.main.err.prop.cantread", "\u7121\u6CD5\u8B80\u53D6\u4F7F\u7528\u8005\u5C6C\u6027\u6A94\u6848: {0}"},
{"appletviewer.main.err.prop.cantsave", "\u7121\u6CD5\u5132\u5B58\u4F7F\u7528\u8005\u5C6C\u6027\u6A94\u6848: {0}"},
{"appletviewer.main.warn.nosecmgr", "\u8B66\u544A: \u505C\u7528\u5B89\u5168\u529F\u80FD\u3002"},
{"appletviewer.main.debug.cantfinddebug", "\u627E\u4E0D\u5230\u9664\u932F\u7A0B\u5F0F\uFF01"},
{"appletviewer.main.debug.cantfindmain", "\u5728\u9664\u932F\u7A0B\u5F0F\u4E2D\u627E\u4E0D\u5230\u4E3B\u8981\u65B9\u6CD5\uFF01"},
{"appletviewer.main.debug.exceptionindebug", "\u9664\u932F\u7A0B\u5F0F\u767C\u751F\u7570\u5E38\u72C0\u6CC1\uFF01"},
{"appletviewer.main.debug.cantaccess", "\u7121\u6CD5\u5B58\u53D6\u9664\u932F\u7A0B\u5F0F\uFF01"},
{"appletviewer.main.nosecmgr", "\u8B66\u544A: \u672A\u5B89\u88DD SecurityManager\uFF01"},
{"appletviewer.main.warning", "\u8B66\u544A: \u672A\u555F\u52D5 Applet\u3002\u8ACB\u78BA\u8A8D\u8F38\u5165\u5305\u542B <applet> \u6A19\u8A18\u3002"},
{"appletviewer.main.warn.prop.overwrite", "\u8B66\u544A: \u4F9D\u7167\u4F7F\u7528\u8005\u8981\u6C42\uFF0C\u66AB\u6642\u8986\u5BEB\u7CFB\u7D71\u5C6C\u6027: \u7D22\u5F15\u9375: {0} \u820A\u503C: {1} \u65B0\u503C: {2}"},
{"appletviewer.main.warn.cantreadprops", "\u8B66\u544A: \u7121\u6CD5\u8B80\u53D6 AppletViewer \u5C6C\u6027\u6A94\u6848: {0} \u4F7F\u7528\u9810\u8A2D\u503C\u3002"},
{"appletioexception.loadclass.throw.interrupted", "\u985E\u5225\u8F09\u5165\u4E2D\u65B7: {0}"},
{"appletioexception.loadclass.throw.notloaded", "\u672A\u8F09\u5165\u985E\u5225: {0}"},
{"appletclassloader.loadcode.verbose", "\u958B\u555F {0} \u7684\u4E32\u6D41\u4EE5\u53D6\u5F97 {1}"},
{"appletclassloader.filenotfound", "\u5C0B\u627E {0} \u6642\u627E\u4E0D\u5230\u6A94\u6848"},
{"appletclassloader.fileformat", "\u8F09\u5165\u6642\u767C\u751F\u6A94\u6848\u683C\u5F0F\u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletclassloader.fileioexception", "\u8F09\u5165\u6642\u767C\u751F I/O \u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletclassloader.fileexception", "\u8F09\u5165\u6642\u767C\u751F {0} \u7570\u5E38\u72C0\u6CC1: {1}"},
{"appletclassloader.filedeath", "\u8F09\u5165\u6642\u522A\u9664 {0}: {1}"},
{"appletclassloader.fileerror", "\u8F09\u5165\u6642\u767C\u751F {0} \u932F\u8AA4: {1}"},
{"appletclassloader.findclass.verbose.openstream", "\u958B\u555F {0} \u7684\u4E32\u6D41\u4EE5\u53D6\u5F97 {1}"},
{"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource \u7684\u540D\u7A31: {0}"},
{"appletclassloader.getresource.verbose.found", "\u627E\u5230\u8CC7\u6E90: {0} \u4F5C\u70BA\u7CFB\u7D71\u8CC7\u6E90"},
{"appletclassloader.getresourceasstream.verbose", "\u627E\u5230\u8CC7\u6E90: {0} \u4F5C\u70BA\u7CFB\u7D71\u8CC7\u6E90"},
{"appletpanel.runloader.err", "\u7269\u4EF6\u6216\u4EE3\u78BC\u53C3\u6578\uFF01"},
{"appletpanel.runloader.exception", "\u9084\u539F\u5E8F\u5217\u5316 {0} \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1"},
{"appletpanel.destroyed", "\u5DF2\u640D\u6BC0 Applet\u3002"},
{"appletpanel.loaded", "\u5DF2\u8F09\u5165 Applet\u3002"},
{"appletpanel.started", "\u5DF2\u555F\u7528 Applet\u3002"},
{"appletpanel.inited", "\u5DF2\u8D77\u59CB Applet\u3002"},
{"appletpanel.stopped", "\u5DF2\u505C\u6B62 Applet\u3002"},
{"appletpanel.disposed", "\u5DF2\u8655\u7F6E Applet\u3002"},
{"appletpanel.nocode", "APPLET \u6A19\u8A18\u907A\u6F0F CODE \u53C3\u6578\u3002"},
{"appletpanel.notfound", "\u8F09\u5165: \u627E\u4E0D\u5230\u985E\u5225 {0}\u3002"},
{"appletpanel.nocreate", "\u8F09\u5165: \u7121\u6CD5\u5EFA\u7ACB {0}\u3002"},
{"appletpanel.noconstruct", "\u8F09\u5165: {0} \u975E\u516C\u7528\u6216\u6C92\u6709\u516C\u7528\u5EFA\u69CB\u5B50\u3002"},
{"appletpanel.death", "\u5DF2\u522A\u9664"},
{"appletpanel.exception", "\u7570\u5E38\u72C0\u6CC1: {0}\u3002"},
{"appletpanel.exception2", "\u7570\u5E38\u72C0\u6CC1: {0}: {1}\u3002"},
{"appletpanel.error", "\u932F\u8AA4: {0}\u3002"},
{"appletpanel.error2", "\u932F\u8AA4: {0}: {1}\u3002"},
{"appletpanel.notloaded", "\u8D77\u59CB: \u672A\u8F09\u5165 Applet\u3002"},
{"appletpanel.notinited", "\u555F\u52D5: \u672A\u8D77\u59CB Applet\u3002"},
{"appletpanel.notstarted", "\u505C\u6B62: \u672A\u555F\u52D5 Applet\u3002"},
{"appletpanel.notstopped", "\u640D\u6BC0: \u672A\u505C\u6B62 Applet\u3002"},
{"appletpanel.notdestroyed", "\u8655\u7F6E: \u672A\u640D\u6BC0 Applet\u3002"},
{"appletpanel.notdisposed", "\u8F09\u5165: \u672A\u8655\u7F6E Applet\u3002"},
{"appletpanel.bail", "\u5DF2\u4E2D\u65B7: \u6B63\u5728\u7D50\u675F\u3002"},
{"appletpanel.filenotfound", "\u5C0B\u627E {0} \u6642\u627E\u4E0D\u5230\u6A94\u6848"},
{"appletpanel.fileformat", "\u8F09\u5165\u6642\u767C\u751F\u6A94\u6848\u683C\u5F0F\u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletpanel.fileioexception", "\u8F09\u5165\u6642\u767C\u751F I/O \u7570\u5E38\u72C0\u6CC1: {0}"},
{"appletpanel.fileexception", "\u8F09\u5165\u6642\u767C\u751F {0} \u7570\u5E38\u72C0\u6CC1: {1}"},
{"appletpanel.filedeath", "\u8F09\u5165\u6642\u522A\u9664 {0}: {1}"},
{"appletpanel.fileerror", "\u8F09\u5165\u6642\u767C\u751F {0} \u932F\u8AA4: {1}"},
{"appletpanel.badattribute.exception", "HTML \u5256\u6790: \u5BEC\u5EA6/\u9AD8\u5EA6\u5C6C\u6027\u7684\u503C\u4E0D\u6B63\u78BA"},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream \u9700\u8981\u975E\u7A7A\u503C\u8F09\u5165\u5668"},
{"appletprops.title", "AppletViewer \u5C6C\u6027"},
{"appletprops.label.http.server", "Http \u4EE3\u7406\u4E3B\u6A5F\u4F3A\u670D\u5668:"},
{"appletprops.label.http.proxy", "Http \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0:"},
{"appletprops.label.network", "\u7DB2\u8DEF\u5B58\u53D6:"},
{"appletprops.choice.network.item.none", "\u7121"},
{"appletprops.choice.network.item.applethost", "Applet \u4E3B\u6A5F"},
{"appletprops.choice.network.item.unrestricted", "\u4E0D\u53D7\u9650\u5236"},
{"appletprops.label.class", "\u985E\u5225\u5B58\u53D6:"},
{"appletprops.choice.class.item.restricted", "\u53D7\u9650\u5236"},
{"appletprops.choice.class.item.unrestricted", "\u4E0D\u53D7\u9650\u5236"},
{"appletprops.label.unsignedapplet", "\u5141\u8A31\u672A\u7C3D\u7F72\u7684 Applet:"},
{"appletprops.choice.unsignedapplet.no", "\u5426"},
{"appletprops.choice.unsignedapplet.yes", "\u662F"},
{"appletprops.button.apply", "\u5957\u7528"},
{"appletprops.button.cancel", "\u53D6\u6D88"},
{"appletprops.button.reset", "\u91CD\u8A2D"},
{"appletprops.apply.exception", "\u7121\u6CD5\u5132\u5B58\u5C6C\u6027: {0}"},
/* 4066432 */
{"appletprops.title.invalidproxy", "\u7121\u6548\u7684\u9805\u76EE"},
{"appletprops.label.invalidproxy", "\u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0\u5FC5\u9808\u662F\u6B63\u6574\u6578\u503C\u3002"},
{"appletprops.button.ok", "\u78BA\u5B9A"},
/* end 4066432 */
{"appletprops.prop.store", "AppletViewer \u7684\u4F7F\u7528\u8005\u7279\u5B9A\u5C6C\u6027"},
{"appletsecurityexception.checkcreateclassloader", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: classloader"},
{"appletsecurityexception.checkaccess.thread", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: thread"},
{"appletsecurityexception.checkaccess.threadgroup", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: threadgroup: {0}"},
{"appletsecurityexception.checkexit", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: exit: {0}"},
{"appletsecurityexception.checkexec", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: exec: {0}"},
{"appletsecurityexception.checklink", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: link: {0}"},
{"appletsecurityexception.checkpropsaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u5C6C\u6027"},
{"appletsecurityexception.checkpropsaccess.key", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u5C6C\u6027\u5B58\u53D6 {0}"},
{"appletsecurityexception.checkread.exception1", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: {0}\uFF0C{1}"},
{"appletsecurityexception.checkread.exception2", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: file.read: {0}"},
{"appletsecurityexception.checkread", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: file.read: {0} == {1}"},
{"appletsecurityexception.checkwrite.exception", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: {0}\uFF0C{1}"},
{"appletsecurityexception.checkwrite", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: file.write: {0} == {1}"},
{"appletsecurityexception.checkread.fd", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: fd.read"},
{"appletsecurityexception.checkwrite.fd", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: fd.write"},
{"appletsecurityexception.checklisten", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: socket.listen: {0}"},
{"appletsecurityexception.checkaccept", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: socket.accept: {0}:{1}"},
{"appletsecurityexception.checkconnect.networknone", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: socket.connect: {0}->{1}"},
{"appletsecurityexception.checkconnect.networkhost1", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u5F9E\u4F86\u6E90 {1} \u9023\u7DDA\u81F3 {0}\u3002"},
{"appletsecurityexception.checkconnect.networkhost2", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u89E3\u6790\u4E3B\u6A5F {0} \u6216 {1} \u7684 IP\u3002"},
{"appletsecurityexception.checkconnect.networkhost3", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u89E3\u6790\u4E3B\u6A5F {0} \u7684 IP\u3002\u8ACB\u53C3\u95B1 trustProxy \u5C6C\u6027\u3002"},
{"appletsecurityexception.checkconnect", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: connect: {0}->{1}"},
{"appletsecurityexception.checkpackageaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u5B58\u53D6\u5957\u88DD\u7A0B\u5F0F: {0}"},
{"appletsecurityexception.checkpackagedefinition", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u5B9A\u7FA9\u5957\u88DD\u7A0B\u5F0F: {0}"},
{"appletsecurityexception.cannotsetfactory", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u7121\u6CD5\u8A2D\u5B9A\u8655\u7406\u7AD9"},
{"appletsecurityexception.checkmemberaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u6AA2\u67E5\u6210\u54E1\u5B58\u53D6"},
{"appletsecurityexception.checkgetprintjob", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: getPrintJob"},
{"appletsecurityexception.checksystemclipboardaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: getSystemClipboard"},
{"appletsecurityexception.checkawteventqueueaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "\u5B89\u5168\u7570\u5E38\u72C0\u6CC1: \u5B89\u5168\u4F5C\u696D: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "\u4E0D\u660E\u7684\u985E\u5225\u8F09\u5165\u5668\u985E\u578B\u3002\u7121\u6CD5\u6AA2\u67E5 getContext"},
{"appletsecurityexception.checkread.unknown", "\u4E0D\u660E\u7684\u985E\u5225\u8F09\u5165\u5668\u985E\u578B\u3002\u7121\u6CD5\u6AA2\u67E5 read {0}"},
{"appletsecurityexception.checkconnect.unknown", "\u4E0D\u660E\u7684\u985E\u5225\u8F09\u5165\u5668\u985E\u578B\u3002\u7121\u6CD5\u6AA2\u67E5\u9023\u7DDA"},
};
return temp;
}
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.*;
import java.util.Arrays;
import javax.sound.sampled.*;
/**
* A clip of audio data. This data can be used to construct an
* AudioDataStream, which can be played. <p>
*
* @author Arthur van Hoff
* @author Kara Kytle
* @see AudioDataStream
* @see AudioPlayer
*/
/*
* the idea here is that the AudioData object encapsulates the
* data you need to play an audio clip based on a defined set
* of data. to do this, you require the audio data (a byte
* array rather than an arbitrary input stream) and a format
* object.
*/
public final class AudioData {
private static final AudioFormat DEFAULT_FORMAT =
new AudioFormat(AudioFormat.Encoding.ULAW,
8000, // sample rate
8, // sample size in bits
1, // channels
1, // frame size in bytes
8000, // frame rate
true ); // bigendian (irrelevant for 8-bit data)
AudioFormat format; // carry forth the format array amusement
byte buffer[];
/**
* Constructor
*/
public AudioData(final byte[] buffer) {
// if we cannot extract valid format information, we resort to assuming
// the data will be 8k mono u-law in order to provide maximal backwards
// compatibility....
this(DEFAULT_FORMAT, buffer);
// okay, we need to extract the format and the byte buffer of data
try {
AudioInputStream ais = AudioSystem.getAudioInputStream(new ByteArrayInputStream(buffer));
this.format = ais.getFormat();
ais.close();
// $$fb 2002-10-27: buffer contains the file header now!
} catch (IOException e) {
// use default format
} catch (UnsupportedAudioFileException e1 ) {
// use default format
}
}
/**
* Non-public constructor; this is the one we use in ADS and CADS
* constructors.
*/
AudioData(final AudioFormat format, final byte[] buffer) {
this.format = format;
if (buffer != null) {
this.buffer = Arrays.copyOf(buffer, buffer.length);
}
}
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.*;
/**
* An input stream to play AudioData.
*
* @see AudioPlayer
* @see AudioData
* @author Arthur van Hoff
* @author Kara Kytle
*/
public class AudioDataStream extends ByteArrayInputStream {
private final AudioData ad;
/**
* Constructor
*/
public AudioDataStream(final AudioData data) {
super(data.buffer);
this.ad = data;
}
final AudioData getAudioData() {
return ad;
}
}

View File

@@ -0,0 +1,425 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.util.Hashtable;
import java.util.Vector;
import java.io.IOException;
import java.io.InputStream;
import java.io.BufferedInputStream;
import javax.sound.sampled.*;
import javax.sound.midi.*;
import com.sun.media.sound.DataPusher;
import com.sun.media.sound.Toolkit;
/**
* This class provides an interface to the Headspace Audio engine through
* the Java Sound API.
*
* This class emulates systems with multiple audio channels, mixing
* multiple streams for the workstation's single-channel device.
*
* @see AudioData
* @see AudioDataStream
* @see AudioStream
* @see AudioStreamSequence
* @see ContinuousAudioDataStream
* @author David Rivas
* @author Kara Kytle
* @author Jan Borgersen
* @author Florian Bomers
*/
public final class AudioDevice {
private boolean DEBUG = false /*true*/ ;
/** Hashtable of audio clips / input streams. */
private Hashtable clipStreams;
private Vector infos;
/** Are we currently playing audio? */
private boolean playing = false;
/** Handle to the JS audio mixer. */
private Mixer mixer = null;
/**
* The default audio player. This audio player is initialized
* automatically.
*/
public static final AudioDevice device = new AudioDevice();
/**
* Create an AudioDevice instance.
*/
private AudioDevice() {
clipStreams = new Hashtable();
infos = new Vector();
}
private synchronized void startSampled( AudioInputStream as,
InputStream in ) throws UnsupportedAudioFileException,
LineUnavailableException {
Info info = null;
DataPusher datapusher = null;
DataLine.Info lineinfo = null;
SourceDataLine sourcedataline = null;
// if ALAW or ULAW, we must convert....
as = Toolkit.getPCMConvertedAudioInputStream(as);
if( as==null ) {
// could not convert
return;
}
lineinfo = new DataLine.Info(SourceDataLine.class,
as.getFormat());
if( !(AudioSystem.isLineSupported(lineinfo))) {
return;
}
sourcedataline = (SourceDataLine)AudioSystem.getLine(lineinfo);
datapusher = new DataPusher(sourcedataline, as);
info = new Info( null, in, datapusher );
infos.addElement( info );
datapusher.start();
}
private synchronized void startMidi( InputStream bis,
InputStream in ) throws InvalidMidiDataException,
MidiUnavailableException {
Sequencer sequencer = null;
Info info = null;
sequencer = MidiSystem.getSequencer( );
sequencer.open();
try {
sequencer.setSequence( bis );
} catch( IOException e ) {
throw new InvalidMidiDataException( e.getMessage() );
}
info = new Info( sequencer, in, null );
infos.addElement( info );
// fix for bug 4302884: Audio device is not released when AudioClip stops
sequencer.addMetaEventListener(info);
sequencer.start();
}
/**
* Open an audio channel.
*/
public synchronized void openChannel(InputStream in) {
if(DEBUG) {
System.out.println("AudioDevice: openChannel");
System.out.println("input stream =" + in);
}
Info info = null;
// is this already playing? if so, then just return
for(int i=0; i<infos.size(); i++) {
info = (AudioDevice.Info)infos.elementAt(i);
if( info.in == in ) {
return;
}
}
AudioInputStream as = null;
if( in instanceof AudioStream ) {
if ( ((AudioStream)in).midiformat != null ) {
// it's a midi file
try {
startMidi( ((AudioStream)in).stream, in );
} catch (Exception e) {
return;
}
} else if( ((AudioStream)in).ais != null ) {
// it's sampled audio
try {
startSampled( ((AudioStream)in).ais, in );
} catch (Exception e) {
return;
}
}
} else if (in instanceof AudioDataStream ) {
if (in instanceof ContinuousAudioDataStream) {
try {
AudioInputStream ais = new AudioInputStream(in,
((AudioDataStream)in).getAudioData().format,
AudioSystem.NOT_SPECIFIED);
startSampled(ais, in );
} catch (Exception e) {
return;
}
}
else {
try {
AudioInputStream ais = new AudioInputStream(in,
((AudioDataStream)in).getAudioData().format,
((AudioDataStream)in).getAudioData().buffer.length);
startSampled(ais, in );
} catch (Exception e) {
return;
}
}
} else {
BufferedInputStream bis = new BufferedInputStream( in, 1024 );
try {
try {
as = AudioSystem.getAudioInputStream(bis);
} catch(IOException ioe) {
return;
}
startSampled( as, in );
} catch( UnsupportedAudioFileException e ) {
try {
try {
MidiFileFormat mff =
MidiSystem.getMidiFileFormat( bis );
} catch(IOException ioe1) {
return;
}
startMidi( bis, in );
} catch( InvalidMidiDataException e1 ) {
// $$jb:08.01.99: adding this section to make some of our other
// legacy classes work.....
// not MIDI either, special case handling for all others
AudioFormat defformat = new AudioFormat( AudioFormat.Encoding.ULAW,
8000, 8, 1, 1, 8000, true );
try {
AudioInputStream defaif = new AudioInputStream( bis,
defformat, AudioSystem.NOT_SPECIFIED);
startSampled( defaif, in );
} catch (UnsupportedAudioFileException es) {
return;
} catch (LineUnavailableException es2) {
return;
}
} catch( MidiUnavailableException e2 ) {
// could not open sequence
return;
}
} catch( LineUnavailableException e ) {
return;
}
}
// don't forget adjust for a new stream.
notify();
}
/**
* Close an audio channel.
*/
public synchronized void closeChannel(InputStream in) {
if(DEBUG) {
System.out.println("AudioDevice.closeChannel");
}
if (in == null) return; // can't go anywhere here!
Info info;
for(int i=0; i<infos.size(); i++) {
info = (AudioDevice.Info)infos.elementAt(i);
if( info.in == in ) {
if( info.sequencer != null ) {
info.sequencer.stop();
//info.sequencer.close();
infos.removeElement( info );
} else if( info.datapusher != null ) {
info.datapusher.stop();
infos.removeElement( info );
}
}
}
notify();
}
/**
* Open the device (done automatically)
*/
public synchronized void open() {
// $$jb: 06.24.99: This is done on a per-stream
// basis using the new JS API now.
}
/**
* Close the device (done automatically)
*/
public synchronized void close() {
// $$jb: 06.24.99: This is done on a per-stream
// basis using the new JS API now.
}
/**
* Play open audio stream(s)
*/
public void play() {
// $$jb: 06.24.99: Holdover from old architechture ...
// we now open/close the devices as needed on a per-stream
// basis using the JavaSound API.
if (DEBUG) {
System.out.println("exiting play()");
}
}
/**
* Close streams
*/
public synchronized void closeStreams() {
Info info;
for(int i=0; i<infos.size(); i++) {
info = (AudioDevice.Info)infos.elementAt(i);
if( info.sequencer != null ) {
info.sequencer.stop();
info.sequencer.close();
infos.removeElement( info );
} else if( info.datapusher != null ) {
info.datapusher.stop();
infos.removeElement( info );
}
}
if (DEBUG) {
System.err.println("Audio Device: Streams all closed.");
}
// Empty the hash table.
clipStreams = new Hashtable();
infos = new Vector();
}
/**
* Number of channels currently open.
*/
public int openChannels() {
return infos.size();
}
/**
* Make the debug info print out.
*/
void setVerbose(boolean v) {
DEBUG = v;
}
// INFO CLASS
final class Info implements MetaEventListener {
final Sequencer sequencer;
final InputStream in;
final DataPusher datapusher;
Info( Sequencer sequencer, InputStream in, DataPusher datapusher ) {
this.sequencer = sequencer;
this.in = in;
this.datapusher = datapusher;
}
public void meta(MetaMessage event) {
if (event.getType() == 47 && sequencer != null) {
sequencer.close();
}
}
}
}

View File

@@ -0,0 +1,188 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.InputStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* This class provides an interface to play audio streams.
*
* To play an audio stream use:
* <pre>
* AudioPlayer.player.start(audiostream);
* </pre>
* To stop playing an audio stream use:
* <pre>
* AudioPlayer.player.stop(audiostream);
* </pre>
* To play an audio stream from a URL use:
* <pre>
* AudioStream audiostream = new AudioStream(url.openStream());
* AudioPlayer.player.start(audiostream);
* </pre>
* To play a continuous sound you first have to
* create an AudioData instance and use it to construct a
* ContinuousAudioDataStream.
* For example:
* <pre>
* AudioData data = new AudioStream(url.openStream()).getData();
* ContinuousAudioDataStream audiostream = new ContinuousAudioDataStream(data);
* AudioPlayer.player.start(audiostream);
* </pre>
*
* @see AudioData
* @see AudioDataStream
* @see AudioDevice
* @see AudioStream
* @author Arthur van Hoff, Thomas Ball
*/
public final class AudioPlayer extends Thread {
private final AudioDevice devAudio;
private final static boolean DEBUG = false /*true*/;
/**
* The default audio player. This audio player is initialized
* automatically.
*/
public static final AudioPlayer player = getAudioPlayer();
private static ThreadGroup getAudioThreadGroup() {
if(DEBUG) { System.out.println("AudioPlayer.getAudioThreadGroup()"); }
ThreadGroup g = currentThread().getThreadGroup();
while ((g.getParent() != null) &&
(g.getParent().getParent() != null)) {
g = g.getParent();
}
return g;
}
/**
* Create an AudioPlayer thread in a privileged block.
*/
private static AudioPlayer getAudioPlayer() {
if(DEBUG) { System.out.println("> AudioPlayer.getAudioPlayer()"); }
AudioPlayer audioPlayer;
PrivilegedAction action = new PrivilegedAction() {
public Object run() {
Thread t = new AudioPlayer();
t.setPriority(MAX_PRIORITY);
t.setDaemon(true);
t.start();
return t;
}
};
audioPlayer = (AudioPlayer) AccessController.doPrivileged(action);
return audioPlayer;
}
/**
* Construct an AudioPlayer.
*/
private AudioPlayer() {
super(getAudioThreadGroup(), "Audio Player");
if(DEBUG) { System.out.println("> AudioPlayer private constructor"); }
devAudio = AudioDevice.device;
devAudio.open();
if(DEBUG) { System.out.println("< AudioPlayer private constructor completed"); }
}
/**
* Start playing a stream. The stream will continue to play
* until the stream runs out of data, or it is stopped.
* @see AudioPlayer#stop
*/
public synchronized void start(InputStream in) {
if(DEBUG) {
System.out.println("> AudioPlayer.start");
System.out.println(" InputStream = " + in);
}
devAudio.openChannel(in);
notify();
if(DEBUG) {
System.out.println("< AudioPlayer.start completed");
}
}
/**
* Stop playing a stream. The stream will stop playing,
* nothing happens if the stream wasn't playing in the
* first place.
* @see AudioPlayer#start
*/
public synchronized void stop(InputStream in) {
if(DEBUG) {
System.out.println("> AudioPlayer.stop");
}
devAudio.closeChannel(in);
if(DEBUG) {
System.out.println("< AudioPlayer.stop completed");
}
}
/**
* Main mixing loop. This is called automatically when the AudioPlayer
* is created.
*/
public void run() {
// $$jb: 06.24.99: With the JS API, mixing is no longer done by AudioPlayer
// or AudioDevice ... it's done by the API itself, so this bit of legacy
// code does nothing.
// $$jb: 10.21.99: But it appears that some legacy applications
// check to see if this thread is alive or not, so we need to spin here.
devAudio.play();
if(DEBUG) {
System.out.println("AudioPlayer mixing loop.");
}
while(true) {
try{
Thread.sleep(5000);
//wait();
} catch(Exception e) {
break;
// interrupted
}
}
if(DEBUG) {
System.out.println("AudioPlayer exited.");
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
public interface AudioSecurityAction {
Object run();
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
public interface AudioSecurityExceptionAction {
Object run() throws Exception;
}

View File

@@ -0,0 +1,142 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.InputStream;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.IOException;
import javax.sound.sampled.*;
import javax.sound.midi.*;
/**
* Convert an InputStream to an AudioStream.
*
*/
public final class AudioStream extends FilterInputStream {
// AudioContainerInputStream acis;
AudioInputStream ais = null;
AudioFormat format = null;
MidiFileFormat midiformat = null;
InputStream stream = null;
/*
* create the AudioStream; if we survive without throwing
* an exception, we should now have some subclass of
* ACIS with all the header info already read
*/
public AudioStream(InputStream in) throws IOException {
super(in);
stream = in;
if( in.markSupported() == false ) {
stream = new BufferedInputStream( in, 1024 );
}
try {
ais = AudioSystem.getAudioInputStream( stream );
format = ais.getFormat();
this.in = ais;
} catch (UnsupportedAudioFileException e ) {
// not an audio file, see if it's midi...
try {
midiformat = MidiSystem.getMidiFileFormat( stream );
} catch (InvalidMidiDataException e1) {
throw new IOException("could not create audio stream from input stream");
}
}
}
/**
* A blocking read.
*/
/* public int read(byte buf[], int pos, int len) throws IOException {
return(acis.readFully(buf, pos, len));
}
*/
/**
* Get the data.
*/
public AudioData getData() throws IOException {
int length = getLength();
//limit the memory to 1M, so too large au file won't load
if (length < 1024*1024) {
byte [] buffer = new byte[length];
try {
ais.read(buffer, 0, length);
} catch (IOException ex) {
throw new IOException("Could not create AudioData Object");
}
return new AudioData(format, buffer);
}
/* acis.setData();
if (acis.stream instanceof ByteArrayInputStream) {
Format[] format = acis.getFormat();
byte[] bytes = acis.getBytes();
if (bytes == null)
throw new IOException("could not create AudioData object: no data received");
return new AudioData((AudioFormat)format[0], bytes);
}
*/
throw new IOException("could not create AudioData object");
}
public int getLength() {
if( ais != null && format != null ) {
return (int) (ais.getFrameLength() *
ais.getFormat().getFrameSize() );
} else if ( midiformat != null ) {
return (int) midiformat.getByteLength();
} else {
return -1;
}
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.InputStream;
import java.io.SequenceInputStream;
import java.util.Enumeration;
/**
* Convert a sequence of input streams into a single InputStream.
* This class can be used to play two audio clips in sequence.<p>
* For example:
* <pre>
* Vector v = new Vector();
* v.addElement(audiostream1);
* v.addElement(audiostream2);
* AudioStreamSequence audiostream = new AudioStreamSequence(v.elements());
* AudioPlayer.player.start(audiostream);
* </pre>
* @see AudioPlayer
* @author Arthur van Hoff
*/
public final class AudioStreamSequence extends SequenceInputStream {
Enumeration e;
InputStream in;
/**
* Create an AudioStreamSequence given an
* enumeration of streams.
*/
public AudioStreamSequence(Enumeration e) {
super(e);
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.InputStream;
import java.io.IOException;
/**
* Translator for native audio formats (not implemented in this release).
*
*/
public final class AudioTranslatorStream extends NativeAudioStream {
private final int length = 0;
public AudioTranslatorStream(InputStream in) throws IOException {
super(in);
// No translators supported yet.
throw new InvalidAudioFormatException();
}
public int getLength() {
return length;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
/**
* Create a continuous audio stream. This wraps a stream
* around an AudioData object, the stream is restarted
* at the beginning everytime the end is reached, thus
* creating continuous sound.<p>
* For example:
* <pre>
* AudioData data = AudioData.getAudioData(url);
* ContinuousAudioDataStream audiostream = new ContinuousAudioDataStream(data);
* AudioPlayer.player.start(audiostream);
* </pre>
*
* @see AudioPlayer
* @see AudioData
* @author Arthur van Hoff
*/
public final class ContinuousAudioDataStream extends AudioDataStream {
/**
* Create a continuous stream of audio.
*/
public ContinuousAudioDataStream(AudioData data) {
super(data);
}
public int read() {
int i = super.read();
if (i == -1) {
reset();
i = super.read();
}
return i;
}
public int read(byte ab[], int i1, int j) {
int k;
for (k = 0; k < j; ) {
int i2 = super.read(ab, i1 + k, j - k);
if (i2 >= 0) k += i2;
else reset();
}
return k;
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.IOException;
/**
* Signals an invalid audio stream for the stream handler.
*/
final class InvalidAudioFormatException extends IOException {
/**
* Constructor.
*/
InvalidAudioFormatException() {
super();
}
/**
* Constructor with a detail message.
*/
InvalidAudioFormatException(String s) {
super(s);
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.audio;
import java.io.InputStream;
import java.io.DataInputStream;
import java.io.FilterInputStream;
import java.io.IOException;
/**
* A Sun-specific AudioStream that supports native audio formats.
*
*/
/*
* note: this file used to do the real header reading and
* format verification for .au files (the only kind supported).
* now we are way more cool than that and don't need this
* functionality here; i'm just gutting this class and letting
* it contain an ACIS instead (so now it should work for
* all the data types we support....).
*/
public
class NativeAudioStream extends FilterInputStream {
public NativeAudioStream(InputStream in) throws IOException {
super(in);
}
public int getLength() {
return 0;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,398 @@
/*
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTEvent;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;
import sun.util.logging.PlatformLogger;
import sun.misc.ThreadGroupUtils;
/**
* This class is to let AWT shutdown automatically when a user is done
* with AWT. It tracks AWT state using the following parameters:
* <ul>
* <li><code>peerMap</code> - the map between the existing peer objects
* and their associated targets
* <li><code>toolkitThreadBusy</code> - whether the toolkit thread
* is waiting for a new native event to appear in its queue
* or is dispatching an event
* <li><code>busyThreadSet</code> - a set of all the event dispatch
* threads that are busy at this moment, i.e. those that are not
* waiting for a new event to appear in their event queue.
* </ul><p>
* AWT is considered to be in ready-to-shutdown state when
* <code>peerMap</code> is empty and <code>toolkitThreadBusy</code>
* is false and <code>busyThreadSet</code> is empty.
* The internal AWTAutoShutdown logic secures that the single non-daemon
* thread (<code>blockerThread</code>) is running when AWT is not in
* ready-to-shutdown state. This blocker thread is to prevent AWT from
* exiting since the toolkit thread is now daemon and all the event
* dispatch threads are started only when needed. Once it is detected
* that AWT is in ready-to-shutdown state this blocker thread waits
* for a certain timeout and if AWT state doesn't change during timeout
* this blocker thread terminates all the event dispatch threads and
* exits.
*/
public final class AWTAutoShutdown implements Runnable {
private static final AWTAutoShutdown theInstance = new AWTAutoShutdown();
/**
* This lock object is used to synchronize shutdown operations.
*/
private final Object mainLock = new Object();
/**
* This lock object is to secure that when a new blocker thread is
* started it will be the first who acquire the main lock after
* the thread that created the new blocker released the main lock
* by calling lock.wait() to wait for the blocker to start.
*/
private final Object activationLock = new Object();
/**
* This set keeps references to all the event dispatch threads that
* are busy at this moment, i.e. those that are not waiting for a
* new event to appear in their event queue.
* Access is synchronized on the main lock object.
*/
private final Set<Thread> busyThreadSet = new HashSet<>(7);
/**
* Indicates whether the toolkit thread is waiting for a new native
* event to appear or is dispatching an event.
*/
private boolean toolkitThreadBusy = false;
/**
* This is a map between components and their peers.
* we should work with in under activationLock&mainLock lock.
*/
private final Map<Object, Object> peerMap = new IdentityHashMap<>();
/**
* References the alive non-daemon thread that is currently used
* for keeping AWT from exiting.
*/
private Thread blockerThread = null;
/**
* We need this flag to secure that AWT state hasn't changed while
* we were waiting for the safety timeout to pass.
*/
private boolean timeoutPassed = false;
/**
* Once we detect that AWT is ready to shutdown we wait for a certain
* timeout to pass before stopping event dispatch threads.
*/
private static final int SAFETY_TIMEOUT = 1000;
/**
* Constructor method is intentionally made private to secure
* a single instance. Use getInstance() to reference it.
*
* @see AWTAutoShutdown#getInstance
*/
private AWTAutoShutdown() {}
/**
* Returns reference to a single AWTAutoShutdown instance.
*/
public static AWTAutoShutdown getInstance() {
return theInstance;
}
/**
* Notify that the toolkit thread is not waiting for a native event
* to appear in its queue.
*
* @see AWTAutoShutdown#notifyToolkitThreadFree
* @see AWTAutoShutdown#setToolkitBusy
* @see AWTAutoShutdown#isReadyToShutdown
*/
public static void notifyToolkitThreadBusy() {
getInstance().setToolkitBusy(true);
}
/**
* Notify that the toolkit thread is waiting for a native event
* to appear in its queue.
*
* @see AWTAutoShutdown#notifyToolkitThreadFree
* @see AWTAutoShutdown#setToolkitBusy
* @see AWTAutoShutdown#isReadyToShutdown
*/
public static void notifyToolkitThreadFree() {
getInstance().setToolkitBusy(false);
}
/**
* Add a specified thread to the set of busy event dispatch threads.
* If this set already contains the specified thread or the thread is null,
* the call leaves this set unchanged and returns silently.
*
* @param thread thread to be added to this set, if not present.
* @see AWTAutoShutdown#notifyThreadFree
* @see AWTAutoShutdown#isReadyToShutdown
*/
public void notifyThreadBusy(final Thread thread) {
if (thread == null) {
return;
}
synchronized (activationLock) {
synchronized (mainLock) {
if (blockerThread == null) {
activateBlockerThread();
} else if (isReadyToShutdown()) {
mainLock.notifyAll();
timeoutPassed = false;
}
busyThreadSet.add(thread);
}
}
}
/**
* Remove a specified thread from the set of busy event dispatch threads.
* If this set doesn't contain the specified thread or the thread is null,
* the call leaves this set unchanged and returns silently.
*
* @param thread thread to be removed from this set, if present.
* @see AWTAutoShutdown#notifyThreadBusy
* @see AWTAutoShutdown#isReadyToShutdown
*/
public void notifyThreadFree(final Thread thread) {
if (thread == null) {
return;
}
synchronized (activationLock) {
synchronized (mainLock) {
busyThreadSet.remove(thread);
if (isReadyToShutdown()) {
mainLock.notifyAll();
timeoutPassed = false;
}
}
}
}
/**
* Notify that the peermap has been updated, that means a new peer
* has been created or some existing peer has been disposed.
*
* @see AWTAutoShutdown#isReadyToShutdown
*/
void notifyPeerMapUpdated() {
synchronized (activationLock) {
synchronized (mainLock) {
if (!isReadyToShutdown() && blockerThread == null) {
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
activateBlockerThread();
return null;
});
} else {
mainLock.notifyAll();
timeoutPassed = false;
}
}
}
}
/**
* Determine whether AWT is currently in ready-to-shutdown state.
* AWT is considered to be in ready-to-shutdown state if
* <code>peerMap</code> is empty and <code>toolkitThreadBusy</code>
* is false and <code>busyThreadSet</code> is empty.
*
* @return true if AWT is in ready-to-shutdown state.
*/
private boolean isReadyToShutdown() {
return (!toolkitThreadBusy &&
peerMap.isEmpty() &&
busyThreadSet.isEmpty());
}
/**
* Notify about the toolkit thread state change.
*
* @param busy true if the toolkit thread state changes from idle
* to busy.
* @see AWTAutoShutdown#notifyToolkitThreadBusy
* @see AWTAutoShutdown#notifyToolkitThreadFree
* @see AWTAutoShutdown#isReadyToShutdown
*/
private void setToolkitBusy(final boolean busy) {
if (busy != toolkitThreadBusy) {
synchronized (activationLock) {
synchronized (mainLock) {
if (busy != toolkitThreadBusy) {
if (busy) {
if (blockerThread == null) {
activateBlockerThread();
} else if (isReadyToShutdown()) {
mainLock.notifyAll();
timeoutPassed = false;
}
toolkitThreadBusy = busy;
} else {
toolkitThreadBusy = busy;
if (isReadyToShutdown()) {
mainLock.notifyAll();
timeoutPassed = false;
}
}
}
}
}
}
}
/**
* Implementation of the Runnable interface.
* Incapsulates the blocker thread functionality.
*
* @see AWTAutoShutdown#isReadyToShutdown
*/
public void run() {
Thread currentThread = Thread.currentThread();
boolean interrupted = false;
synchronized (mainLock) {
try {
/* Notify that the thread is started. */
mainLock.notifyAll();
while (blockerThread == currentThread) {
mainLock.wait();
timeoutPassed = false;
/*
* This loop is introduced to handle the following case:
* it is possible that while we are waiting for the
* safety timeout to pass AWT state can change to
* not-ready-to-shutdown and back to ready-to-shutdown.
* In this case we have to wait once again.
* NOTE: we shouldn't break into the outer loop
* in this case, since we may never be notified
* in an outer infinite wait at this point.
*/
while (isReadyToShutdown()) {
if (timeoutPassed) {
timeoutPassed = false;
blockerThread = null;
break;
}
timeoutPassed = true;
mainLock.wait(SAFETY_TIMEOUT);
}
}
} catch (InterruptedException e) {
interrupted = true;
} finally {
if (blockerThread == currentThread) {
blockerThread = null;
}
}
}
if (!interrupted) {
AppContext.stopEventDispatchThreads();
}
}
@SuppressWarnings("serial")
static AWTEvent getShutdownEvent() {
return new AWTEvent(getInstance(), 0) {
};
}
/**
* Creates and starts a new blocker thread. Doesn't return until
* the new blocker thread starts.
*
* Must be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION}
*/
private void activateBlockerThread() {
Thread thread = new Thread(ThreadGroupUtils.getRootThreadGroup(), this, "AWT-Shutdown");
thread.setContextClassLoader(null);
thread.setDaemon(false);
blockerThread = thread;
thread.start();
try {
/* Wait for the blocker thread to start. */
mainLock.wait();
} catch (InterruptedException e) {
System.err.println("AWT blocker activation interrupted:");
e.printStackTrace();
}
}
final void registerPeer(final Object target, final Object peer) {
synchronized (activationLock) {
synchronized (mainLock) {
peerMap.put(target, peer);
notifyPeerMapUpdated();
}
}
}
final void unregisterPeer(final Object target, final Object peer) {
synchronized (activationLock) {
synchronized (mainLock) {
if (peerMap.get(target) == peer) {
peerMap.remove(target);
notifyPeerMapUpdated();
}
}
}
}
final Object getPeer(final Object target) {
synchronized (activationLock) {
synchronized (mainLock) {
return peerMap.get(target);
}
}
}
final void dumpPeers(final PlatformLogger aLog) {
if (aLog.isLoggable(PlatformLogger.Level.FINE)) {
synchronized (activationLock) {
synchronized (mainLock) {
aLog.fine("Mapped peers:");
for (Object key : peerMap.keySet()) {
aLog.fine(key + "->" + peerMap.get(key));
}
}
}
}
}
} // class AWTAutoShutdown

View File

@@ -0,0 +1,140 @@
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.nio.CharBuffer;
import java.nio.ByteBuffer;
import java.nio.charset.*;
//This class delegates all invokes to the charset "javaCs" if
//its subclasses do not provide their own en/decode solution.
public class AWTCharset extends Charset {
protected Charset awtCs;
protected Charset javaCs;
public AWTCharset(String awtCsName, Charset javaCs) {
super(awtCsName, null);
this.javaCs = javaCs;
this.awtCs = this;
}
public boolean contains(Charset cs) {
if (javaCs == null) return false;
return javaCs.contains(cs);
}
public CharsetEncoder newEncoder() {
if (javaCs == null)
throw new Error("Encoder is not supported by this Charset");
return new Encoder(javaCs.newEncoder());
}
public CharsetDecoder newDecoder() {
if (javaCs == null)
throw new Error("Decoder is not supported by this Charset");
return new Decoder(javaCs.newDecoder());
}
public class Encoder extends CharsetEncoder {
protected CharsetEncoder enc;
protected Encoder () {
this(javaCs.newEncoder());
}
protected Encoder (CharsetEncoder enc) {
super(awtCs,
enc.averageBytesPerChar(),
enc.maxBytesPerChar());
this.enc = enc;
}
public boolean canEncode(char c) {
return enc.canEncode(c);
}
public boolean canEncode(CharSequence cs) {
return enc.canEncode(cs);
}
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
return enc.encode(src, dst, true);
}
protected CoderResult implFlush(ByteBuffer out) {
return enc.flush(out);
}
protected void implReset() {
enc.reset();
}
protected void implReplaceWith(byte[] newReplacement) {
if (enc != null)
enc.replaceWith(newReplacement);
}
protected void implOnMalformedInput(CodingErrorAction newAction) {
enc.onMalformedInput(newAction);
}
protected void implOnUnmappableCharacter(CodingErrorAction newAction) {
enc.onUnmappableCharacter(newAction);
}
public boolean isLegalReplacement(byte[] repl) {
return true;
}
}
public class Decoder extends CharsetDecoder {
protected CharsetDecoder dec;
private String nr;
protected Decoder () {
this(javaCs.newDecoder());
}
protected Decoder (CharsetDecoder dec) {
super(awtCs,
dec.averageCharsPerByte(),
dec.maxCharsPerByte());
this.dec = dec;
}
protected CoderResult decodeLoop(ByteBuffer src, CharBuffer dst) {
return dec.decode(src, dst, true);
}
ByteBuffer fbb = ByteBuffer.allocate(0);
protected CoderResult implFlush(CharBuffer out) {
dec.decode(fbb, out, true);
return dec.flush(out);
}
protected void implReset() {
dec.reset();
}
protected void implReplaceWith(String newReplacement) {
if (dec != null)
dec.replaceWith(newReplacement);
}
protected void implOnMalformedInput(CodingErrorAction newAction) {
dec.onMalformedInput(newAction);
}
protected void implOnUnmappableCharacter(CodingErrorAction newAction) {
dec.onUnmappableCharacter(newAction);
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTPermission;
import sun.security.util.PermissionFactory;
/**
* A factory object for AWTPermission objects.
*/
public class AWTPermissionFactory
implements PermissionFactory<AWTPermission>
{
@Override
public AWTPermission newPermission(String name) {
return new AWTPermission(name);
}
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* The AWTSecurityManager class provides the ability to secondarily
* index AppContext objects through SecurityManager extensions.
* As noted in AppContext.java, AppContexts are primarily indexed by
* ThreadGroup. In the case where the ThreadGroup doesn't provide
* enough information to determine AppContext (e.g. system threads),
* if a SecurityManager is installed which derives from
* AWTSecurityManager, the AWTSecurityManager's getAppContext()
* method is called to determine the AppContext.
*
* A typical example of the use of this class is where an applet
* is called by a system thread, yet the system AppContext is
* inappropriate, because applet code is currently executing.
* In this case, the getAppContext() method can walk the call stack
* to determine the applet code being executed and return the applet's
* AppContext object.
*
* @author Fred Ecks
*/
public class AWTSecurityManager extends SecurityManager {
/**
* Get the AppContext corresponding to the current context.
* The default implementation returns null, but this method
* may be overridden by various SecurityManagers
* (e.g. AppletSecurity) to index AppContext objects by the
* calling context.
*
* @return the AppContext corresponding to the current context.
* @see sun.awt.AppContext
* @see java.lang.SecurityManager
* @since JDK1.2.1
*/
public AppContext getAppContext() {
return null; // Default implementation returns null
}
} /* class AWTSecurityManager */

View File

@@ -0,0 +1,932 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.EventQueue;
import java.awt.Window;
import java.awt.SystemTray;
import java.awt.TrayIcon;
import java.awt.Toolkit;
import java.awt.GraphicsEnvironment;
import java.awt.event.InvocationEvent;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collections;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;
import java.util.HashSet;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import java.lang.ref.SoftReference;
import sun.util.logging.PlatformLogger;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;
/**
* The AppContext is a table referenced by ThreadGroup which stores
* application service instances. (If you are not writing an application
* service, or don't know what one is, please do not use this class.)
* The AppContext allows applet access to what would otherwise be
* potentially dangerous services, such as the ability to peek at
* EventQueues or change the look-and-feel of a Swing application.<p>
*
* Most application services use a singleton object to provide their
* services, either as a default (such as getSystemEventQueue or
* getDefaultToolkit) or as static methods with class data (System).
* The AppContext works with the former method by extending the concept
* of "default" to be ThreadGroup-specific. Application services
* lookup their singleton in the AppContext.<p>
*
* For example, here we have a Foo service, with its pre-AppContext
* code:<p>
* <code><pre>
* public class Foo {
* private static Foo defaultFoo = new Foo();
*
* public static Foo getDefaultFoo() {
* return defaultFoo;
* }
*
* ... Foo service methods
* }</pre></code><p>
*
* The problem with the above is that the Foo service is global in scope,
* so that applets and other untrusted code can execute methods on the
* single, shared Foo instance. The Foo service therefore either needs
* to block its use by untrusted code using a SecurityManager test, or
* restrict its capabilities so that it doesn't matter if untrusted code
* executes it.<p>
*
* Here's the Foo class written to use the AppContext:<p>
* <code><pre>
* public class Foo {
* public static Foo getDefaultFoo() {
* Foo foo = (Foo)AppContext.getAppContext().get(Foo.class);
* if (foo == null) {
* foo = new Foo();
* getAppContext().put(Foo.class, foo);
* }
* return foo;
* }
*
* ... Foo service methods
* }</pre></code><p>
*
* Since a separate AppContext can exist for each ThreadGroup, trusted
* and untrusted code have access to different Foo instances. This allows
* untrusted code access to "system-wide" services -- the service remains
* within the AppContext "sandbox". For example, say a malicious applet
* wants to peek all of the key events on the EventQueue to listen for
* passwords; if separate EventQueues are used for each ThreadGroup
* using AppContexts, the only key events that applet will be able to
* listen to are its own. A more reasonable applet request would be to
* change the Swing default look-and-feel; with that default stored in
* an AppContext, the applet's look-and-feel will change without
* disrupting other applets or potentially the browser itself.<p>
*
* Because the AppContext is a facility for safely extending application
* service support to applets, none of its methods may be blocked by a
* a SecurityManager check in a valid Java implementation. Applets may
* therefore safely invoke any of its methods without worry of being
* blocked.
*
* Note: If a SecurityManager is installed which derives from
* sun.awt.AWTSecurityManager, it may override the
* AWTSecurityManager.getAppContext() method to return the proper
* AppContext based on the execution context, in the case where
* the default ThreadGroup-based AppContext indexing would return
* the main "system" AppContext. For example, in an applet situation,
* if a system thread calls into an applet, rather than returning the
* main "system" AppContext (the one corresponding to the system thread),
* an installed AWTSecurityManager may return the applet's AppContext
* based on the execution context.
*
* @author Thomas Ball
* @author Fred Ecks
*/
public final class AppContext {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.AppContext");
/* Since the contents of an AppContext are unique to each Java
* session, this class should never be serialized. */
/*
* The key to put()/get() the Java EventQueue into/from the AppContext.
*/
public static final Object EVENT_QUEUE_KEY = new StringBuffer("EventQueue");
/*
* The keys to store EventQueue push/pop lock and condition.
*/
public final static Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
public final static Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
/* A map of AppContexts, referenced by ThreadGroup.
*/
private static final Map<ThreadGroup, AppContext> threadGroup2appContext =
Collections.synchronizedMap(new IdentityHashMap<ThreadGroup, AppContext>());
/**
* Returns a set containing all <code>AppContext</code>s.
*/
public static Set<AppContext> getAppContexts() {
synchronized (threadGroup2appContext) {
return new HashSet<AppContext>(threadGroup2appContext.values());
}
}
/* The main "system" AppContext, used by everything not otherwise
contained in another AppContext. It is implicitly created for
standalone apps only (i.e. not applets)
*/
private static volatile AppContext mainAppContext = null;
private static class GetAppContextLock {};
private final static Object getAppContextLock = new GetAppContextLock();
/*
* The hash map associated with this AppContext. A private delegate
* is used instead of subclassing HashMap so as to avoid all of
* HashMap's potentially risky methods, such as clear(), elements(),
* putAll(), etc.
*/
private final Map<Object, Object> table = new HashMap<>();
private final ThreadGroup threadGroup;
/**
* If any <code>PropertyChangeListeners</code> have been registered,
* the <code>changeSupport</code> field describes them.
*
* @see #addPropertyChangeListener
* @see #removePropertyChangeListener
* @see #firePropertyChange
*/
private PropertyChangeSupport changeSupport = null;
public static final String DISPOSED_PROPERTY_NAME = "disposed";
public static final String GUI_DISPOSED = "guidisposed";
private enum State {
VALID,
BEING_DISPOSED,
DISPOSED
};
private volatile State state = State.VALID;
public boolean isDisposed() {
return state == State.DISPOSED;
}
/*
* The total number of AppContexts, system-wide. This number is
* incremented at the beginning of the constructor, and decremented
* at the end of dispose(). getAppContext() checks to see if this
* number is 1. If so, it returns the sole AppContext without
* checking Thread.currentThread().
*/
private static final AtomicInteger numAppContexts = new AtomicInteger(0);
/*
* The context ClassLoader that was used to create this AppContext.
*/
private final ClassLoader contextClassLoader;
/**
* Constructor for AppContext. This method is <i>not</i> public,
* nor should it ever be used as such. The proper way to construct
* an AppContext is through the use of SunToolkit.createNewAppContext.
* A ThreadGroup is created for the new AppContext, a Thread is
* created within that ThreadGroup, and that Thread calls
* SunToolkit.createNewAppContext before calling anything else.
* That creates both the new AppContext and its EventQueue.
*
* @param threadGroup The ThreadGroup for the new AppContext
* @see sun.awt.SunToolkit
* @since 1.2
*/
AppContext(ThreadGroup threadGroup) {
numAppContexts.incrementAndGet();
this.threadGroup = threadGroup;
threadGroup2appContext.put(threadGroup, this);
this.contextClassLoader =
AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
});
// Initialize push/pop lock and its condition to be used by all the
// EventQueues within this AppContext
Lock eventQueuePushPopLock = new ReentrantLock();
put(EVENT_QUEUE_LOCK_KEY, eventQueuePushPopLock);
Condition eventQueuePushPopCond = eventQueuePushPopLock.newCondition();
put(EVENT_QUEUE_COND_KEY, eventQueuePushPopCond);
}
private static final ThreadLocal<AppContext> threadAppContext =
new ThreadLocal<AppContext>();
private final static void initMainAppContext() {
// On the main Thread, we get the ThreadGroup, make a corresponding
// AppContext, and instantiate the Java EventQueue. This way, legacy
// code is unaffected by the move to multiple AppContext ability.
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
ThreadGroup currentThreadGroup =
Thread.currentThread().getThreadGroup();
ThreadGroup parentThreadGroup = currentThreadGroup.getParent();
while (parentThreadGroup != null) {
// Find the root ThreadGroup to construct our main AppContext
currentThreadGroup = parentThreadGroup;
parentThreadGroup = currentThreadGroup.getParent();
}
mainAppContext = SunToolkit.createNewAppContext(currentThreadGroup);
return null;
}
});
}
/**
* Returns the appropriate AppContext for the caller,
* as determined by its ThreadGroup. If the main "system" AppContext
* would be returned and there's an AWTSecurityManager installed, it
* is called to get the proper AppContext based on the execution
* context.
*
* @return the AppContext for the caller.
* @see java.lang.ThreadGroup
* @since 1.2
*/
public final static AppContext getAppContext() {
// we are standalone app, return the main app context
if (numAppContexts.get() == 1 && mainAppContext != null) {
return mainAppContext;
}
AppContext appContext = threadAppContext.get();
if (null == appContext) {
appContext = AccessController.doPrivileged(new PrivilegedAction<AppContext>()
{
public AppContext run() {
// Get the current ThreadGroup, and look for it and its
// parents in the hash from ThreadGroup to AppContext --
// it should be found, because we use createNewContext()
// when new AppContext objects are created.
ThreadGroup currentThreadGroup = Thread.currentThread().getThreadGroup();
ThreadGroup threadGroup = currentThreadGroup;
// Special case: we implicitly create the main app context
// if no contexts have been created yet. This covers standalone apps
// and excludes applets because by the time applet starts
// a number of contexts have already been created by the plugin.
synchronized (getAppContextLock) {
if (numAppContexts.get() == 0) {
if (System.getProperty("javaplugin.version") == null &&
System.getProperty("javawebstart.version") == null) {
initMainAppContext();
} else if (System.getProperty("javafx.version") != null &&
threadGroup.getParent() != null) {
// Swing inside JavaFX case
SunToolkit.createNewAppContext();
}
}
}
AppContext context = threadGroup2appContext.get(threadGroup);
while (context == null) {
threadGroup = threadGroup.getParent();
if (threadGroup == null) {
// We've got up to the root thread group and did not find an AppContext
// Try to get it from the security manager
SecurityManager securityManager = System.getSecurityManager();
if (securityManager != null) {
ThreadGroup smThreadGroup = securityManager.getThreadGroup();
if (smThreadGroup != null) {
/*
* If we get this far then it's likely that
* the ThreadGroup does not actually belong
* to the applet, so do not cache it.
*/
return threadGroup2appContext.get(smThreadGroup);
}
}
return null;
}
context = threadGroup2appContext.get(threadGroup);
}
// In case we did anything in the above while loop, we add
// all the intermediate ThreadGroups to threadGroup2appContext
// so we won't spin again.
for (ThreadGroup tg = currentThreadGroup; tg != threadGroup; tg = tg.getParent()) {
threadGroup2appContext.put(tg, context);
}
// Now we're done, so we cache the latest key/value pair.
threadAppContext.set(context);
return context;
}
});
}
return appContext;
}
/**
* Returns true if the specified AppContext is the main AppContext.
*
* @param ctx the context to compare with the main context
* @return true if the specified AppContext is the main AppContext.
* @since 1.8
*/
public final static boolean isMainContext(AppContext ctx) {
return (ctx != null && ctx == mainAppContext);
}
private final static AppContext getExecutionAppContext() {
SecurityManager securityManager = System.getSecurityManager();
if ((securityManager != null) &&
(securityManager instanceof AWTSecurityManager))
{
AWTSecurityManager awtSecMgr = (AWTSecurityManager) securityManager;
AppContext secAppContext = awtSecMgr.getAppContext();
return secAppContext; // Return what we're told
}
return null;
}
private long DISPOSAL_TIMEOUT = 5000; // Default to 5-second timeout
// for disposal of all Frames
// (we wait for this time twice,
// once for dispose(), and once
// to clear the EventQueue).
private long THREAD_INTERRUPT_TIMEOUT = 1000;
// Default to 1-second timeout for all
// interrupted Threads to exit, and another
// 1 second for all stopped Threads to die.
/**
* Disposes of this AppContext, all of its top-level Frames, and
* all Threads and ThreadGroups contained within it.
*
* This method must be called from a Thread which is not contained
* within this AppContext.
*
* @exception IllegalThreadStateException if the current thread is
* contained within this AppContext
* @since 1.2
*/
public void dispose() throws IllegalThreadStateException {
// Check to be sure that the current Thread isn't in this AppContext
if (this.threadGroup.parentOf(Thread.currentThread().getThreadGroup())) {
throw new IllegalThreadStateException(
"Current Thread is contained within AppContext to be disposed."
);
}
synchronized(this) {
if (this.state != State.VALID) {
return; // If already disposed or being disposed, bail.
}
this.state = State.BEING_DISPOSED;
}
final PropertyChangeSupport changeSupport = this.changeSupport;
if (changeSupport != null) {
changeSupport.firePropertyChange(DISPOSED_PROPERTY_NAME, false, true);
}
// First, we post an InvocationEvent to be run on the
// EventDispatchThread which disposes of all top-level Frames and TrayIcons
final Object notificationLock = new Object();
Runnable runnable = new Runnable() {
public void run() {
Window[] windowsToDispose = Window.getOwnerlessWindows();
for (Window w : windowsToDispose) {
try {
w.dispose();
} catch (Throwable t) {
log.finer("exception occurred while disposing app context", t);
}
}
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
if (!GraphicsEnvironment.isHeadless() && SystemTray.isSupported())
{
SystemTray systemTray = SystemTray.getSystemTray();
TrayIcon[] trayIconsToDispose = systemTray.getTrayIcons();
for (TrayIcon ti : trayIconsToDispose) {
systemTray.remove(ti);
}
}
return null;
}
});
// Alert PropertyChangeListeners that the GUI has been disposed.
if (changeSupport != null) {
changeSupport.firePropertyChange(GUI_DISPOSED, false, true);
}
synchronized(notificationLock) {
notificationLock.notifyAll(); // Notify caller that we're done
}
}
};
synchronized(notificationLock) {
SunToolkit.postEvent(this,
new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
try {
notificationLock.wait(DISPOSAL_TIMEOUT);
} catch (InterruptedException e) { }
}
// Next, we post another InvocationEvent to the end of the
// EventQueue. When it's executed, we know we've executed all
// events in the queue.
runnable = new Runnable() { public void run() {
synchronized(notificationLock) {
notificationLock.notifyAll(); // Notify caller that we're done
}
} };
synchronized(notificationLock) {
SunToolkit.postEvent(this,
new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
try {
notificationLock.wait(DISPOSAL_TIMEOUT);
} catch (InterruptedException e) { }
}
// We are done with posting events, so change the state to disposed
synchronized(this) {
this.state = State.DISPOSED;
}
// Next, we interrupt all Threads in the ThreadGroup
this.threadGroup.interrupt();
// Note, the EventDispatchThread we've interrupted may dump an
// InterruptedException to the console here. This needs to be
// fixed in the EventDispatchThread, not here.
// Next, we sleep 10ms at a time, waiting for all of the active
// Threads in the ThreadGroup to exit.
long startTime = System.currentTimeMillis();
long endTime = startTime + THREAD_INTERRUPT_TIMEOUT;
while ((this.threadGroup.activeCount() > 0) &&
(System.currentTimeMillis() < endTime)) {
try {
Thread.sleep(10);
} catch (InterruptedException e) { }
}
// Then, we stop any remaining Threads
this.threadGroup.stop();
// Next, we sleep 10ms at a time, waiting for all of the active
// Threads in the ThreadGroup to die.
startTime = System.currentTimeMillis();
endTime = startTime + THREAD_INTERRUPT_TIMEOUT;
while ((this.threadGroup.activeCount() > 0) &&
(System.currentTimeMillis() < endTime)) {
try {
Thread.sleep(10);
} catch (InterruptedException e) { }
}
// Next, we remove this and all subThreadGroups from threadGroup2appContext
int numSubGroups = this.threadGroup.activeGroupCount();
if (numSubGroups > 0) {
ThreadGroup [] subGroups = new ThreadGroup[numSubGroups];
numSubGroups = this.threadGroup.enumerate(subGroups);
for (int subGroup = 0; subGroup < numSubGroups; subGroup++) {
threadGroup2appContext.remove(subGroups[subGroup]);
}
}
threadGroup2appContext.remove(this.threadGroup);
threadAppContext.set(null);
// Finally, we destroy the ThreadGroup entirely.
try {
this.threadGroup.destroy();
} catch (IllegalThreadStateException e) {
// Fired if not all the Threads died, ignore it and proceed
}
synchronized (table) {
this.table.clear(); // Clear out the Hashtable to ease garbage collection
}
numAppContexts.decrementAndGet();
mostRecentKeyValue = null;
}
static final class PostShutdownEventRunnable implements Runnable {
private final AppContext appContext;
public PostShutdownEventRunnable(AppContext ac) {
appContext = ac;
}
public void run() {
final EventQueue eq = (EventQueue)appContext.get(EVENT_QUEUE_KEY);
if (eq != null) {
eq.postEvent(AWTAutoShutdown.getShutdownEvent());
}
}
}
static final class CreateThreadAction implements PrivilegedAction<Thread> {
private final AppContext appContext;
private final Runnable runnable;
public CreateThreadAction(AppContext ac, Runnable r) {
appContext = ac;
runnable = r;
}
public Thread run() {
Thread t = new Thread(appContext.getThreadGroup(), runnable);
t.setContextClassLoader(appContext.getContextClassLoader());
t.setPriority(Thread.NORM_PRIORITY + 1);
t.setDaemon(true);
return t;
}
}
static void stopEventDispatchThreads() {
for (AppContext appContext: getAppContexts()) {
if (appContext.isDisposed()) {
continue;
}
Runnable r = new PostShutdownEventRunnable(appContext);
// For security reasons EventQueue.postEvent should only be called
// on a thread that belongs to the corresponding thread group.
if (appContext != AppContext.getAppContext()) {
// Create a thread that belongs to the thread group associated
// with the AppContext and invokes EventQueue.postEvent.
PrivilegedAction<Thread> action = new CreateThreadAction(appContext, r);
Thread thread = AccessController.doPrivileged(action);
thread.start();
} else {
r.run();
}
}
}
private MostRecentKeyValue mostRecentKeyValue = null;
private MostRecentKeyValue shadowMostRecentKeyValue = null;
/**
* Returns the value to which the specified key is mapped in this context.
*
* @param key a key in the AppContext.
* @return the value to which the key is mapped in this AppContext;
* <code>null</code> if the key is not mapped to any value.
* @see #put(Object, Object)
* @since 1.2
*/
public Object get(Object key) {
/*
* The most recent reference should be updated inside a synchronized
* block to avoid a race when put() and get() are executed in
* parallel on different threads.
*/
synchronized (table) {
// Note: this most recent key/value caching is thread-hot.
// A simple test using SwingSet found that 72% of lookups
// were matched using the most recent key/value. By instantiating
// a simple MostRecentKeyValue object on cache misses, the
// cache hits can be processed without synchronization.
MostRecentKeyValue recent = mostRecentKeyValue;
if ((recent != null) && (recent.key == key)) {
return recent.value;
}
Object value = table.get(key);
if(mostRecentKeyValue == null) {
mostRecentKeyValue = new MostRecentKeyValue(key, value);
shadowMostRecentKeyValue = new MostRecentKeyValue(key, value);
} else {
MostRecentKeyValue auxKeyValue = mostRecentKeyValue;
shadowMostRecentKeyValue.setPair(key, value);
mostRecentKeyValue = shadowMostRecentKeyValue;
shadowMostRecentKeyValue = auxKeyValue;
}
return value;
}
}
/**
* Maps the specified <code>key</code> to the specified
* <code>value</code> in this AppContext. Neither the key nor the
* value can be <code>null</code>.
* <p>
* The value can be retrieved by calling the <code>get</code> method
* with a key that is equal to the original key.
*
* @param key the AppContext key.
* @param value the value.
* @return the previous value of the specified key in this
* AppContext, or <code>null</code> if it did not have one.
* @exception NullPointerException if the key or value is
* <code>null</code>.
* @see #get(Object)
* @since 1.2
*/
public Object put(Object key, Object value) {
synchronized (table) {
MostRecentKeyValue recent = mostRecentKeyValue;
if ((recent != null) && (recent.key == key))
recent.value = value;
return table.put(key, value);
}
}
/**
* Removes the key (and its corresponding value) from this
* AppContext. This method does nothing if the key is not in the
* AppContext.
*
* @param key the key that needs to be removed.
* @return the value to which the key had been mapped in this AppContext,
* or <code>null</code> if the key did not have a mapping.
* @since 1.2
*/
public Object remove(Object key) {
synchronized (table) {
MostRecentKeyValue recent = mostRecentKeyValue;
if ((recent != null) && (recent.key == key))
recent.value = null;
return table.remove(key);
}
}
/**
* Returns the root ThreadGroup for all Threads contained within
* this AppContext.
* @since 1.2
*/
public ThreadGroup getThreadGroup() {
return threadGroup;
}
/**
* Returns the context ClassLoader that was used to create this
* AppContext.
*
* @see java.lang.Thread#getContextClassLoader
*/
public ClassLoader getContextClassLoader() {
return contextClassLoader;
}
/**
* Returns a string representation of this AppContext.
* @since 1.2
*/
@Override
public String toString() {
return getClass().getName() + "[threadGroup=" + threadGroup.getName() + "]";
}
/**
* Returns an array of all the property change listeners
* registered on this component.
*
* @return all of this component's <code>PropertyChangeListener</code>s
* or an empty array if no property change
* listeners are currently registered
*
* @see #addPropertyChangeListener
* @see #removePropertyChangeListener
* @see #getPropertyChangeListeners(java.lang.String)
* @see java.beans.PropertyChangeSupport#getPropertyChangeListeners
* @since 1.4
*/
public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
if (changeSupport == null) {
return new PropertyChangeListener[0];
}
return changeSupport.getPropertyChangeListeners();
}
/**
* Adds a PropertyChangeListener to the listener list for a specific
* property. The specified property may be one of the following:
* <ul>
* <li>if this AppContext is disposed ("disposed")</li>
* </ul>
* <ul>
* <li>if this AppContext's unowned Windows have been disposed
* ("guidisposed"). Code to cleanup after the GUI is disposed
* (such as LookAndFeel.uninitialize()) should execute in response to
* this property being fired. Notifications for the "guidisposed"
* property are sent on the event dispatch thread.</li>
* </ul>
* <p>
* If listener is null, no exception is thrown and no action is performed.
*
* @param propertyName one of the property names listed above
* @param listener the PropertyChangeListener to be added
*
* @see #removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
* @see #getPropertyChangeListeners(java.lang.String)
* @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
*/
public synchronized void addPropertyChangeListener(
String propertyName,
PropertyChangeListener listener) {
if (listener == null) {
return;
}
if (changeSupport == null) {
changeSupport = new PropertyChangeSupport(this);
}
changeSupport.addPropertyChangeListener(propertyName, listener);
}
/**
* Removes a PropertyChangeListener from the listener list for a specific
* property. This method should be used to remove PropertyChangeListeners
* that were registered for a specific bound property.
* <p>
* If listener is null, no exception is thrown and no action is performed.
*
* @param propertyName a valid property name
* @param listener the PropertyChangeListener to be removed
*
* @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
* @see #getPropertyChangeListeners(java.lang.String)
* @see #removePropertyChangeListener(java.beans.PropertyChangeListener)
*/
public synchronized void removePropertyChangeListener(
String propertyName,
PropertyChangeListener listener) {
if (listener == null || changeSupport == null) {
return;
}
changeSupport.removePropertyChangeListener(propertyName, listener);
}
/**
* Returns an array of all the listeners which have been associated
* with the named property.
*
* @return all of the <code>PropertyChangeListeners</code> associated with
* the named property or an empty array if no listeners have
* been added
*
* @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
* @see #removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
* @see #getPropertyChangeListeners
* @since 1.4
*/
public synchronized PropertyChangeListener[] getPropertyChangeListeners(
String propertyName) {
if (changeSupport == null) {
return new PropertyChangeListener[0];
}
return changeSupport.getPropertyChangeListeners(propertyName);
}
// Set up JavaAWTAccess in SharedSecrets
static {
sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() {
private boolean hasRootThreadGroup(final AppContext ecx) {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return ecx.threadGroup.getParent() == null;
}
});
}
/**
* Returns the AppContext used for applet logging isolation, or null if
* the default global context can be used.
* If there's no applet, or if the caller is a stand alone application,
* or running in the main app context, returns null.
* Otherwise, returns the AppContext of the calling applet.
* @return null if the global default context can be used,
* an AppContext otherwise.
**/
public Object getAppletContext() {
// There's no AppContext: return null.
// No need to call getAppContext() if numAppContext == 0:
// it means that no AppContext has been created yet, and
// we don't want to trigger the creation of a main app
// context since we don't need it.
if (numAppContexts.get() == 0) return null;
// Get the context from the security manager
AppContext ecx = getExecutionAppContext();
// Not sure we really need to re-check numAppContexts here.
// If all applets have gone away then we could have a
// numAppContexts coming back to 0. So we recheck
// it here because we don't want to trigger the
// creation of a main AppContext in that case.
// This is probably not 100% MT-safe but should reduce
// the window of opportunity in which that issue could
// happen.
if (numAppContexts.get() > 0) {
// Defaults to thread group caching.
// This is probably not required as we only really need
// isolation in a deployed applet environment, in which
// case ecx will not be null when we reach here
// However it helps emulate the deployed environment,
// in tests for instance.
ecx = ecx != null ? ecx : getAppContext();
}
// getAppletContext() may be called when initializing the main
// app context - in which case mainAppContext will still be
// null. To work around this issue we simply use
// AppContext.threadGroup.getParent() == null instead, since
// mainAppContext is the only AppContext which should have
// the root TG as its thread group.
// See: JDK-8023258
final boolean isMainAppContext = ecx == null
|| mainAppContext == ecx
|| mainAppContext == null && hasRootThreadGroup(ecx);
return isMainAppContext ? null : ecx;
}
});
}
public static <T> T getSoftReferenceValue(Object key,
Supplier<T> supplier) {
final AppContext appContext = AppContext.getAppContext();
SoftReference<T> ref = (SoftReference<T>) appContext.get(key);
if (ref != null) {
final T object = ref.get();
if (object != null) {
return object;
}
}
final T object = supplier.get();
ref = new SoftReference<>(object);
appContext.put(key, ref);
return object;
}
}
final class MostRecentKeyValue {
Object key;
Object value;
MostRecentKeyValue(Object k, Object v) {
key = k;
value = v;
}
void setPair(Object k, Object v) {
key = k;
value = v;
}
}

View File

@@ -0,0 +1,89 @@
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.event.FocusEvent;
import java.awt.Component;
/**
* This class represents FocusEvents with a known "cause" - reason why this event happened. It can
* be mouse press, traversal, activation, and so on - all causes are described as Cause enum. The
* event with the cause can be constructed in two ways - explicitly through constructor of
* CausedFocusEvent class or implicitly, by calling appropriate requestFocusXXX method with "cause"
* parameter. The default cause is UNKNOWN.
*/
@SuppressWarnings("serial")
public class CausedFocusEvent extends FocusEvent {
public enum Cause {
UNKNOWN,
MOUSE_EVENT,
TRAVERSAL,
TRAVERSAL_UP,
TRAVERSAL_DOWN,
TRAVERSAL_FORWARD,
TRAVERSAL_BACKWARD,
MANUAL_REQUEST,
AUTOMATIC_TRAVERSE,
ROLLBACK,
NATIVE_SYSTEM,
ACTIVATION,
CLEAR_GLOBAL_FOCUS_OWNER,
RETARGETED
};
private final Cause cause;
public Cause getCause() {
return cause;
}
public String toString() {
return "java.awt.FocusEvent[" + super.paramString() + ",cause=" + cause + "] on " + getSource();
}
public CausedFocusEvent(Component source, int id, boolean temporary,
Component opposite, Cause cause) {
super(source, id, temporary, opposite);
if (cause == null) {
cause = Cause.UNKNOWN;
}
this.cause = cause;
}
/**
* Retargets the original focus event to the new target. If the
* original focus event is CausedFocusEvent, it remains such and
* cause is copied. Otherwise, new CausedFocusEvent is created,
* with cause as RETARGETED.
* @return retargeted event, or null if e is null
*/
public static FocusEvent retarget(FocusEvent e, Component newSource) {
if (e == null) return null;
return new CausedFocusEvent(newSource, e.getID(), e.isTemporary(), e.getOppositeComponent(),
(e instanceof CausedFocusEvent) ? ((CausedFocusEvent)e).getCause() : Cause.RETARGETED);
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
public class CharsetString {
/**
* chars for this string. See also offset, length.
*/
public char[] charsetChars;
/**
* Offset within charsetChars of first character
**/
public int offset;
/**
* Length of the string we represent.
**/
public int length;
/**
* This string's FontDescriptor.
*/
public FontDescriptor fontDescriptor;
/**
* Creates a new CharsetString
*/
public CharsetString(char charsetChars[], int offset, int length,
FontDescriptor fontDescriptor){
this.charsetChars = charsetChars;
this.offset = offset;
this.length = length;
this.fontDescriptor = fontDescriptor;
}
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import sun.awt.datatransfer.DataTransferer;
import java.awt.*;
import java.awt.dnd.*;
import java.awt.dnd.peer.DragSourceContextPeer;
import java.awt.peer.*;
/**
* Interface for component creation support in toolkits
*/
public interface ComponentFactory {
CanvasPeer createCanvas(Canvas target) throws HeadlessException;
PanelPeer createPanel(Panel target) throws HeadlessException;
WindowPeer createWindow(Window target) throws HeadlessException;
FramePeer createFrame(Frame target) throws HeadlessException;
DialogPeer createDialog(Dialog target) throws HeadlessException;
ButtonPeer createButton(Button target) throws HeadlessException;
TextFieldPeer createTextField(TextField target)
throws HeadlessException;
ChoicePeer createChoice(Choice target) throws HeadlessException;
LabelPeer createLabel(Label target) throws HeadlessException;
ListPeer createList(List target) throws HeadlessException;
CheckboxPeer createCheckbox(Checkbox target)
throws HeadlessException;
ScrollbarPeer createScrollbar(Scrollbar target)
throws HeadlessException;
ScrollPanePeer createScrollPane(ScrollPane target)
throws HeadlessException;
TextAreaPeer createTextArea(TextArea target)
throws HeadlessException;
FileDialogPeer createFileDialog(FileDialog target)
throws HeadlessException;
MenuBarPeer createMenuBar(MenuBar target) throws HeadlessException;
MenuPeer createMenu(Menu target) throws HeadlessException;
PopupMenuPeer createPopupMenu(PopupMenu target)
throws HeadlessException;
MenuItemPeer createMenuItem(MenuItem target)
throws HeadlessException;
CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
throws HeadlessException;
DragSourceContextPeer createDragSourceContextPeer(
DragGestureEvent dge)
throws InvalidDnDOperationException, HeadlessException;
FontPeer getFontPeer(String name, int style);
RobotPeer createRobot(Robot target, GraphicsDevice screen)
throws AWTException, HeadlessException;
DataTransferer getDataTransferer();
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* This interface can be implemented on a Graphics object to allow
* the lightweight component code to permanently install a rectangular
* maximum clip that cannot be extended with setClip and which works in
* conjunction with the hit() and getTransform() methods of Graphics2D
* to make it appear as if there really was a component with these
* dimensions.
*/
public interface ConstrainableGraphics {
/**
* Constrain this graphics object to have a permanent device space
* origin of (x, y) and a permanent maximum clip of (x,y,w,h).
* Calling this method is roughly equivalent to:
* g.translate(x, y);
* g.clipRect(0, 0, w, h);
* except that the clip can never be extended outside of these
* bounds, even with setClip() and for the fact that the (x,y)
* become a new device space coordinate origin.
*
* These methods are recursive so that you can further restrict
* the object by calling the constrain() method more times, but
* you can never enlarge its restricted maximum clip.
*/
public void constrain(int x, int y, int w, int h);
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
import java.awt.image.*;
/**
* A class to encapsulate a custom image-based cursor.
*
* @author ThomasBall
*/
public abstract class CustomCursor extends Cursor {
protected Image image;
public CustomCursor(Image cursor, Point hotSpot, String name)
throws IndexOutOfBoundsException {
super(name);
image = cursor;
Toolkit toolkit = Toolkit.getDefaultToolkit();
// Make sure image is fully loaded.
Component c = new Canvas(); // for its imageUpdate method
MediaTracker tracker = new MediaTracker(c);
tracker.addImage(cursor, 0);
try {
tracker.waitForAll();
} catch (InterruptedException e) {
}
int width = cursor.getWidth(c);
int height = cursor.getHeight(c);
// Fix for bug 4212593 The Toolkit.createCustomCursor does not
// check absence of the image of cursor
// If the image is invalid, the cursor will be hidden (made completely
// transparent). In this case, getBestCursorSize() will adjust negative w and h,
// but we need to set the hotspot inside the image here.
if (tracker.isErrorAny() || width < 0 || height < 0) {
hotSpot.x = hotSpot.y = 0;
}
// Scale image to nearest supported size.
Dimension nativeSize = toolkit.getBestCursorSize(width, height);
if ((nativeSize.width != width || nativeSize.height != height) &&
(nativeSize.width != 0 && nativeSize.height != 0)) {
cursor = cursor.getScaledInstance(nativeSize.width,
nativeSize.height,
Image.SCALE_DEFAULT);
width = nativeSize.width;
height = nativeSize.height;
}
// Verify that the hotspot is within cursor bounds.
if (hotSpot.x >= width || hotSpot.y >= height || hotSpot.x < 0 || hotSpot.y < 0) {
throw new IndexOutOfBoundsException("invalid hotSpot");
}
/* Extract ARGB array from image.
*
* A transparency mask can be created in native code by checking
* each pixel's top byte -- a 0 value means the pixel's transparent.
* Since each platform's format of the bitmap and mask are likely to
* be different, their creation shouldn't be here.
*/
int[] pixels = new int[width * height];
ImageProducer ip = cursor.getSource();
PixelGrabber pg = new PixelGrabber(ip, 0, 0, width, height,
pixels, 0, width);
try {
pg.grabPixels();
} catch (InterruptedException e) {
}
createNativeCursor(image, pixels, width, height, hotSpot.x, hotSpot.y);
}
protected abstract void createNativeCursor(Image im, int[] pixels,
int width, int height,
int xHotSpot, int yHotSpot);
}

View File

@@ -0,0 +1,311 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.io.*;
import java.util.*;
import sun.util.logging.PlatformLogger;
/*
* Internal class that manages sun.awt.Debug settings.
* Settings can be specified on a global, per-package,
* or per-class level.
*
* Properties affecting the behaviour of the Debug class are
* loaded from the awtdebug.properties file at class load
* time. The properties file is assumed to be in the
* user.home directory. A different file can be used
* by setting the awtdebug.properties system property.
* e.g. java -Dawtdebug.properties=foo.properties
*
* Only properties beginning with 'awtdebug' have any
* meaning-- all other properties are ignored.
*
* You can override the properties file by specifying
* 'awtdebug' props as system properties on the command line.
* e.g. java -Dawtdebug.trace=true
* Properties specific to a package or a class can be set
* by qualifying the property names as follows:
* awtdebug.<property name>.<class or package name>
* So for example, turning on tracing in the com.acme.Fubar
* class would be done as follows:
* awtdebug.trace.com.acme.Fubar=true
*
* Class settings always override package settings, which in
* turn override global settings.
*
* Addition from July, 2007.
*
* After the fix for 4638447 all the usage of DebugHelper
* classes in Java code are replaced with the corresponding
* Java Logging API calls. This file is now used only to
* control native logging.
*
* To enable native logging you should set the following
* system property to 'true': sun.awt.nativedebug. After
* the native logging is enabled, the actual debug settings
* are read the same way as described above (as before
* the fix for 4638447).
*/
final class DebugSettings {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.debug.DebugSettings");
/* standard debug property key names */
static final String PREFIX = "awtdebug";
static final String PROP_FILE = "properties";
/* default property settings */
private static final String DEFAULT_PROPS[] = {
"awtdebug.assert=true",
"awtdebug.trace=false",
"awtdebug.on=true",
"awtdebug.ctrace=false"
};
/* global instance of the settings object */
private static DebugSettings instance = null;
private Properties props = new Properties();
static void init() {
if (instance != null) {
return;
}
NativeLibLoader.loadLibraries();
instance = new DebugSettings();
instance.loadNativeSettings();
}
private DebugSettings() {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
loadProperties();
return null;
}
});
}
/*
* Load debug properties from file, then override
* with any command line specified properties
*/
private synchronized void loadProperties() {
// setup initial properties
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
loadDefaultProperties();
loadFileProperties();
loadSystemProperties();
return null;
}
});
// echo the initial property settings to stdout
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("DebugSettings:\n{0}", this);
}
}
public String toString() {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
PrintStream pout = new PrintStream(bout);
for (String key : props.stringPropertyNames()) {
String value = props.getProperty(key, "");
pout.println(key + " = " + value);
}
return new String(bout.toByteArray());
}
/*
* Sets up default property values
*/
private void loadDefaultProperties() {
// is there a more inefficient way to setup default properties?
// maybe, but this has got to be close to 100% non-optimal
try {
for ( int nprop = 0; nprop < DEFAULT_PROPS.length; nprop++ ) {
StringBufferInputStream in = new StringBufferInputStream(DEFAULT_PROPS[nprop]);
props.load(in);
in.close();
}
} catch(IOException ioe) {
}
}
/*
* load properties from file, overriding defaults
*/
private void loadFileProperties() {
String propPath;
Properties fileProps;
// check if the user specified a particular settings file
propPath = System.getProperty(PREFIX + "." + PROP_FILE, "");
if (propPath.equals("")) {
// otherwise get it from the user's home directory
propPath = System.getProperty("user.home", "") +
File.separator +
PREFIX + "." + PROP_FILE;
}
File propFile = new File(propPath);
try {
println("Reading debug settings from '" + propFile.getCanonicalPath() + "'...");
FileInputStream fin = new FileInputStream(propFile);
props.load(fin);
fin.close();
} catch ( FileNotFoundException fne ) {
println("Did not find settings file.");
} catch ( IOException ioe ) {
println("Problem reading settings, IOException: " + ioe.getMessage());
}
}
/*
* load properties from system props (command line spec'd usually),
* overriding default or file properties
*/
private void loadSystemProperties() {
// override file properties with system properties
Properties sysProps = System.getProperties();
for (String key : sysProps.stringPropertyNames()) {
String value = sysProps.getProperty(key,"");
// copy any "awtdebug" properties over
if ( key.startsWith(PREFIX) ) {
props.setProperty(key, value);
}
}
}
/**
* Gets named boolean property
* @param key Name of property
* @param defval Default value if property does not exist
* @return boolean value of the named property
*/
public synchronized boolean getBoolean(String key, boolean defval) {
String value = getString(key, String.valueOf(defval));
return value.equalsIgnoreCase("true");
}
/**
* Gets named integer property
* @param key Name of property
* @param defval Default value if property does not exist
* @return integer value of the named property
*/
public synchronized int getInt(String key, int defval) {
String value = getString(key, String.valueOf(defval));
return Integer.parseInt(value);
}
/**
* Gets named String property
* @param key Name of property
* @param defval Default value if property does not exist
* @return string value of the named property
*/
public synchronized String getString(String key, String defval) {
String actualKeyName = PREFIX + "." + key;
String value = props.getProperty(actualKeyName, defval);
//println(actualKeyName+"="+value);
return value;
}
private synchronized List<String> getPropertyNames() {
List<String> propNames = new LinkedList<>();
// remove global prefix from property names
for (String propName : props.stringPropertyNames()) {
propName = propName.substring(PREFIX.length()+1);
propNames.add(propName);
}
return propNames;
}
private void println(Object object) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(object.toString());
}
}
private static final String PROP_CTRACE = "ctrace";
private static final int PROP_CTRACE_LEN = PROP_CTRACE.length();
private native synchronized void setCTracingOn(boolean enabled);
private native synchronized void setCTracingOn(boolean enabled, String file);
private native synchronized void setCTracingOn(boolean enabled, String file, int line);
private void loadNativeSettings() {
boolean ctracingOn;
ctracingOn = getBoolean(PROP_CTRACE, false);
setCTracingOn(ctracingOn);
//
// Filter out file/line ctrace properties from debug settings
//
List<String> traces = new LinkedList<>();
for (String key : getPropertyNames()) {
if (key.startsWith(PROP_CTRACE) && key.length() > PROP_CTRACE_LEN) {
traces.add(key);
}
}
// sort traces list so file-level traces will be before line-level ones
Collections.sort(traces);
//
// Setup the trace points
//
for (String key : traces) {
String trace = key.substring(PROP_CTRACE_LEN+1);
String filespec;
String linespec;
int delim= trace.indexOf('@');
boolean enabled;
// parse out the filename and linenumber from the property name
filespec = delim != -1 ? trace.substring(0, delim) : trace;
linespec = delim != -1 ? trace.substring(delim+1) : "";
enabled = getBoolean(key, false);
//System.out.println("Key="+key+", File="+filespec+", Line="+linespec+", Enabled="+enabled);
if ( linespec.length() == 0 ) {
// set file specific trace setting
setCTracingOn(enabled, filespec);
} else {
// set line specific trace setting
int linenum = Integer.parseInt(linespec, 10);
setCTracingOn(enabled, filespec, linenum);
}
}
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Point;
import java.awt.Window;
import java.awt.peer.MouseInfoPeer;
public class DefaultMouseInfoPeer implements MouseInfoPeer {
/**
* Package-private constructor to prevent instantiation.
*/
DefaultMouseInfoPeer() {
}
public native int fillPointWithCoords(Point point);
public native boolean isWindowUnderMouse(Window w);
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.net.URL;
public abstract class DesktopBrowse {
private static volatile DesktopBrowse mInstance;
public static void setInstance(DesktopBrowse instance) {
if (mInstance != null) {
throw new IllegalStateException("DesktopBrowse instance has already been set.");
}
mInstance = instance;
}
public static DesktopBrowse getInstance() {
return mInstance;
}
public abstract void browse(URL url);
}

View File

@@ -0,0 +1,63 @@
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.util.EventListener;
/**
* The listener interface for receiving display change events.
* The class that is interested in processing a display change event
* implements this interface (and all the methods it
* contains).
*
* For Motif, this interface is only used for dragging windows between Xinerama
* screens.
*
* For win32, the listener object created from that class is then registered
* with the WToolkit object using its <code>addDisplayChangeListener</code>
* method. When the display resolution is changed (which occurs,
* in Windows, either by the user changing the properties of the
* display through the control panel or other utility or by
* some other application which has gotten fullscreen-exclusive
* control of the display), the listener is notified through its
* displayChanged() or paletteChanged() methods.
*
* @author Chet Haase
* @author Brent Christian
* @since 1.4
*/
public interface DisplayChangedListener extends EventListener {
/**
* Invoked when the display mode has changed.
*/
public void displayChanged();
/**
* Invoked when the palette has changed.
*/
public void paletteChanged();
}

View File

@@ -0,0 +1,586 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.awt.peer.*;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
import java.util.Set;
import java.awt.AWTKeyStroke;
import java.applet.Applet;
import sun.applet.AppletPanel;
/**
* A generic container used for embedding Java components, usually applets.
* An EmbeddedFrame has two related uses:
*
* . Within a Java-based application, an EmbeddedFrame serves as a sort of
* firewall, preventing the contained components or applets from using
* getParent() to find parent components, such as menubars.
*
* . Within a C-based application, an EmbeddedFrame contains a window handle
* which was created by the application, which serves as the top-level
* Java window. EmbeddedFrames created for this purpose are passed-in a
* handle of an existing window created by the application. The window
* handle should be of the appropriate native type for a specific
* platform, as stored in the pData field of the ComponentPeer.
*
* @author Thomas Ball
*/
public abstract class EmbeddedFrame extends Frame
implements KeyEventDispatcher, PropertyChangeListener {
private boolean isCursorAllowed = true;
private boolean supportsXEmbed = false;
private KeyboardFocusManager appletKFM;
// JDK 1.1 compatibility
private static final long serialVersionUID = 2967042741780317130L;
/*
* The constants define focus traversal directions.
* Use them in {@code traverseIn}, {@code traverseOut} methods.
*/
protected static final boolean FORWARD = true;
protected static final boolean BACKWARD = false;
public boolean supportsXEmbed() {
return supportsXEmbed && SunToolkit.needsXEmbed();
}
protected EmbeddedFrame(boolean supportsXEmbed) {
this((long)0, supportsXEmbed);
}
protected EmbeddedFrame() {
this((long)0);
}
/**
* @deprecated This constructor will be removed in 1.5
*/
@Deprecated
protected EmbeddedFrame(int handle) {
this((long)handle);
}
protected EmbeddedFrame(long handle) {
this(handle, false);
}
protected EmbeddedFrame(long handle, boolean supportsXEmbed) {
this.supportsXEmbed = supportsXEmbed;
registerListeners();
}
/**
* Block introspection of a parent window by this child.
*/
public Container getParent() {
return null;
}
/**
* Needed to track which KeyboardFocusManager is current. We want to avoid memory
* leaks, so when KFM stops being current, we remove ourselves as listeners.
*/
public void propertyChange(PropertyChangeEvent evt) {
// We don't handle any other properties. Skip it.
if (!evt.getPropertyName().equals("managingFocus")) {
return;
}
// We only do it if it stops being current. Technically, we should
// never get an event about KFM starting being current.
if (evt.getNewValue() == Boolean.TRUE) {
return;
}
// should be the same as appletKFM
removeTraversingOutListeners((KeyboardFocusManager)evt.getSource());
appletKFM = KeyboardFocusManager.getCurrentKeyboardFocusManager();
if (isVisible()) {
addTraversingOutListeners(appletKFM);
}
}
/**
* Register us as KeyEventDispatcher and property "managingFocus" listeners.
*/
private void addTraversingOutListeners(KeyboardFocusManager kfm) {
kfm.addKeyEventDispatcher(this);
kfm.addPropertyChangeListener("managingFocus", this);
}
/**
* Deregister us as KeyEventDispatcher and property "managingFocus" listeners.
*/
private void removeTraversingOutListeners(KeyboardFocusManager kfm) {
kfm.removeKeyEventDispatcher(this);
kfm.removePropertyChangeListener("managingFocus", this);
}
/**
* Because there may be many AppContexts, and we can't be sure where this
* EmbeddedFrame is first created or shown, we can't automatically determine
* the correct KeyboardFocusManager to attach to as KeyEventDispatcher.
* Those who want to use the functionality of traversing out of the EmbeddedFrame
* must call this method on the Applet's AppContext. After that, all the changes
* can be handled automatically, including possible replacement of
* KeyboardFocusManager.
*/
public void registerListeners() {
if (appletKFM != null) {
removeTraversingOutListeners(appletKFM);
}
appletKFM = KeyboardFocusManager.getCurrentKeyboardFocusManager();
if (isVisible()) {
addTraversingOutListeners(appletKFM);
}
}
/**
* Needed to avoid memory leak: we register this EmbeddedFrame as a listener with
* KeyboardFocusManager of applet's AppContext. We don't want the KFM to keep
* reference to our EmbeddedFrame forever if the Frame is no longer in use, so we
* add listeners in show() and remove them in hide().
*/
@SuppressWarnings("deprecation")
public void show() {
if (appletKFM != null) {
addTraversingOutListeners(appletKFM);
}
super.show();
}
/**
* Needed to avoid memory leak: we register this EmbeddedFrame as a listener with
* KeyboardFocusManager of applet's AppContext. We don't want the KFM to keep
* reference to our EmbeddedFrame forever if the Frame is no longer in use, so we
* add listeners in show() and remove them in hide().
*/
@SuppressWarnings("deprecation")
public void hide() {
if (appletKFM != null) {
removeTraversingOutListeners(appletKFM);
}
super.hide();
}
/**
* Need this method to detect when the focus may have chance to leave the
* focus cycle root which is EmbeddedFrame. Mostly, the code here is copied
* from DefaultKeyboardFocusManager.processKeyEvent with some minor
* modifications.
*/
public boolean dispatchKeyEvent(KeyEvent e) {
Container currentRoot = AWTAccessor.getKeyboardFocusManagerAccessor()
.getCurrentFocusCycleRoot();
// if we are not in EmbeddedFrame's cycle, we should not try to leave.
if (this != currentRoot) {
return false;
}
// KEY_TYPED events cannot be focus traversal keys
if (e.getID() == KeyEvent.KEY_TYPED) {
return false;
}
if (!getFocusTraversalKeysEnabled() || e.isConsumed()) {
return false;
}
AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e);
Set<AWTKeyStroke> toTest;
Component currentFocused = e.getComponent();
toTest = getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
if (toTest.contains(stroke)) {
// 6581899: performance improvement for SortingFocusTraversalPolicy
Component last = getFocusTraversalPolicy().getLastComponent(this);
if (currentFocused == last || last == null) {
if (traverseOut(FORWARD)) {
e.consume();
return true;
}
}
}
toTest = getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
if (toTest.contains(stroke)) {
// 6581899: performance improvement for SortingFocusTraversalPolicy
Component first = getFocusTraversalPolicy().getFirstComponent(this);
if (currentFocused == first || first == null) {
if (traverseOut(BACKWARD)) {
e.consume();
return true;
}
}
}
return false;
}
/**
* This method is called by the embedder when we should receive focus as element
* of the traversal chain. The method requests focus on:
* 1. the first Component of this EmbeddedFrame if user moves focus forward
* in the focus traversal cycle.
* 2. the last Component of this EmbeddedFrame if user moves focus backward
* in the focus traversal cycle.
*
* The direction parameter specifies which of the two mentioned cases is
* happening. Use FORWARD and BACKWARD constants defined in the EmbeddedFrame class
* to avoid confusing boolean values.
*
* A concrete implementation of this method is defined in the platform-dependent
* subclasses.
*
* @param direction FORWARD or BACKWARD
* @return true, if the EmbeddedFrame wants to get focus, false otherwise.
*/
public boolean traverseIn(boolean direction) {
Component comp = null;
if (direction == FORWARD) {
comp = getFocusTraversalPolicy().getFirstComponent(this);
} else {
comp = getFocusTraversalPolicy().getLastComponent(this);
}
if (comp != null) {
// comp.requestFocus(); - Leads to a hung.
AWTAccessor.getKeyboardFocusManagerAccessor().setMostRecentFocusOwner(this, comp);
synthesizeWindowActivation(true);
}
return (null != comp);
}
/**
* This method is called from dispatchKeyEvent in the following two cases:
* 1. The focus is on the first Component of this EmbeddedFrame and we are
* about to transfer the focus backward.
* 2. The focus in on the last Component of this EmbeddedFrame and we are
* about to transfer the focus forward.
* This is needed to give the opportuity for keyboard focus to leave the
* EmbeddedFrame. Override this method, initiate focus transfer in it and
* return true if you want the focus to leave EmbeddedFrame's cycle.
* The direction parameter specifies which of the two mentioned cases is
* happening. Use FORWARD and BACKWARD constants defined in EmbeddedFrame
* to avoid confusing boolean values.
*
* @param direction FORWARD or BACKWARD
* @return true, if EmbeddedFrame wants the focus to leave it,
* false otherwise.
*/
protected boolean traverseOut(boolean direction) {
return false;
}
/**
* Block modifying any frame attributes, since they aren't applicable
* for EmbeddedFrames.
*/
public void setTitle(String title) {}
public void setIconImage(Image image) {}
public void setIconImages(java.util.List<? extends Image> icons) {}
public void setMenuBar(MenuBar mb) {}
public void setResizable(boolean resizable) {}
public void remove(MenuComponent m) {}
public boolean isResizable() {
return true;
}
@SuppressWarnings("deprecation")
public void addNotify() {
synchronized (getTreeLock()) {
if (getPeer() == null) {
setPeer(new NullEmbeddedFramePeer());
}
super.addNotify();
}
}
// These three functions consitute RFE 4100710. Do not remove.
@SuppressWarnings("deprecation")
public void setCursorAllowed(boolean isCursorAllowed) {
this.isCursorAllowed = isCursorAllowed;
getPeer().updateCursorImmediately();
}
public boolean isCursorAllowed() {
return isCursorAllowed;
}
public Cursor getCursor() {
return (isCursorAllowed)
? super.getCursor()
: Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
}
@SuppressWarnings("deprecation")
protected void setPeer(final ComponentPeer p){
AWTAccessor.getComponentAccessor().setPeer(EmbeddedFrame.this, p);
};
/**
* Synthesize native message to activate or deactivate EmbeddedFrame window
* depending on the value of parameter <code>b</code>.
* Peers should override this method if they are to implement
* this functionality.
* @param doActivate if <code>true</code>, activates the window;
* otherwise, deactivates the window
*/
public void synthesizeWindowActivation(boolean doActivate) {}
/**
* Moves this embedded frame to a new location. The top-left corner of
* the new location is specified by the <code>x</code> and <code>y</code>
* parameters relative to the native parent component.
* <p>
* setLocation() and setBounds() for EmbeddedFrame really don't move it
* within the native parent. These methods always put embedded frame to
* (0, 0) for backward compatibility. To allow moving embedded frame
* setLocationPrivate() and setBoundsPrivate() were introduced, and they
* work just the same way as setLocation() and setBounds() for usual,
* non-embedded components.
* </p>
* <p>
* Using usual get/setLocation() and get/setBounds() together with new
* get/setLocationPrivate() and get/setBoundsPrivate() is not recommended.
* For example, calling getBoundsPrivate() after setLocation() works fine,
* but getBounds() after setBoundsPrivate() may return unpredictable value.
* </p>
* @param x the new <i>x</i>-coordinate relative to the parent component
* @param y the new <i>y</i>-coordinate relative to the parent component
* @see java.awt.Component#setLocation
* @see #getLocationPrivate
* @see #setBoundsPrivate
* @see #getBoundsPrivate
* @since 1.5
*/
protected void setLocationPrivate(int x, int y) {
Dimension size = getSize();
setBoundsPrivate(x, y, size.width, size.height);
}
/**
* Gets the location of this embedded frame as a point specifying the
* top-left corner relative to parent component.
* <p>
* setLocation() and setBounds() for EmbeddedFrame really don't move it
* within the native parent. These methods always put embedded frame to
* (0, 0) for backward compatibility. To allow getting location and size
* of embedded frame getLocationPrivate() and getBoundsPrivate() were
* introduced, and they work just the same way as getLocation() and getBounds()
* for ususal, non-embedded components.
* </p>
* <p>
* Using usual get/setLocation() and get/setBounds() together with new
* get/setLocationPrivate() and get/setBoundsPrivate() is not recommended.
* For example, calling getBoundsPrivate() after setLocation() works fine,
* but getBounds() after setBoundsPrivate() may return unpredictable value.
* </p>
* @return a point indicating this embedded frame's top-left corner
* @see java.awt.Component#getLocation
* @see #setLocationPrivate
* @see #setBoundsPrivate
* @see #getBoundsPrivate
* @since 1.6
*/
protected Point getLocationPrivate() {
Rectangle bounds = getBoundsPrivate();
return new Point(bounds.x, bounds.y);
}
/**
* Moves and resizes this embedded frame. The new location of the top-left
* corner is specified by <code>x</code> and <code>y</code> parameters
* relative to the native parent component. The new size is specified by
* <code>width</code> and <code>height</code>.
* <p>
* setLocation() and setBounds() for EmbeddedFrame really don't move it
* within the native parent. These methods always put embedded frame to
* (0, 0) for backward compatibility. To allow moving embedded frames
* setLocationPrivate() and setBoundsPrivate() were introduced, and they
* work just the same way as setLocation() and setBounds() for usual,
* non-embedded components.
* </p>
* <p>
* Using usual get/setLocation() and get/setBounds() together with new
* get/setLocationPrivate() and get/setBoundsPrivate() is not recommended.
* For example, calling getBoundsPrivate() after setLocation() works fine,
* but getBounds() after setBoundsPrivate() may return unpredictable value.
* </p>
* @param x the new <i>x</i>-coordinate relative to the parent component
* @param y the new <i>y</i>-coordinate relative to the parent component
* @param width the new <code>width</code> of this embedded frame
* @param height the new <code>height</code> of this embedded frame
* @see java.awt.Component#setBounds
* @see #setLocationPrivate
* @see #getLocationPrivate
* @see #getBoundsPrivate
* @since 1.5
*/
@SuppressWarnings("deprecation")
protected void setBoundsPrivate(int x, int y, int width, int height) {
final FramePeer peer = (FramePeer)getPeer();
if (peer != null) {
peer.setBoundsPrivate(x, y, width, height);
}
}
/**
* Gets the bounds of this embedded frame as a rectangle specifying the
* width, height and location relative to the native parent component.
* <p>
* setLocation() and setBounds() for EmbeddedFrame really don't move it
* within the native parent. These methods always put embedded frame to
* (0, 0) for backward compatibility. To allow getting location and size
* of embedded frames getLocationPrivate() and getBoundsPrivate() were
* introduced, and they work just the same way as getLocation() and getBounds()
* for ususal, non-embedded components.
* </p>
* <p>
* Using usual get/setLocation() and get/setBounds() together with new
* get/setLocationPrivate() and get/setBoundsPrivate() is not recommended.
* For example, calling getBoundsPrivate() after setLocation() works fine,
* but getBounds() after setBoundsPrivate() may return unpredictable value.
* </p>
* @return a rectangle indicating this embedded frame's bounds
* @see java.awt.Component#getBounds
* @see #setLocationPrivate
* @see #getLocationPrivate
* @see #setBoundsPrivate
* @since 1.6
*/
@SuppressWarnings("deprecation")
protected Rectangle getBoundsPrivate() {
final FramePeer peer = (FramePeer)getPeer();
if (peer != null) {
return peer.getBoundsPrivate();
}
else {
return getBounds();
}
}
public void toFront() {}
public void toBack() {}
public abstract void registerAccelerator(AWTKeyStroke stroke);
public abstract void unregisterAccelerator(AWTKeyStroke stroke);
/**
* Checks if the component is in an EmbeddedFrame. If so,
* returns the applet found in the hierarchy or null if
* not found.
* @return the parent applet or {@ null}
* @since 1.6
*/
public static Applet getAppletIfAncestorOf(Component comp) {
Container parent = comp.getParent();
Applet applet = null;
while (parent != null && !(parent instanceof EmbeddedFrame)) {
if (parent instanceof Applet) {
applet = (Applet)parent;
}
parent = parent.getParent();
}
return parent == null ? null : applet;
}
/**
* This method should be overriden in subclasses. It is
* called when window this frame is within should be blocked
* by some modal dialog.
*/
public void notifyModalBlocked(Dialog blocker, boolean blocked) {
}
private static class NullEmbeddedFramePeer
extends NullComponentPeer implements FramePeer {
public void setTitle(String title) {}
public void setIconImage(Image im) {}
public void updateIconImages() {}
public void setMenuBar(MenuBar mb) {}
public void setResizable(boolean resizeable) {}
public void setState(int state) {}
public int getState() { return Frame.NORMAL; }
public void setMaximizedBounds(Rectangle b) {}
public void toFront() {}
public void toBack() {}
public void updateFocusableWindowState() {}
public void updateAlwaysOnTop() {}
public void updateAlwaysOnTopState() {}
public Component getGlobalHeavyweightFocusOwner() { return null; }
public void setBoundsPrivate(int x, int y, int width, int height) {
setBounds(x, y, width, height, SET_BOUNDS);
}
public Rectangle getBoundsPrivate() {
return getBounds();
}
public void setModalBlocked(Dialog blocker, boolean blocked) {}
/**
* @see java.awt.peer.ContainerPeer#restack
*/
public void restack() {
throw new UnsupportedOperationException();
}
/**
* @see java.awt.peer.ContainerPeer#isRestackSupported
*/
public boolean isRestackSupported() {
return false;
}
public boolean requestWindowFocus() {
return false;
}
public void updateMinimumSize() {
}
public void setOpacity(float opacity) {
}
public void setOpaque(boolean isOpaque) {
}
public void updateWindow() {
}
public void repositionSecurityWarning() {
}
public void emulateActivation(boolean activate) {
}
}
} // class EmbeddedFrame

View File

@@ -0,0 +1,175 @@
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.lang.reflect.Array;
import java.util.EventListener;
/**
* A class that assists in managing {@link java.util.EventListener}s of
* the specified type. Its instance holds an array of listeners of the same
* type and allows to perform the typical operations on the listeners.
* This class is thread-safe.
*
* @author Alexander Gerasimov
*
* @since 1.5
*/
public class EventListenerAggregate {
private EventListener[] listenerList;
/**
* Constructs an <code>EventListenerAggregate</code> object.
*
* @param listenerClass the type of the listeners to be managed by this object
*
* @throws NullPointerException if <code>listenerClass</code> is
* <code>null</code>
* @throws ClassCastException if <code>listenerClass</code> is not
* assignable to <code>java.util.EventListener</code>
*/
public EventListenerAggregate(Class<? extends EventListener> listenerClass) {
if (listenerClass == null) {
throw new NullPointerException("listener class is null");
}
listenerList = (EventListener[])Array.newInstance(listenerClass, 0);
}
private Class<?> getListenerClass() {
return listenerList.getClass().getComponentType();
}
/**
* Adds the listener to this aggregate.
*
* @param listener the listener to be added
*
* @throws ClassCastException if <code>listener</code> is not
* an instatce of <code>listenerClass</code> specified
* in the constructor
*/
public synchronized void add(EventListener listener) {
Class<?> listenerClass = getListenerClass();
if (!listenerClass.isInstance(listener)) { // null is not an instance of any class
throw new ClassCastException("listener " + listener + " is not " +
"an instance of listener class " + listenerClass);
}
EventListener[] tmp = (EventListener[])Array.newInstance(listenerClass, listenerList.length + 1);
System.arraycopy(listenerList, 0, tmp, 0, listenerList.length);
tmp[listenerList.length] = listener;
listenerList = tmp;
}
/**
* Removes a listener that is equal to the given one from this aggregate.
* <code>equals()</code> method is used to compare listeners.
*
* @param listener the listener to be removed
*
* @return <code>true</code> if this aggregate contained the specified
* <code>listener</code>; <code>false</code> otherwise
*
* @throws ClassCastException if <code>listener</code> is not
* an instatce of <code>listenerClass</code> specified
* in the constructor
*/
public synchronized boolean remove(EventListener listener) {
Class<?> listenerClass = getListenerClass();
if (!listenerClass.isInstance(listener)) { // null is not an instance of any class
throw new ClassCastException("listener " + listener + " is not " +
"an instance of listener class " + listenerClass);
}
for (int i = 0; i < listenerList.length; i++) {
if (listenerList[i].equals(listener)) {
EventListener[] tmp = (EventListener[])Array.newInstance(listenerClass,
listenerList.length - 1);
System.arraycopy(listenerList, 0, tmp, 0, i);
System.arraycopy(listenerList, i + 1, tmp, i, listenerList.length - i - 1);
listenerList = tmp;
return true;
}
}
return false;
}
/**
* Returns an array of all the listeners contained in this aggregate.
* The array is the data structure in which listeners are stored internally.
* The runtime type of the returned array is "array of <code>listenerClass</code>"
* (<code>listenerClass</code> has been specified as a parameter to
* the constructor of this class).
*
* @return all the listeners contained in this aggregate (an empty
* array if there are no listeners)
*/
public synchronized EventListener[] getListenersInternal() {
return listenerList;
}
/**
* Returns an array of all the listeners contained in this aggregate.
* The array is a copy of the data structure in which listeners are stored
* internally.
* The runtime type of the returned array is "array of <code>listenerClass</code>"
* (<code>listenerClass</code> has been specified as a parameter to
* the constructor of this class).
*
* @return a copy of all the listeners contained in this aggregate (an empty
* array if there are no listeners)
*/
public synchronized EventListener[] getListenersCopy() {
return (listenerList.length == 0) ? listenerList : listenerList.clone();
}
/**
* Returns the number of lisetners in this aggregate.
*
* @return the number of lisetners in this aggregate
*/
public synchronized int size() {
return listenerList.length;
}
/**
* Returns <code>true</code> if this aggregate contains no listeners,
* <code>false</code> otherwise.
*
* @return <code>true</code> if this aggregate contains no listeners,
* <code>false</code> otherwise
*/
public synchronized boolean isEmpty() {
return listenerList.length == 0;
}
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTEvent;
import java.awt.EventQueue;
public class EventQueueDelegate {
private static final Object EVENT_QUEUE_DELEGATE_KEY =
new StringBuilder("EventQueueDelegate.Delegate");
public static void setDelegate(Delegate delegate) {
AppContext.getAppContext().put(EVENT_QUEUE_DELEGATE_KEY, delegate);
}
public static Delegate getDelegate() {
return
(Delegate) AppContext.getAppContext().get(EVENT_QUEUE_DELEGATE_KEY);
}
public interface Delegate {
/**
* This method allows for changing {@code EventQueue} events order.
*
* @param eventQueue current {@code EventQueue}
* @return next {@code event} for the {@code EventDispatchThread}
*/
public AWTEvent getNextEvent(EventQueue eventQueue) throws InterruptedException;
/**
* Notifies delegate before EventQueue.dispatch method.
*
* Note: this method may mutate the event
*
* @param event to be dispatched by {@code dispatch} method
* @return handle to be passed to {@code afterDispatch} method
*/
public Object beforeDispatch(AWTEvent event) throws InterruptedException;
/**
* Notifies delegate after EventQueue.dispatch method.
*
* @param event {@code event} dispatched by the {@code dispatch} method
* @param handle object which came from {@code beforeDispatch} method
*/
public void afterDispatch(AWTEvent event, Object handle) throws InterruptedException;
}
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTEvent;
public class EventQueueItem {
public AWTEvent event;
public EventQueueItem next;
public EventQueueItem(AWTEvent evt) {
event = evt;
}
}

View File

@@ -0,0 +1,669 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.awt.event.KeyEvent;
public class ExtendedKeyCodes {
/**
* ATTN: These are the readonly hashes with load factor == 1;
* adding a value, please set the inital capacity to exact number of items
* or higher.
*/
// Keycodes declared in KeyEvent.java with corresponding Unicode values.
private final static HashMap<Integer, Integer> regularKeyCodesMap =
new HashMap<Integer,Integer>(98, 1.0f);
// Keycodes derived from Unicode values. Here should be collected codes
// for characters appearing on the primary layer of at least one
// known keyboard layout. For instance, sterling sign is on the primary layer
// of the Mac Italian layout.
private final static HashSet<Integer> extendedKeyCodesSet =
new HashSet<Integer>(501, 1.0f);
final public static int getExtendedKeyCodeForChar( int c ) {
int uc = Character.toUpperCase( c );
int lc = Character.toLowerCase( c );
if (regularKeyCodesMap.containsKey( c )) {
if(regularKeyCodesMap.containsKey(uc)) {
return regularKeyCodesMap.get( uc );
}
return regularKeyCodesMap.get( c );
}
uc += 0x01000000;
lc += 0x01000000;
if (extendedKeyCodesSet.contains( uc )) {
return uc;
}else if (extendedKeyCodesSet.contains( lc )) {
return lc;
}
return KeyEvent.VK_UNDEFINED;
}
static {
regularKeyCodesMap.put(0x08, KeyEvent.VK_BACK_SPACE);
regularKeyCodesMap.put(0x09, KeyEvent.VK_TAB);
regularKeyCodesMap.put(0x0a, KeyEvent.VK_ENTER);
regularKeyCodesMap.put(0x1B, KeyEvent.VK_ESCAPE);
regularKeyCodesMap.put(0x20AC, KeyEvent.VK_EURO_SIGN);
regularKeyCodesMap.put(0x20, KeyEvent.VK_SPACE);
regularKeyCodesMap.put(0x21, KeyEvent.VK_EXCLAMATION_MARK);
regularKeyCodesMap.put(0x22, KeyEvent.VK_QUOTEDBL);
regularKeyCodesMap.put(0x23, KeyEvent.VK_NUMBER_SIGN);
regularKeyCodesMap.put(0x24, KeyEvent.VK_DOLLAR);
regularKeyCodesMap.put(0x26, KeyEvent.VK_AMPERSAND);
regularKeyCodesMap.put(0x27, KeyEvent.VK_QUOTE);
regularKeyCodesMap.put(0x28, KeyEvent.VK_LEFT_PARENTHESIS);
regularKeyCodesMap.put(0x29, KeyEvent.VK_RIGHT_PARENTHESIS);
regularKeyCodesMap.put(0x2A, KeyEvent.VK_ASTERISK);
regularKeyCodesMap.put(0x2B, KeyEvent.VK_PLUS);
regularKeyCodesMap.put(0x2C, KeyEvent.VK_COMMA);
regularKeyCodesMap.put(0x2D, KeyEvent.VK_MINUS);
regularKeyCodesMap.put(0x2E, KeyEvent.VK_PERIOD);
regularKeyCodesMap.put(0x2F, KeyEvent.VK_SLASH);
regularKeyCodesMap.put(0x30, KeyEvent.VK_0);
regularKeyCodesMap.put(0x31, KeyEvent.VK_1);
regularKeyCodesMap.put(0x32, KeyEvent.VK_2);
regularKeyCodesMap.put(0x33, KeyEvent.VK_3);
regularKeyCodesMap.put(0x34, KeyEvent.VK_4);
regularKeyCodesMap.put(0x35, KeyEvent.VK_5);
regularKeyCodesMap.put(0x36, KeyEvent.VK_6);
regularKeyCodesMap.put(0x37, KeyEvent.VK_7);
regularKeyCodesMap.put(0x38, KeyEvent.VK_8);
regularKeyCodesMap.put(0x39, KeyEvent.VK_9);
regularKeyCodesMap.put(0x3A, KeyEvent.VK_COLON);
regularKeyCodesMap.put(0x3B, KeyEvent.VK_SEMICOLON);
regularKeyCodesMap.put(0x3C, KeyEvent.VK_LESS);
regularKeyCodesMap.put(0x3D, KeyEvent.VK_EQUALS);
regularKeyCodesMap.put(0x3E, KeyEvent.VK_GREATER);
regularKeyCodesMap.put(0x40, KeyEvent.VK_AT);
regularKeyCodesMap.put(0x41, KeyEvent.VK_A);
regularKeyCodesMap.put(0x42, KeyEvent.VK_B);
regularKeyCodesMap.put(0x43, KeyEvent.VK_C);
regularKeyCodesMap.put(0x44, KeyEvent.VK_D);
regularKeyCodesMap.put(0x45, KeyEvent.VK_E);
regularKeyCodesMap.put(0x46, KeyEvent.VK_F);
regularKeyCodesMap.put(0x47, KeyEvent.VK_G);
regularKeyCodesMap.put(0x48, KeyEvent.VK_H);
regularKeyCodesMap.put(0x49, KeyEvent.VK_I);
regularKeyCodesMap.put(0x4A, KeyEvent.VK_J);
regularKeyCodesMap.put(0x4B, KeyEvent.VK_K);
regularKeyCodesMap.put(0x4C, KeyEvent.VK_L);
regularKeyCodesMap.put(0x4D, KeyEvent.VK_M);
regularKeyCodesMap.put(0x4E, KeyEvent.VK_N);
regularKeyCodesMap.put(0x4F, KeyEvent.VK_O);
regularKeyCodesMap.put(0x50, KeyEvent.VK_P);
regularKeyCodesMap.put(0x51, KeyEvent.VK_Q);
regularKeyCodesMap.put(0x52, KeyEvent.VK_R);
regularKeyCodesMap.put(0x53, KeyEvent.VK_S);
regularKeyCodesMap.put(0x54, KeyEvent.VK_T);
regularKeyCodesMap.put(0x55, KeyEvent.VK_U);
regularKeyCodesMap.put(0x56, KeyEvent.VK_V);
regularKeyCodesMap.put(0x57, KeyEvent.VK_W);
regularKeyCodesMap.put(0x58, KeyEvent.VK_X);
regularKeyCodesMap.put(0x59, KeyEvent.VK_Y);
regularKeyCodesMap.put(0x5A, KeyEvent.VK_Z);
regularKeyCodesMap.put(0x5B, KeyEvent.VK_OPEN_BRACKET);
regularKeyCodesMap.put(0x5C, KeyEvent.VK_BACK_SLASH);
regularKeyCodesMap.put(0x5D, KeyEvent.VK_CLOSE_BRACKET);
regularKeyCodesMap.put(0x5E, KeyEvent.VK_CIRCUMFLEX);
regularKeyCodesMap.put(0x5F, KeyEvent.VK_UNDERSCORE);
regularKeyCodesMap.put(0x60, KeyEvent.VK_BACK_QUOTE);
regularKeyCodesMap.put(0x61, KeyEvent.VK_A);
regularKeyCodesMap.put(0x62, KeyEvent.VK_B);
regularKeyCodesMap.put(0x63, KeyEvent.VK_C);
regularKeyCodesMap.put(0x64, KeyEvent.VK_D);
regularKeyCodesMap.put(0x65, KeyEvent.VK_E);
regularKeyCodesMap.put(0x66, KeyEvent.VK_F);
regularKeyCodesMap.put(0x67, KeyEvent.VK_G);
regularKeyCodesMap.put(0x68, KeyEvent.VK_H);
regularKeyCodesMap.put(0x69, KeyEvent.VK_I);
regularKeyCodesMap.put(0x6A, KeyEvent.VK_J);
regularKeyCodesMap.put(0x6B, KeyEvent.VK_K);
regularKeyCodesMap.put(0x6C, KeyEvent.VK_L);
regularKeyCodesMap.put(0x6D, KeyEvent.VK_M);
regularKeyCodesMap.put(0x6E, KeyEvent.VK_N);
regularKeyCodesMap.put(0x6F, KeyEvent.VK_O);
regularKeyCodesMap.put(0x70, KeyEvent.VK_P);
regularKeyCodesMap.put(0x71, KeyEvent.VK_Q);
regularKeyCodesMap.put(0x72, KeyEvent.VK_R);
regularKeyCodesMap.put(0x73, KeyEvent.VK_S);
regularKeyCodesMap.put(0x74, KeyEvent.VK_T);
regularKeyCodesMap.put(0x75, KeyEvent.VK_U);
regularKeyCodesMap.put(0x76, KeyEvent.VK_V);
regularKeyCodesMap.put(0x77, KeyEvent.VK_W);
regularKeyCodesMap.put(0x78, KeyEvent.VK_X);
regularKeyCodesMap.put(0x79, KeyEvent.VK_Y);
regularKeyCodesMap.put(0x7A, KeyEvent.VK_Z);
regularKeyCodesMap.put(0x7B, KeyEvent.VK_BRACELEFT);
regularKeyCodesMap.put(0x7D, KeyEvent.VK_BRACERIGHT);
regularKeyCodesMap.put(0x7F, KeyEvent.VK_DELETE);
regularKeyCodesMap.put(0xA1, KeyEvent.VK_INVERTED_EXCLAMATION_MARK);
extendedKeyCodesSet.add(0x01000000+0x0060);
extendedKeyCodesSet.add(0x01000000+0x007C);
extendedKeyCodesSet.add(0x01000000+0x007E);
extendedKeyCodesSet.add(0x01000000+0x00A2);
extendedKeyCodesSet.add(0x01000000+0x00A3);
extendedKeyCodesSet.add(0x01000000+0x00A5);
extendedKeyCodesSet.add(0x01000000+0x00A7);
extendedKeyCodesSet.add(0x01000000+0x00A8);
extendedKeyCodesSet.add(0x01000000+0x00AB);
extendedKeyCodesSet.add(0x01000000+0x00B0);
extendedKeyCodesSet.add(0x01000000+0x00B1);
extendedKeyCodesSet.add(0x01000000+0x00B2);
extendedKeyCodesSet.add(0x01000000+0x00B3);
extendedKeyCodesSet.add(0x01000000+0x00B4);
extendedKeyCodesSet.add(0x01000000+0x00B5);
extendedKeyCodesSet.add(0x01000000+0x00B6);
extendedKeyCodesSet.add(0x01000000+0x00B7);
extendedKeyCodesSet.add(0x01000000+0x00B9);
extendedKeyCodesSet.add(0x01000000+0x00BA);
extendedKeyCodesSet.add(0x01000000+0x00BB);
extendedKeyCodesSet.add(0x01000000+0x00BC);
extendedKeyCodesSet.add(0x01000000+0x00BD);
extendedKeyCodesSet.add(0x01000000+0x00BE);
extendedKeyCodesSet.add(0x01000000+0x00BF);
extendedKeyCodesSet.add(0x01000000+0x00C4);
extendedKeyCodesSet.add(0x01000000+0x00C5);
extendedKeyCodesSet.add(0x01000000+0x00C6);
extendedKeyCodesSet.add(0x01000000+0x00C7);
extendedKeyCodesSet.add(0x01000000+0x00D1);
extendedKeyCodesSet.add(0x01000000+0x00D6);
extendedKeyCodesSet.add(0x01000000+0x00D7);
extendedKeyCodesSet.add(0x01000000+0x00D8);
extendedKeyCodesSet.add(0x01000000+0x00DF);
extendedKeyCodesSet.add(0x01000000+0x00E0);
extendedKeyCodesSet.add(0x01000000+0x00E1);
extendedKeyCodesSet.add(0x01000000+0x00E2);
extendedKeyCodesSet.add(0x01000000+0x00E4);
extendedKeyCodesSet.add(0x01000000+0x00E5);
extendedKeyCodesSet.add(0x01000000+0x00E6);
extendedKeyCodesSet.add(0x01000000+0x00E7);
extendedKeyCodesSet.add(0x01000000+0x00E8);
extendedKeyCodesSet.add(0x01000000+0x00E9);
extendedKeyCodesSet.add(0x01000000+0x00EA);
extendedKeyCodesSet.add(0x01000000+0x00EB);
extendedKeyCodesSet.add(0x01000000+0x00EC);
extendedKeyCodesSet.add(0x01000000+0x00ED);
extendedKeyCodesSet.add(0x01000000+0x00EE);
extendedKeyCodesSet.add(0x01000000+0x00F0);
extendedKeyCodesSet.add(0x01000000+0x00F1);
extendedKeyCodesSet.add(0x01000000+0x00F2);
extendedKeyCodesSet.add(0x01000000+0x00F3);
extendedKeyCodesSet.add(0x01000000+0x00F4);
extendedKeyCodesSet.add(0x01000000+0x00F5);
extendedKeyCodesSet.add(0x01000000+0x00F6);
extendedKeyCodesSet.add(0x01000000+0x00F7);
extendedKeyCodesSet.add(0x01000000+0x00F8);
extendedKeyCodesSet.add(0x01000000+0x00F9);
extendedKeyCodesSet.add(0x01000000+0x00FA);
extendedKeyCodesSet.add(0x01000000+0x00FB);
extendedKeyCodesSet.add(0x01000000+0x00FC);
extendedKeyCodesSet.add(0x01000000+0x00FD);
extendedKeyCodesSet.add(0x01000000+0x00FE);
extendedKeyCodesSet.add(0x01000000+0x0105);
extendedKeyCodesSet.add(0x01000000+0x02DB);
extendedKeyCodesSet.add(0x01000000+0x0142);
extendedKeyCodesSet.add(0x01000000+0x013E);
extendedKeyCodesSet.add(0x01000000+0x015B);
extendedKeyCodesSet.add(0x01000000+0x0161);
extendedKeyCodesSet.add(0x01000000+0x015F);
extendedKeyCodesSet.add(0x01000000+0x0165);
extendedKeyCodesSet.add(0x01000000+0x017E);
extendedKeyCodesSet.add(0x01000000+0x017C);
extendedKeyCodesSet.add(0x01000000+0x0103);
extendedKeyCodesSet.add(0x01000000+0x0107);
extendedKeyCodesSet.add(0x01000000+0x010D);
extendedKeyCodesSet.add(0x01000000+0x0119);
extendedKeyCodesSet.add(0x01000000+0x011B);
extendedKeyCodesSet.add(0x01000000+0x0111);
extendedKeyCodesSet.add(0x01000000+0x0148);
extendedKeyCodesSet.add(0x01000000+0x0151);
extendedKeyCodesSet.add(0x01000000+0x0171);
extendedKeyCodesSet.add(0x01000000+0x0159);
extendedKeyCodesSet.add(0x01000000+0x016F);
extendedKeyCodesSet.add(0x01000000+0x0163);
extendedKeyCodesSet.add(0x01000000+0x02D9);
extendedKeyCodesSet.add(0x01000000+0x0130);
extendedKeyCodesSet.add(0x01000000+0x0127);
extendedKeyCodesSet.add(0x01000000+0x0125);
extendedKeyCodesSet.add(0x01000000+0x0131);
extendedKeyCodesSet.add(0x01000000+0x011F);
extendedKeyCodesSet.add(0x01000000+0x0135);
extendedKeyCodesSet.add(0x01000000+0x010B);
extendedKeyCodesSet.add(0x01000000+0x0109);
extendedKeyCodesSet.add(0x01000000+0x0121);
extendedKeyCodesSet.add(0x01000000+0x011D);
extendedKeyCodesSet.add(0x01000000+0x016D);
extendedKeyCodesSet.add(0x01000000+0x015D);
extendedKeyCodesSet.add(0x01000000+0x0138);
extendedKeyCodesSet.add(0x01000000+0x0157);
extendedKeyCodesSet.add(0x01000000+0x013C);
extendedKeyCodesSet.add(0x01000000+0x0113);
extendedKeyCodesSet.add(0x01000000+0x0123);
extendedKeyCodesSet.add(0x01000000+0x0167);
extendedKeyCodesSet.add(0x01000000+0x014B);
extendedKeyCodesSet.add(0x01000000+0x0101);
extendedKeyCodesSet.add(0x01000000+0x012F);
extendedKeyCodesSet.add(0x01000000+0x0117);
extendedKeyCodesSet.add(0x01000000+0x012B);
extendedKeyCodesSet.add(0x01000000+0x0146);
extendedKeyCodesSet.add(0x01000000+0x014D);
extendedKeyCodesSet.add(0x01000000+0x0137);
extendedKeyCodesSet.add(0x01000000+0x0173);
extendedKeyCodesSet.add(0x01000000+0x016B);
extendedKeyCodesSet.add(0x01000000+0x0153);
extendedKeyCodesSet.add(0x01000000+0x30FC);
extendedKeyCodesSet.add(0x01000000+0x30A2);
extendedKeyCodesSet.add(0x01000000+0x30A4);
extendedKeyCodesSet.add(0x01000000+0x30A6);
extendedKeyCodesSet.add(0x01000000+0x30A8);
extendedKeyCodesSet.add(0x01000000+0x30AA);
extendedKeyCodesSet.add(0x01000000+0x30AB);
extendedKeyCodesSet.add(0x01000000+0x30AD);
extendedKeyCodesSet.add(0x01000000+0x30AF);
extendedKeyCodesSet.add(0x01000000+0x30B1);
extendedKeyCodesSet.add(0x01000000+0x30B3);
extendedKeyCodesSet.add(0x01000000+0x30B5);
extendedKeyCodesSet.add(0x01000000+0x30B7);
extendedKeyCodesSet.add(0x01000000+0x30B9);
extendedKeyCodesSet.add(0x01000000+0x30BB);
extendedKeyCodesSet.add(0x01000000+0x30BD);
extendedKeyCodesSet.add(0x01000000+0x30BF);
extendedKeyCodesSet.add(0x01000000+0x30C1);
extendedKeyCodesSet.add(0x01000000+0x30C4);
extendedKeyCodesSet.add(0x01000000+0x30C6);
extendedKeyCodesSet.add(0x01000000+0x30C8);
extendedKeyCodesSet.add(0x01000000+0x30CA);
extendedKeyCodesSet.add(0x01000000+0x30CB);
extendedKeyCodesSet.add(0x01000000+0x30CC);
extendedKeyCodesSet.add(0x01000000+0x30CD);
extendedKeyCodesSet.add(0x01000000+0x30CE);
extendedKeyCodesSet.add(0x01000000+0x30CF);
extendedKeyCodesSet.add(0x01000000+0x30D2);
extendedKeyCodesSet.add(0x01000000+0x30D5);
extendedKeyCodesSet.add(0x01000000+0x30D8);
extendedKeyCodesSet.add(0x01000000+0x30DB);
extendedKeyCodesSet.add(0x01000000+0x30DE);
extendedKeyCodesSet.add(0x01000000+0x30DF);
extendedKeyCodesSet.add(0x01000000+0x30E0);
extendedKeyCodesSet.add(0x01000000+0x30E1);
extendedKeyCodesSet.add(0x01000000+0x30E2);
extendedKeyCodesSet.add(0x01000000+0x30E4);
extendedKeyCodesSet.add(0x01000000+0x30E6);
extendedKeyCodesSet.add(0x01000000+0x30E8);
extendedKeyCodesSet.add(0x01000000+0x30E9);
extendedKeyCodesSet.add(0x01000000+0x30EA);
extendedKeyCodesSet.add(0x01000000+0x30EB);
extendedKeyCodesSet.add(0x01000000+0x30EC);
extendedKeyCodesSet.add(0x01000000+0x30ED);
extendedKeyCodesSet.add(0x01000000+0x30EF);
extendedKeyCodesSet.add(0x01000000+0x30F3);
extendedKeyCodesSet.add(0x01000000+0x309B);
extendedKeyCodesSet.add(0x01000000+0x309C);
extendedKeyCodesSet.add(0x01000000+0x06F0);
extendedKeyCodesSet.add(0x01000000+0x06F1);
extendedKeyCodesSet.add(0x01000000+0x06F2);
extendedKeyCodesSet.add(0x01000000+0x06F3);
extendedKeyCodesSet.add(0x01000000+0x06F4);
extendedKeyCodesSet.add(0x01000000+0x06F5);
extendedKeyCodesSet.add(0x01000000+0x06F6);
extendedKeyCodesSet.add(0x01000000+0x06F7);
extendedKeyCodesSet.add(0x01000000+0x06F8);
extendedKeyCodesSet.add(0x01000000+0x06F9);
extendedKeyCodesSet.add(0x01000000+0x0670);
extendedKeyCodesSet.add(0x01000000+0x067E);
extendedKeyCodesSet.add(0x01000000+0x0686);
extendedKeyCodesSet.add(0x01000000+0x060C);
extendedKeyCodesSet.add(0x01000000+0x06D4);
extendedKeyCodesSet.add(0x01000000+0x0660);
extendedKeyCodesSet.add(0x01000000+0x0661);
extendedKeyCodesSet.add(0x01000000+0x0662);
extendedKeyCodesSet.add(0x01000000+0x0663);
extendedKeyCodesSet.add(0x01000000+0x0664);
extendedKeyCodesSet.add(0x01000000+0x0665);
extendedKeyCodesSet.add(0x01000000+0x0666);
extendedKeyCodesSet.add(0x01000000+0x0667);
extendedKeyCodesSet.add(0x01000000+0x0668);
extendedKeyCodesSet.add(0x01000000+0x0669);
extendedKeyCodesSet.add(0x01000000+0x061B);
extendedKeyCodesSet.add(0x01000000+0x0621);
extendedKeyCodesSet.add(0x01000000+0x0624);
extendedKeyCodesSet.add(0x01000000+0x0626);
extendedKeyCodesSet.add(0x01000000+0x0627);
extendedKeyCodesSet.add(0x01000000+0x0628);
extendedKeyCodesSet.add(0x01000000+0x0629);
extendedKeyCodesSet.add(0x01000000+0x062A);
extendedKeyCodesSet.add(0x01000000+0x062B);
extendedKeyCodesSet.add(0x01000000+0x062C);
extendedKeyCodesSet.add(0x01000000+0x062D);
extendedKeyCodesSet.add(0x01000000+0x062E);
extendedKeyCodesSet.add(0x01000000+0x062F);
extendedKeyCodesSet.add(0x01000000+0x0630);
extendedKeyCodesSet.add(0x01000000+0x0631);
extendedKeyCodesSet.add(0x01000000+0x0632);
extendedKeyCodesSet.add(0x01000000+0x0633);
extendedKeyCodesSet.add(0x01000000+0x0634);
extendedKeyCodesSet.add(0x01000000+0x0635);
extendedKeyCodesSet.add(0x01000000+0x0636);
extendedKeyCodesSet.add(0x01000000+0x0637);
extendedKeyCodesSet.add(0x01000000+0x0638);
extendedKeyCodesSet.add(0x01000000+0x0639);
extendedKeyCodesSet.add(0x01000000+0x063A);
extendedKeyCodesSet.add(0x01000000+0x0641);
extendedKeyCodesSet.add(0x01000000+0x0642);
extendedKeyCodesSet.add(0x01000000+0x0643);
extendedKeyCodesSet.add(0x01000000+0x0644);
extendedKeyCodesSet.add(0x01000000+0x0645);
extendedKeyCodesSet.add(0x01000000+0x0646);
extendedKeyCodesSet.add(0x01000000+0x0647);
extendedKeyCodesSet.add(0x01000000+0x0648);
extendedKeyCodesSet.add(0x01000000+0x0649);
extendedKeyCodesSet.add(0x01000000+0x064A);
extendedKeyCodesSet.add(0x01000000+0x064E);
extendedKeyCodesSet.add(0x01000000+0x064F);
extendedKeyCodesSet.add(0x01000000+0x0650);
extendedKeyCodesSet.add(0x01000000+0x0652);
extendedKeyCodesSet.add(0x01000000+0x0698);
extendedKeyCodesSet.add(0x01000000+0x06A4);
extendedKeyCodesSet.add(0x01000000+0x06A9);
extendedKeyCodesSet.add(0x01000000+0x06AF);
extendedKeyCodesSet.add(0x01000000+0x06BE);
extendedKeyCodesSet.add(0x01000000+0x06CC);
extendedKeyCodesSet.add(0x01000000+0x06CC);
extendedKeyCodesSet.add(0x01000000+0x06D2);
extendedKeyCodesSet.add(0x01000000+0x0493);
extendedKeyCodesSet.add(0x01000000+0x0497);
extendedKeyCodesSet.add(0x01000000+0x049B);
extendedKeyCodesSet.add(0x01000000+0x049D);
extendedKeyCodesSet.add(0x01000000+0x04A3);
extendedKeyCodesSet.add(0x01000000+0x04AF);
extendedKeyCodesSet.add(0x01000000+0x04B1);
extendedKeyCodesSet.add(0x01000000+0x04B3);
extendedKeyCodesSet.add(0x01000000+0x04B9);
extendedKeyCodesSet.add(0x01000000+0x04BB);
extendedKeyCodesSet.add(0x01000000+0x04D9);
extendedKeyCodesSet.add(0x01000000+0x04E9);
extendedKeyCodesSet.add(0x01000000+0x0452);
extendedKeyCodesSet.add(0x01000000+0x0453);
extendedKeyCodesSet.add(0x01000000+0x0451);
extendedKeyCodesSet.add(0x01000000+0x0454);
extendedKeyCodesSet.add(0x01000000+0x0455);
extendedKeyCodesSet.add(0x01000000+0x0456);
extendedKeyCodesSet.add(0x01000000+0x0457);
extendedKeyCodesSet.add(0x01000000+0x0458);
extendedKeyCodesSet.add(0x01000000+0x0459);
extendedKeyCodesSet.add(0x01000000+0x045A);
extendedKeyCodesSet.add(0x01000000+0x045B);
extendedKeyCodesSet.add(0x01000000+0x045C);
extendedKeyCodesSet.add(0x01000000+0x0491);
extendedKeyCodesSet.add(0x01000000+0x045E);
extendedKeyCodesSet.add(0x01000000+0x045F);
extendedKeyCodesSet.add(0x01000000+0x2116);
extendedKeyCodesSet.add(0x01000000+0x044E);
extendedKeyCodesSet.add(0x01000000+0x0430);
extendedKeyCodesSet.add(0x01000000+0x0431);
extendedKeyCodesSet.add(0x01000000+0x0446);
extendedKeyCodesSet.add(0x01000000+0x0434);
extendedKeyCodesSet.add(0x01000000+0x0435);
extendedKeyCodesSet.add(0x01000000+0x0444);
extendedKeyCodesSet.add(0x01000000+0x0433);
extendedKeyCodesSet.add(0x01000000+0x0445);
extendedKeyCodesSet.add(0x01000000+0x0438);
extendedKeyCodesSet.add(0x01000000+0x0439);
extendedKeyCodesSet.add(0x01000000+0x043A);
extendedKeyCodesSet.add(0x01000000+0x043B);
extendedKeyCodesSet.add(0x01000000+0x043C);
extendedKeyCodesSet.add(0x01000000+0x043D);
extendedKeyCodesSet.add(0x01000000+0x043E);
extendedKeyCodesSet.add(0x01000000+0x043F);
extendedKeyCodesSet.add(0x01000000+0x044F);
extendedKeyCodesSet.add(0x01000000+0x0440);
extendedKeyCodesSet.add(0x01000000+0x0441);
extendedKeyCodesSet.add(0x01000000+0x0442);
extendedKeyCodesSet.add(0x01000000+0x0443);
extendedKeyCodesSet.add(0x01000000+0x0436);
extendedKeyCodesSet.add(0x01000000+0x0432);
extendedKeyCodesSet.add(0x01000000+0x044C);
extendedKeyCodesSet.add(0x01000000+0x044B);
extendedKeyCodesSet.add(0x01000000+0x0437);
extendedKeyCodesSet.add(0x01000000+0x0448);
extendedKeyCodesSet.add(0x01000000+0x044D);
extendedKeyCodesSet.add(0x01000000+0x0449);
extendedKeyCodesSet.add(0x01000000+0x0447);
extendedKeyCodesSet.add(0x01000000+0x044A);
extendedKeyCodesSet.add(0x01000000+0x2015);
extendedKeyCodesSet.add(0x01000000+0x03B1);
extendedKeyCodesSet.add(0x01000000+0x03B2);
extendedKeyCodesSet.add(0x01000000+0x03B3);
extendedKeyCodesSet.add(0x01000000+0x03B4);
extendedKeyCodesSet.add(0x01000000+0x03B5);
extendedKeyCodesSet.add(0x01000000+0x03B6);
extendedKeyCodesSet.add(0x01000000+0x03B7);
extendedKeyCodesSet.add(0x01000000+0x03B8);
extendedKeyCodesSet.add(0x01000000+0x03B9);
extendedKeyCodesSet.add(0x01000000+0x03BA);
extendedKeyCodesSet.add(0x01000000+0x03BB);
extendedKeyCodesSet.add(0x01000000+0x03BC);
extendedKeyCodesSet.add(0x01000000+0x03BD);
extendedKeyCodesSet.add(0x01000000+0x03BE);
extendedKeyCodesSet.add(0x01000000+0x03BF);
extendedKeyCodesSet.add(0x01000000+0x03C0);
extendedKeyCodesSet.add(0x01000000+0x03C1);
extendedKeyCodesSet.add(0x01000000+0x03C3);
extendedKeyCodesSet.add(0x01000000+0x03C2);
extendedKeyCodesSet.add(0x01000000+0x03C4);
extendedKeyCodesSet.add(0x01000000+0x03C5);
extendedKeyCodesSet.add(0x01000000+0x03C6);
extendedKeyCodesSet.add(0x01000000+0x03C7);
extendedKeyCodesSet.add(0x01000000+0x03C8);
extendedKeyCodesSet.add(0x01000000+0x03C9);
extendedKeyCodesSet.add(0x01000000+0x2190);
extendedKeyCodesSet.add(0x01000000+0x2192);
extendedKeyCodesSet.add(0x01000000+0x2193);
extendedKeyCodesSet.add(0x01000000+0x2013);
extendedKeyCodesSet.add(0x01000000+0x201C);
extendedKeyCodesSet.add(0x01000000+0x201D);
extendedKeyCodesSet.add(0x01000000+0x201E);
extendedKeyCodesSet.add(0x01000000+0x05D0);
extendedKeyCodesSet.add(0x01000000+0x05D1);
extendedKeyCodesSet.add(0x01000000+0x05D2);
extendedKeyCodesSet.add(0x01000000+0x05D3);
extendedKeyCodesSet.add(0x01000000+0x05D4);
extendedKeyCodesSet.add(0x01000000+0x05D5);
extendedKeyCodesSet.add(0x01000000+0x05D6);
extendedKeyCodesSet.add(0x01000000+0x05D7);
extendedKeyCodesSet.add(0x01000000+0x05D8);
extendedKeyCodesSet.add(0x01000000+0x05D9);
extendedKeyCodesSet.add(0x01000000+0x05DA);
extendedKeyCodesSet.add(0x01000000+0x05DB);
extendedKeyCodesSet.add(0x01000000+0x05DC);
extendedKeyCodesSet.add(0x01000000+0x05DD);
extendedKeyCodesSet.add(0x01000000+0x05DE);
extendedKeyCodesSet.add(0x01000000+0x05DF);
extendedKeyCodesSet.add(0x01000000+0x05E0);
extendedKeyCodesSet.add(0x01000000+0x05E1);
extendedKeyCodesSet.add(0x01000000+0x05E2);
extendedKeyCodesSet.add(0x01000000+0x05E3);
extendedKeyCodesSet.add(0x01000000+0x05E4);
extendedKeyCodesSet.add(0x01000000+0x05E5);
extendedKeyCodesSet.add(0x01000000+0x05E6);
extendedKeyCodesSet.add(0x01000000+0x05E7);
extendedKeyCodesSet.add(0x01000000+0x05E8);
extendedKeyCodesSet.add(0x01000000+0x05E9);
extendedKeyCodesSet.add(0x01000000+0x05EA);
extendedKeyCodesSet.add(0x01000000+0x0E01);
extendedKeyCodesSet.add(0x01000000+0x0E02);
extendedKeyCodesSet.add(0x01000000+0x0E03);
extendedKeyCodesSet.add(0x01000000+0x0E04);
extendedKeyCodesSet.add(0x01000000+0x0E05);
extendedKeyCodesSet.add(0x01000000+0x0E07);
extendedKeyCodesSet.add(0x01000000+0x0E08);
extendedKeyCodesSet.add(0x01000000+0x0E0A);
extendedKeyCodesSet.add(0x01000000+0x0E0C);
extendedKeyCodesSet.add(0x01000000+0x0E14);
extendedKeyCodesSet.add(0x01000000+0x0E15);
extendedKeyCodesSet.add(0x01000000+0x0E16);
extendedKeyCodesSet.add(0x01000000+0x0E17);
extendedKeyCodesSet.add(0x01000000+0x0E19);
extendedKeyCodesSet.add(0x01000000+0x0E1A);
extendedKeyCodesSet.add(0x01000000+0x0E1B);
extendedKeyCodesSet.add(0x01000000+0x0E1C);
extendedKeyCodesSet.add(0x01000000+0x0E1D);
extendedKeyCodesSet.add(0x01000000+0x0E1E);
extendedKeyCodesSet.add(0x01000000+0x0E1F);
extendedKeyCodesSet.add(0x01000000+0x0E20);
extendedKeyCodesSet.add(0x01000000+0x0E21);
extendedKeyCodesSet.add(0x01000000+0x0E22);
extendedKeyCodesSet.add(0x01000000+0x0E23);
extendedKeyCodesSet.add(0x01000000+0x0E25);
extendedKeyCodesSet.add(0x01000000+0x0E27);
extendedKeyCodesSet.add(0x01000000+0x0E2A);
extendedKeyCodesSet.add(0x01000000+0x0E2B);
extendedKeyCodesSet.add(0x01000000+0x0E2D);
extendedKeyCodesSet.add(0x01000000+0x0E30);
extendedKeyCodesSet.add(0x01000000+0x0E31);
extendedKeyCodesSet.add(0x01000000+0x0E32);
extendedKeyCodesSet.add(0x01000000+0x0E33);
extendedKeyCodesSet.add(0x01000000+0x0E34);
extendedKeyCodesSet.add(0x01000000+0x0E35);
extendedKeyCodesSet.add(0x01000000+0x0E36);
extendedKeyCodesSet.add(0x01000000+0x0E37);
extendedKeyCodesSet.add(0x01000000+0x0E38);
extendedKeyCodesSet.add(0x01000000+0x0E39);
extendedKeyCodesSet.add(0x01000000+0x0E3F);
extendedKeyCodesSet.add(0x01000000+0x0E40);
extendedKeyCodesSet.add(0x01000000+0x0E41);
extendedKeyCodesSet.add(0x01000000+0x0E43);
extendedKeyCodesSet.add(0x01000000+0x0E44);
extendedKeyCodesSet.add(0x01000000+0x0E45);
extendedKeyCodesSet.add(0x01000000+0x0E46);
extendedKeyCodesSet.add(0x01000000+0x0E47);
extendedKeyCodesSet.add(0x01000000+0x0E48);
extendedKeyCodesSet.add(0x01000000+0x0E49);
extendedKeyCodesSet.add(0x01000000+0x0E50);
extendedKeyCodesSet.add(0x01000000+0x0E51);
extendedKeyCodesSet.add(0x01000000+0x0E52);
extendedKeyCodesSet.add(0x01000000+0x0E53);
extendedKeyCodesSet.add(0x01000000+0x0E54);
extendedKeyCodesSet.add(0x01000000+0x0E55);
extendedKeyCodesSet.add(0x01000000+0x0E56);
extendedKeyCodesSet.add(0x01000000+0x0E57);
extendedKeyCodesSet.add(0x01000000+0x0E58);
extendedKeyCodesSet.add(0x01000000+0x0E59);
extendedKeyCodesSet.add(0x01000000+0x0587);
extendedKeyCodesSet.add(0x01000000+0x0589);
extendedKeyCodesSet.add(0x01000000+0x0589);
extendedKeyCodesSet.add(0x01000000+0x055D);
extendedKeyCodesSet.add(0x01000000+0x055D);
extendedKeyCodesSet.add(0x01000000+0x055B);
extendedKeyCodesSet.add(0x01000000+0x055B);
extendedKeyCodesSet.add(0x01000000+0x055E);
extendedKeyCodesSet.add(0x01000000+0x055E);
extendedKeyCodesSet.add(0x01000000+0x0561);
extendedKeyCodesSet.add(0x01000000+0x0562);
extendedKeyCodesSet.add(0x01000000+0x0563);
extendedKeyCodesSet.add(0x01000000+0x0564);
extendedKeyCodesSet.add(0x01000000+0x0565);
extendedKeyCodesSet.add(0x01000000+0x0566);
extendedKeyCodesSet.add(0x01000000+0x0567);
extendedKeyCodesSet.add(0x01000000+0x0568);
extendedKeyCodesSet.add(0x01000000+0x0569);
extendedKeyCodesSet.add(0x01000000+0x056A);
extendedKeyCodesSet.add(0x01000000+0x056B);
extendedKeyCodesSet.add(0x01000000+0x056C);
extendedKeyCodesSet.add(0x01000000+0x056D);
extendedKeyCodesSet.add(0x01000000+0x056E);
extendedKeyCodesSet.add(0x01000000+0x056F);
extendedKeyCodesSet.add(0x01000000+0x0570);
extendedKeyCodesSet.add(0x01000000+0x0571);
extendedKeyCodesSet.add(0x01000000+0x0572);
extendedKeyCodesSet.add(0x01000000+0x0573);
extendedKeyCodesSet.add(0x01000000+0x0574);
extendedKeyCodesSet.add(0x01000000+0x0575);
extendedKeyCodesSet.add(0x01000000+0x0576);
extendedKeyCodesSet.add(0x01000000+0x0577);
extendedKeyCodesSet.add(0x01000000+0x0578);
extendedKeyCodesSet.add(0x01000000+0x0579);
extendedKeyCodesSet.add(0x01000000+0x057A);
extendedKeyCodesSet.add(0x01000000+0x057B);
extendedKeyCodesSet.add(0x01000000+0x057C);
extendedKeyCodesSet.add(0x01000000+0x057D);
extendedKeyCodesSet.add(0x01000000+0x057E);
extendedKeyCodesSet.add(0x01000000+0x057F);
extendedKeyCodesSet.add(0x01000000+0x0580);
extendedKeyCodesSet.add(0x01000000+0x0581);
extendedKeyCodesSet.add(0x01000000+0x0582);
extendedKeyCodesSet.add(0x01000000+0x0583);
extendedKeyCodesSet.add(0x01000000+0x0584);
extendedKeyCodesSet.add(0x01000000+0x0585);
extendedKeyCodesSet.add(0x01000000+0x0586);
extendedKeyCodesSet.add(0x01000000+0x10D0);
extendedKeyCodesSet.add(0x01000000+0x10D1);
extendedKeyCodesSet.add(0x01000000+0x10D2);
extendedKeyCodesSet.add(0x01000000+0x10D3);
extendedKeyCodesSet.add(0x01000000+0x10D4);
extendedKeyCodesSet.add(0x01000000+0x10D5);
extendedKeyCodesSet.add(0x01000000+0x10D6);
extendedKeyCodesSet.add(0x01000000+0x10D7);
extendedKeyCodesSet.add(0x01000000+0x10D8);
extendedKeyCodesSet.add(0x01000000+0x10D9);
extendedKeyCodesSet.add(0x01000000+0x10DA);
extendedKeyCodesSet.add(0x01000000+0x10DB);
extendedKeyCodesSet.add(0x01000000+0x10DC);
extendedKeyCodesSet.add(0x01000000+0x10DD);
extendedKeyCodesSet.add(0x01000000+0x10DE);
extendedKeyCodesSet.add(0x01000000+0x10DF);
extendedKeyCodesSet.add(0x01000000+0x10E0);
extendedKeyCodesSet.add(0x01000000+0x10E1);
extendedKeyCodesSet.add(0x01000000+0x10E2);
extendedKeyCodesSet.add(0x01000000+0x10E3);
extendedKeyCodesSet.add(0x01000000+0x10E4);
extendedKeyCodesSet.add(0x01000000+0x10E5);
extendedKeyCodesSet.add(0x01000000+0x10E6);
extendedKeyCodesSet.add(0x01000000+0x10E7);
extendedKeyCodesSet.add(0x01000000+0x10E8);
extendedKeyCodesSet.add(0x01000000+0x10E9);
extendedKeyCodesSet.add(0x01000000+0x10EA);
extendedKeyCodesSet.add(0x01000000+0x10EB);
extendedKeyCodesSet.add(0x01000000+0x10EC);
extendedKeyCodesSet.add(0x01000000+0x10ED);
extendedKeyCodesSet.add(0x01000000+0x10EE);
extendedKeyCodesSet.add(0x01000000+0x10EF);
extendedKeyCodesSet.add(0x01000000+0x10F0);
extendedKeyCodesSet.add(0x01000000+0x01E7);
extendedKeyCodesSet.add(0x01000000+0x0259);
extendedKeyCodesSet.add(0x01000000+0x1EB9);
extendedKeyCodesSet.add(0x01000000+0x1ECB);
extendedKeyCodesSet.add(0x01000000+0x1ECD);
extendedKeyCodesSet.add(0x01000000+0x1EE5);
extendedKeyCodesSet.add(0x01000000+0x01A1);
extendedKeyCodesSet.add(0x01000000+0x01B0);
extendedKeyCodesSet.add(0x01000000+0x20AB);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.StandardCharsets;
import sun.nio.cs.HistoricallyNamedCharset;
public class FontDescriptor implements Cloneable {
static {
NativeLibLoader.loadLibraries();
initIDs();
}
String nativeName;
public CharsetEncoder encoder;
String charsetName;
private int[] exclusionRanges;
public FontDescriptor(String nativeName, CharsetEncoder encoder,
int[] exclusionRanges){
this.nativeName = nativeName;
this.encoder = encoder;
this.exclusionRanges = exclusionRanges;
this.useUnicode = false;
Charset cs = encoder.charset();
if (cs instanceof HistoricallyNamedCharset)
this.charsetName = ((HistoricallyNamedCharset)cs).historicalName();
else
this.charsetName = cs.name();
}
public String getNativeName() {
return nativeName;
}
public CharsetEncoder getFontCharsetEncoder() {
return encoder;
}
public String getFontCharsetName() {
return charsetName;
}
public int[] getExclusionRanges() {
return exclusionRanges;
}
/**
* Return true if the character is exclusion character.
*/
public boolean isExcluded(char ch){
for (int i = 0; i < exclusionRanges.length; ){
int lo = (exclusionRanges[i++]);
int up = (exclusionRanges[i++]);
if (ch >= lo && ch <= up){
return true;
}
}
return false;
}
public String toString() {
return super.toString() + " [" + nativeName + "|" + encoder + "]";
}
/**
* Initialize JNI field and method IDs
*/
private static native void initIDs();
public CharsetEncoder unicodeEncoder;
boolean useUnicode; // set to true from native code on Unicode-based systems
public boolean useUnicode() {
if (useUnicode && unicodeEncoder == null) {
try {
this.unicodeEncoder = isLE?
StandardCharsets.UTF_16LE.newEncoder():
StandardCharsets.UTF_16BE.newEncoder();
} catch (IllegalArgumentException x) {}
}
return useUnicode;
}
static boolean isLE;
static {
String enc = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.io.unicode.encoding",
"UnicodeBig"));
isLE = !"UnicodeBig".equals(enc);
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
/**
* An interface for the EventQueue delegate.
* This class is added to support JavaFX/AWT interop single threaded mode
* The delegate should be set in EventQueue by {@link EventQueue#setFwDispatcher(FwDispatcher)}
* If the delegate is not null, than it handles supported methods instead of the
* event queue. If it is null than the behaviour of an event queue does not change.
*
* @see EventQueue
*
* @author Petr Pchelko
*
* @since 1.8
*/
public interface FwDispatcher {
/**
* Delegates the {@link EventQueue#isDispatchThread()} method
*/
boolean isDispatchThread();
/**
* Forwards a runnable to the delegate, which executes it on an appropriate thread.
* @param r - a runnable calling {@link EventQueue#dispatchEventImpl(java.awt.AWTEvent, Object)}
*/
void scheduleDispatch(Runnable r);
/**
* Delegates the {@link java.awt.EventQueue#createSecondaryLoop()} method
*/
SecondaryLoop createSecondaryLoop();
}

View File

@@ -0,0 +1,216 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.InvocationEvent;
/**
* A stateless class which responds to native mouse moves, Component resizes,
* Component moves, showing and hiding of Components, minimizing and
* maximizing of top level Windows, addition and removal of Components,
* and calls to setCursor().
*/
public abstract class GlobalCursorManager {
class NativeUpdater implements Runnable {
boolean pending = false;
public void run() {
boolean shouldUpdate = false;
synchronized (this) {
if (pending) {
pending = false;
shouldUpdate = true;
}
}
if (shouldUpdate) {
_updateCursor(false);
}
}
public void postIfNotPending(Component heavy, InvocationEvent in) {
boolean shouldPost = false;
synchronized (this) {
if (!pending) {
pending = shouldPost = true;
}
}
if (shouldPost) {
SunToolkit.postEvent(SunToolkit.targetToAppContext(heavy), in);
}
}
}
/**
* Use a singleton NativeUpdater for better performance. We cannot use
* a singleton InvocationEvent because we want each event to have a fresh
* timestamp.
*/
private final NativeUpdater nativeUpdater = new NativeUpdater();
/**
* The last time the cursor was updated, in milliseconds.
*/
private long lastUpdateMillis;
/**
* Locking object for synchronizing access to lastUpdateMillis. The VM
* does not guarantee atomicity of longs.
*/
private final Object lastUpdateLock = new Object();
/**
* Should be called for any activity at the Java level which may affect
* the global cursor, except for Java MOUSE_MOVED events.
*/
public void updateCursorImmediately() {
synchronized (nativeUpdater) {
nativeUpdater.pending = false;
}
_updateCursor(false);
}
/**
* Should be called in response to Java MOUSE_MOVED events. The update
* will be discarded if the InputEvent is outdated.
*
* @param e the InputEvent which triggered the cursor update.
*/
public void updateCursorImmediately(InputEvent e) {
boolean shouldUpdate;
synchronized (lastUpdateLock) {
shouldUpdate = (e.getWhen() >= lastUpdateMillis);
}
if (shouldUpdate) {
_updateCursor(true);
}
}
/**
* Should be called in response to a native mouse enter or native mouse
* button released message. Should not be called during a mouse drag.
*/
public void updateCursorLater(Component heavy) {
nativeUpdater.postIfNotPending(heavy, new InvocationEvent
(Toolkit.getDefaultToolkit(), nativeUpdater));
}
protected GlobalCursorManager() { }
/**
* Set the global cursor to the specified cursor. The component over
* which the Cursor current resides is provided as a convenience. Not
* all platforms may require the Component.
*/
protected abstract void setCursor(Component comp, Cursor cursor,
boolean useCache);
/**
* Returns the global cursor position, in screen coordinates.
*/
protected abstract void getCursorPos(Point p);
protected abstract Point getLocationOnScreen(Component com);
/**
* Returns the most specific, visible, heavyweight Component
* under the cursor. This method should return null iff the cursor is
* not over any Java Window.
*
* @param useCache If true, the implementation is free to use caching
* mechanisms because the Z-order, visibility, and enabled state of the
* Components has not changed. If false, the implementation should not
* make these assumptions.
*/
protected abstract Component findHeavyweightUnderCursor(boolean useCache);
/**
* Updates the global cursor. We apply a three-step scheme to cursor
* updates:<p>
*
* (1) InputEvent updates which are outdated are discarded by
* <code>updateCursorImmediately(InputEvent)</code>.<p>
*
* (2) If 'useCache' is true, the native code is free to use a cached
* value to determine the most specific, visible, enabled heavyweight
* because this update is occurring in response to a mouse move. If
* 'useCache' is false, the native code must perform a new search given
* the current mouse coordinates.
*
* (3) Once we have determined the most specific, visible, enabled
* heavyweight, we use findComponentAt to find the most specific, visible,
* enabled Component.
*/
private void _updateCursor(boolean useCache) {
synchronized (lastUpdateLock) {
lastUpdateMillis = System.currentTimeMillis();
}
Point queryPos = null, p = null;
Component comp;
try {
comp = findHeavyweightUnderCursor(useCache);
if (comp == null) {
updateCursorOutOfJava();
return;
}
if (comp instanceof Window) {
p = AWTAccessor.getComponentAccessor().getLocation(comp);
} else if (comp instanceof Container) {
p = getLocationOnScreen(comp);
}
if (p != null) {
queryPos = new Point();
getCursorPos(queryPos);
Component c = AWTAccessor.getContainerAccessor().
findComponentAt((Container) comp,
queryPos.x - p.x, queryPos.y - p.y, false);
// If findComponentAt returns null, then something bad has
// happened. For example, the heavyweight Component may
// have been hidden or disabled by another thread. In that
// case, we'll just use the originial heavyweight.
if (c != null) {
comp = c;
}
}
setCursor(comp, AWTAccessor.getComponentAccessor().getCursor(comp), useCache);
} catch (IllegalComponentStateException e) {
// Shouldn't happen, but if it does, abort.
}
}
protected void updateCursorOutOfJava() {
// Cursor is not over a Java Window. Do nothing...usually
// But we need to update it in case of grab on X.
}
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Color;
public interface Graphics2Delegate {
void setBackground(Color color);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharsetDecoder;
/* 2d/XMap and WFontConfiguration implementation need access HKSCS,
make a subclass here to avoid expose HKSCS to the public in
ExtendedCharsets class, because if we want to have a public HKSCS,
it probably should be HKSCS_2001 not HKSCS.
*/
public class HKSCS extends sun.nio.cs.ext.MS950_HKSCS_XP {
public HKSCS () {
super();
}
public boolean contains(Charset cs) {
return (cs instanceof HKSCS);
}
}

View File

@@ -0,0 +1,392 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import sun.awt.datatransfer.DataTransferer;
import java.awt.*;
import java.awt.dnd.*;
import java.awt.dnd.peer.DragSourceContextPeer;
import java.awt.im.InputMethodHighlight;
import java.awt.im.spi.InputMethodDescriptor;
import java.awt.image.*;
import java.awt.datatransfer.Clipboard;
import java.awt.peer.*;
import java.util.Map;
import java.util.Properties;
/*
* HToolkit is a platform independent Toolkit used
* with the HeadlessToolkit. It is primarily used
* in embedded JRE's that do not have sun/awt/X11 classes.
*/
public class HToolkit extends SunToolkit
implements ComponentFactory {
private static final KeyboardFocusManagerPeer kfmPeer = new KeyboardFocusManagerPeer() {
public void setCurrentFocusedWindow(Window win) {}
public Window getCurrentFocusedWindow() { return null; }
public void setCurrentFocusOwner(Component comp) {}
public Component getCurrentFocusOwner() { return null; }
public void clearGlobalFocusOwner(Window activeWindow) {}
};
public HToolkit() {
}
/*
* Component peer objects - unsupported.
*/
public WindowPeer createWindow(Window target)
throws HeadlessException {
throw new HeadlessException();
}
public FramePeer createLightweightFrame(LightweightFrame target)
throws HeadlessException {
throw new HeadlessException();
}
public FramePeer createFrame(Frame target)
throws HeadlessException {
throw new HeadlessException();
}
public DialogPeer createDialog(Dialog target)
throws HeadlessException {
throw new HeadlessException();
}
public ButtonPeer createButton(Button target)
throws HeadlessException {
throw new HeadlessException();
}
public TextFieldPeer createTextField(TextField target)
throws HeadlessException {
throw new HeadlessException();
}
public ChoicePeer createChoice(Choice target)
throws HeadlessException {
throw new HeadlessException();
}
public LabelPeer createLabel(Label target)
throws HeadlessException {
throw new HeadlessException();
}
public ListPeer createList(List target)
throws HeadlessException {
throw new HeadlessException();
}
public CheckboxPeer createCheckbox(Checkbox target)
throws HeadlessException {
throw new HeadlessException();
}
public ScrollbarPeer createScrollbar(Scrollbar target)
throws HeadlessException {
throw new HeadlessException();
}
public ScrollPanePeer createScrollPane(ScrollPane target)
throws HeadlessException {
throw new HeadlessException();
}
public TextAreaPeer createTextArea(TextArea target)
throws HeadlessException {
throw new HeadlessException();
}
public FileDialogPeer createFileDialog(FileDialog target)
throws HeadlessException {
throw new HeadlessException();
}
public MenuBarPeer createMenuBar(MenuBar target)
throws HeadlessException {
throw new HeadlessException();
}
public MenuPeer createMenu(Menu target)
throws HeadlessException {
throw new HeadlessException();
}
public PopupMenuPeer createPopupMenu(PopupMenu target)
throws HeadlessException {
throw new HeadlessException();
}
public MenuItemPeer createMenuItem(MenuItem target)
throws HeadlessException {
throw new HeadlessException();
}
public CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
throws HeadlessException {
throw new HeadlessException();
}
public DragSourceContextPeer createDragSourceContextPeer(
DragGestureEvent dge)
throws InvalidDnDOperationException {
throw new InvalidDnDOperationException("Headless environment");
}
public RobotPeer createRobot(Robot target, GraphicsDevice screen)
throws AWTException, HeadlessException {
throw new HeadlessException();
}
public KeyboardFocusManagerPeer getKeyboardFocusManagerPeer() {
// See 6833019.
return kfmPeer;
}
public TrayIconPeer createTrayIcon(TrayIcon target)
throws HeadlessException {
throw new HeadlessException();
}
public SystemTrayPeer createSystemTray(SystemTray target)
throws HeadlessException {
throw new HeadlessException();
}
public boolean isTraySupported() {
return false;
}
@Override
public DataTransferer getDataTransferer() {
return null;
}
public GlobalCursorManager getGlobalCursorManager()
throws HeadlessException {
throw new HeadlessException();
}
/*
* Headless toolkit - unsupported.
*/
protected void loadSystemColors(int[] systemColors)
throws HeadlessException {
throw new HeadlessException();
}
public ColorModel getColorModel()
throws HeadlessException {
throw new HeadlessException();
}
public int getScreenResolution()
throws HeadlessException {
throw new HeadlessException();
}
public Map mapInputMethodHighlight(InputMethodHighlight highlight)
throws HeadlessException {
throw new HeadlessException();
}
public int getMenuShortcutKeyMask()
throws HeadlessException {
throw new HeadlessException();
}
public boolean getLockingKeyState(int keyCode)
throws UnsupportedOperationException {
throw new HeadlessException();
}
public void setLockingKeyState(int keyCode, boolean on)
throws UnsupportedOperationException {
throw new HeadlessException();
}
public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
throws IndexOutOfBoundsException, HeadlessException {
throw new HeadlessException();
}
public Dimension getBestCursorSize(int preferredWidth, int preferredHeight)
throws HeadlessException {
throw new HeadlessException();
}
public int getMaximumCursorColors()
throws HeadlessException {
throw new HeadlessException();
}
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> abstractRecognizerClass,
DragSource ds, Component c,
int srcActions, DragGestureListener dgl)
{
return null;
}
public int getScreenHeight()
throws HeadlessException {
throw new HeadlessException();
}
public int getScreenWidth()
throws HeadlessException {
throw new HeadlessException();
}
public Dimension getScreenSize()
throws HeadlessException {
throw new HeadlessException();
}
public Insets getScreenInsets(GraphicsConfiguration gc)
throws HeadlessException {
throw new HeadlessException();
}
public void setDynamicLayout(boolean dynamic)
throws HeadlessException {
throw new HeadlessException();
}
protected boolean isDynamicLayoutSet()
throws HeadlessException {
throw new HeadlessException();
}
public boolean isDynamicLayoutActive()
throws HeadlessException {
throw new HeadlessException();
}
public Clipboard getSystemClipboard()
throws HeadlessException {
throw new HeadlessException();
}
/*
* Printing
*/
public PrintJob getPrintJob(Frame frame, String jobtitle,
JobAttributes jobAttributes,
PageAttributes pageAttributes) {
if (frame != null) {
// Should never happen
throw new HeadlessException();
}
throw new IllegalArgumentException(
"PrintJob not supported in a headless environment");
}
public PrintJob getPrintJob(Frame frame, String doctitle, Properties props)
{
if (frame != null) {
// Should never happen
throw new HeadlessException();
}
throw new IllegalArgumentException(
"PrintJob not supported in a headless environment");
}
/*
* Headless toolkit - supported.
*/
public void sync() {
// Do nothing
}
protected boolean syncNativeQueue(final long timeout) {
return false;
}
public void beep() {
// Send alert character
System.out.write(0x07);
}
/*
* Fonts
*/
public FontPeer getFontPeer(String name, int style) {
return (FontPeer)null;
}
/*
* Modality
*/
public boolean isModalityTypeSupported(Dialog.ModalityType modalityType) {
return false;
}
public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
return false;
}
public boolean isDesktopSupported() {
return false;
}
public DesktopPeer createDesktopPeer(Desktop target)
throws HeadlessException{
throw new HeadlessException();
}
public boolean isWindowOpacityControlSupported() {
return false;
}
public boolean isWindowShapingSupported() {
return false;
}
public boolean isWindowTranslucencySupported() {
return false;
}
public void grab(Window w) { }
public void ungrab(Window w) { }
protected boolean syncNativeQueue() { return false; }
public InputMethodDescriptor getInputMethodAdapterDescriptor()
throws AWTException
{
return (InputMethodDescriptor)null;
}
}

View File

@@ -0,0 +1,486 @@
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import sun.awt.datatransfer.DataTransferer;
import java.awt.*;
import java.awt.dnd.*;
import java.awt.dnd.peer.DragSourceContextPeer;
import java.awt.event.*;
import java.awt.im.InputMethodHighlight;
import java.awt.image.*;
import java.awt.datatransfer.Clipboard;
import java.awt.peer.*;
import java.beans.PropertyChangeListener;
import java.net.URL;
import java.util.Map;
import java.util.Properties;
public class HeadlessToolkit extends Toolkit
implements ComponentFactory, KeyboardFocusManagerPeerProvider {
private static final KeyboardFocusManagerPeer kfmPeer = new KeyboardFocusManagerPeer() {
public void setCurrentFocusedWindow(Window win) {}
public Window getCurrentFocusedWindow() { return null; }
public void setCurrentFocusOwner(Component comp) {}
public Component getCurrentFocusOwner() { return null; }
public void clearGlobalFocusOwner(Window activeWindow) {}
};
private Toolkit tk;
private ComponentFactory componentFactory;
public HeadlessToolkit(Toolkit tk) {
this.tk = tk;
if (tk instanceof ComponentFactory) {
componentFactory = (ComponentFactory)tk;
}
}
public Toolkit getUnderlyingToolkit() {
return tk;
}
/*
* Component peer objects.
*/
/* Lightweight implementation of Canvas and Panel */
public CanvasPeer createCanvas(Canvas target) {
return (CanvasPeer)createComponent(target);
}
public PanelPeer createPanel(Panel target) {
return (PanelPeer)createComponent(target);
}
/*
* Component peer objects - unsupported.
*/
public WindowPeer createWindow(Window target)
throws HeadlessException {
throw new HeadlessException();
}
public FramePeer createFrame(Frame target)
throws HeadlessException {
throw new HeadlessException();
}
public DialogPeer createDialog(Dialog target)
throws HeadlessException {
throw new HeadlessException();
}
public ButtonPeer createButton(Button target)
throws HeadlessException {
throw new HeadlessException();
}
public TextFieldPeer createTextField(TextField target)
throws HeadlessException {
throw new HeadlessException();
}
public ChoicePeer createChoice(Choice target)
throws HeadlessException {
throw new HeadlessException();
}
public LabelPeer createLabel(Label target)
throws HeadlessException {
throw new HeadlessException();
}
public ListPeer createList(List target)
throws HeadlessException {
throw new HeadlessException();
}
public CheckboxPeer createCheckbox(Checkbox target)
throws HeadlessException {
throw new HeadlessException();
}
public ScrollbarPeer createScrollbar(Scrollbar target)
throws HeadlessException {
throw new HeadlessException();
}
public ScrollPanePeer createScrollPane(ScrollPane target)
throws HeadlessException {
throw new HeadlessException();
}
public TextAreaPeer createTextArea(TextArea target)
throws HeadlessException {
throw new HeadlessException();
}
public FileDialogPeer createFileDialog(FileDialog target)
throws HeadlessException {
throw new HeadlessException();
}
public MenuBarPeer createMenuBar(MenuBar target)
throws HeadlessException {
throw new HeadlessException();
}
public MenuPeer createMenu(Menu target)
throws HeadlessException {
throw new HeadlessException();
}
public PopupMenuPeer createPopupMenu(PopupMenu target)
throws HeadlessException {
throw new HeadlessException();
}
public MenuItemPeer createMenuItem(MenuItem target)
throws HeadlessException {
throw new HeadlessException();
}
public CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
throws HeadlessException {
throw new HeadlessException();
}
public DragSourceContextPeer createDragSourceContextPeer(
DragGestureEvent dge)
throws InvalidDnDOperationException {
throw new InvalidDnDOperationException("Headless environment");
}
public RobotPeer createRobot(Robot target, GraphicsDevice screen)
throws AWTException, HeadlessException {
throw new HeadlessException();
}
public KeyboardFocusManagerPeer getKeyboardFocusManagerPeer() {
// See 6833019.
return kfmPeer;
}
public TrayIconPeer createTrayIcon(TrayIcon target)
throws HeadlessException {
throw new HeadlessException();
}
public SystemTrayPeer createSystemTray(SystemTray target)
throws HeadlessException {
throw new HeadlessException();
}
public boolean isTraySupported() {
return false;
}
public GlobalCursorManager getGlobalCursorManager()
throws HeadlessException {
throw new HeadlessException();
}
/*
* Headless toolkit - unsupported.
*/
protected void loadSystemColors(int[] systemColors)
throws HeadlessException {
throw new HeadlessException();
}
public ColorModel getColorModel()
throws HeadlessException {
throw new HeadlessException();
}
public int getScreenResolution()
throws HeadlessException {
throw new HeadlessException();
}
public Map mapInputMethodHighlight(InputMethodHighlight highlight)
throws HeadlessException {
throw new HeadlessException();
}
public int getMenuShortcutKeyMask()
throws HeadlessException {
throw new HeadlessException();
}
public boolean getLockingKeyState(int keyCode)
throws UnsupportedOperationException {
throw new HeadlessException();
}
public void setLockingKeyState(int keyCode, boolean on)
throws UnsupportedOperationException {
throw new HeadlessException();
}
public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
throws IndexOutOfBoundsException, HeadlessException {
throw new HeadlessException();
}
public Dimension getBestCursorSize(int preferredWidth, int preferredHeight)
throws HeadlessException {
throw new HeadlessException();
}
public int getMaximumCursorColors()
throws HeadlessException {
throw new HeadlessException();
}
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> abstractRecognizerClass,
DragSource ds, Component c,
int srcActions, DragGestureListener dgl)
{
return null;
}
public int getScreenHeight()
throws HeadlessException {
throw new HeadlessException();
}
public int getScreenWidth()
throws HeadlessException {
throw new HeadlessException();
}
public Dimension getScreenSize()
throws HeadlessException {
throw new HeadlessException();
}
public Insets getScreenInsets(GraphicsConfiguration gc)
throws HeadlessException {
throw new HeadlessException();
}
public void setDynamicLayout(boolean dynamic)
throws HeadlessException {
throw new HeadlessException();
}
protected boolean isDynamicLayoutSet()
throws HeadlessException {
throw new HeadlessException();
}
public boolean isDynamicLayoutActive()
throws HeadlessException {
throw new HeadlessException();
}
public Clipboard getSystemClipboard()
throws HeadlessException {
throw new HeadlessException();
}
/*
* Printing
*/
public PrintJob getPrintJob(Frame frame, String jobtitle,
JobAttributes jobAttributes,
PageAttributes pageAttributes) {
if (frame != null) {
// Should never happen
throw new HeadlessException();
}
throw new NullPointerException("frame must not be null");
}
public PrintJob getPrintJob(Frame frame, String doctitle, Properties props)
{
if (frame != null) {
// Should never happen
throw new HeadlessException();
}
throw new NullPointerException("frame must not be null");
}
/*
* Headless toolkit - supported.
*/
public void sync() {
// Do nothing
}
public void beep() {
// Send alert character
System.out.write(0x07);
}
/*
* Event Queue
*/
public EventQueue getSystemEventQueueImpl() {
return SunToolkit.getSystemEventQueueImplPP();
}
/*
* Images.
*/
public int checkImage(Image img, int w, int h, ImageObserver o) {
return tk.checkImage(img, w, h, o);
}
public boolean prepareImage(
Image img, int w, int h, ImageObserver o) {
return tk.prepareImage(img, w, h, o);
}
public Image getImage(String filename) {
return tk.getImage(filename);
}
public Image getImage(URL url) {
return tk.getImage(url);
}
public Image createImage(String filename) {
return tk.createImage(filename);
}
public Image createImage(URL url) {
return tk.createImage(url);
}
public Image createImage(byte[] data, int offset, int length) {
return tk.createImage(data, offset, length);
}
public Image createImage(ImageProducer producer) {
return tk.createImage(producer);
}
public Image createImage(byte[] imagedata) {
return tk.createImage(imagedata);
}
/*
* Fonts
*/
@SuppressWarnings("deprecation")
public FontPeer getFontPeer(String name, int style) {
if (componentFactory != null) {
return componentFactory.getFontPeer(name, style);
}
return null;
}
@Override
public DataTransferer getDataTransferer() {
return null;
}
@SuppressWarnings("deprecation")
public FontMetrics getFontMetrics(Font font) {
return tk.getFontMetrics(font);
}
@SuppressWarnings("deprecation")
public String[] getFontList() {
return tk.getFontList();
}
/*
* Desktop properties
*/
public void addPropertyChangeListener(String name,
PropertyChangeListener pcl) {
tk.addPropertyChangeListener(name, pcl);
}
public void removePropertyChangeListener(String name,
PropertyChangeListener pcl) {
tk.removePropertyChangeListener(name, pcl);
}
/*
* Modality
*/
public boolean isModalityTypeSupported(Dialog.ModalityType modalityType) {
return false;
}
public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
return false;
}
/*
* Always on top
*/
public boolean isAlwaysOnTopSupported() {
return false;
}
/*
* AWT Event listeners
*/
public void addAWTEventListener(AWTEventListener listener,
long eventMask) {
tk.addAWTEventListener(listener, eventMask);
}
public void removeAWTEventListener(AWTEventListener listener) {
tk.removeAWTEventListener(listener);
}
public AWTEventListener[] getAWTEventListeners() {
return tk.getAWTEventListeners();
}
public AWTEventListener[] getAWTEventListeners(long eventMask) {
return tk.getAWTEventListeners(eventMask);
}
public boolean isDesktopSupported() {
return false;
}
public DesktopPeer createDesktopPeer(Desktop target)
throws HeadlessException{
throw new HeadlessException();
}
public boolean areExtraMouseButtonsEnabled() throws HeadlessException{
throw new HeadlessException();
}
}

View File

@@ -0,0 +1,237 @@
/*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
import java.awt.color.*;
import java.awt.image.*;
import sun.awt.image.ToolkitImage;
import sun.awt.image.ImageRepresentation;
import java.util.Arrays;
public class IconInfo {
/**
* Representation of image as an int array.
* It's used on platforms where icon data
* is expected to be in 32-bit format.
*/
private int[] intIconData;
/**
* Representation of image as an long array.
* It's used on platforms where icon data
* is expected to be in 64-bit format.
*/
private long[] longIconData;
/**
* Icon image.
*/
private Image image;
/**
* Width of icon image. Being set in constructor.
*/
private final int width;
/**
* Height of icon image. Being set in constructor.
*/
private final int height;
/**
* Width of scaled icon image. Can be set in setScaledDimension.
*/
private int scaledWidth;
/**
* Height of scaled icon image. Can be set in setScaledDimension.
*/
private int scaledHeight;
/**
* Length of raw data. Being set in constructor / setScaledDimension.
*/
private int rawLength;
public IconInfo(int[] intIconData) {
this.intIconData =
(null == intIconData) ? null : Arrays.copyOf(intIconData, intIconData.length);
this.width = intIconData[0];
this.height = intIconData[1];
this.scaledWidth = width;
this.scaledHeight = height;
this.rawLength = width * height + 2;
}
public IconInfo(long[] longIconData) {
this.longIconData =
(null == longIconData) ? null : Arrays.copyOf(longIconData, longIconData.length);
this.width = (int)longIconData[0];
this.height = (int)longIconData[1];
this.scaledWidth = width;
this.scaledHeight = height;
this.rawLength = width * height + 2;
}
public IconInfo(Image image) {
this.image = image;
if (image instanceof ToolkitImage) {
ImageRepresentation ir = ((ToolkitImage)image).getImageRep();
ir.reconstruct(ImageObserver.ALLBITS);
this.width = ir.getWidth();
this.height = ir.getHeight();
} else {
this.width = image.getWidth(null);
this.height = image.getHeight(null);
}
this.scaledWidth = width;
this.scaledHeight = height;
this.rawLength = width * height + 2;
}
/*
* It sets size of scaled icon.
*/
public void setScaledSize(int width, int height) {
this.scaledWidth = width;
this.scaledHeight = height;
this.rawLength = width * height + 2;
}
public boolean isValid() {
return (width > 0 && height > 0);
}
public int getWidth() {
return width;
}
public int getHeight() {
return height;
}
public String toString() {
return "IconInfo[w=" + width + ",h=" + height + ",sw=" + scaledWidth + ",sh=" + scaledHeight + "]";
}
public int getRawLength() {
return rawLength;
}
public int[] getIntData() {
if (this.intIconData == null) {
if (this.longIconData != null) {
this.intIconData = longArrayToIntArray(longIconData);
} else if (this.image != null) {
this.intIconData = imageToIntArray(this.image, scaledWidth, scaledHeight);
}
}
return this.intIconData;
}
public long[] getLongData() {
if (this.longIconData == null) {
if (this.intIconData != null) {
this.longIconData = intArrayToLongArray(this.intIconData);
} else if (this.image != null) {
int[] intIconData = imageToIntArray(this.image, scaledWidth, scaledHeight);
this.longIconData = intArrayToLongArray(intIconData);
}
}
return this.longIconData;
}
public Image getImage() {
if (this.image == null) {
if (this.intIconData != null) {
this.image = intArrayToImage(this.intIconData);
} else if (this.longIconData != null) {
int[] intIconData = longArrayToIntArray(this.longIconData);
this.image = intArrayToImage(intIconData);
}
}
return this.image;
}
private static int[] longArrayToIntArray(long[] longData) {
int[] intData = new int[longData.length];
for (int i = 0; i < longData.length; i++) {
// Such a conversion is valid since the
// original data (see
// make/sun/xawt/ToBin.java) were ints
intData[i] = (int)longData[i];
}
return intData;
}
private static long[] intArrayToLongArray(int[] intData) {
long[] longData = new long[intData.length];
for (int i = 0; i < intData.length; i++) {
longData[i] = (int)intData[i];
}
return longData;
}
static Image intArrayToImage(int[] raw) {
ColorModel cm =
new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000,
false, DataBuffer.TYPE_INT);
DataBuffer buffer = new DataBufferInt(raw, raw.length-2, 2);
WritableRaster raster =
Raster.createPackedRaster(buffer, raw[0], raw[1],
raw[0],
new int[] {0x00ff0000, 0x0000ff00,
0x000000ff, 0xff000000},
null);
BufferedImage im = new BufferedImage(cm, raster, false, null);
return im;
}
/*
* Returns array of integers which holds data for the image.
* It scales the image if necessary.
*/
static int[] imageToIntArray(Image image, int width, int height) {
if (width <= 0 || height <= 0) {
return null;
}
ColorModel cm =
new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000,
false, DataBuffer.TYPE_INT);
DataBufferInt buffer = new DataBufferInt(width * height);
WritableRaster raster =
Raster.createPackedRaster(buffer, width, height,
width,
new int[] {0x00ff0000, 0x0000ff00,
0x000000ff, 0xff000000},
null);
BufferedImage im = new BufferedImage(cm, raster, false, null);
Graphics g = im.getGraphics();
g.drawImage(image, 0, 0, width, height, null);
g.dispose();
int[] data = buffer.getData();
int[] raw = new int[width * height + 2];
raw[0] = width;
raw[1] = height;
System.arraycopy(data, 0, raw, 2, width * height);
return raw;
}
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTException;
import java.awt.Window;
import java.awt.im.spi.InputMethodDescriptor;
import java.util.Locale;
import sun.awt.im.InputContext;
/**
* Input method support for toolkits
*/
public interface InputMethodSupport {
/**
* Returns a new input method adapter descriptor for native input methods.
*/
InputMethodDescriptor getInputMethodAdapterDescriptor()
throws AWTException;
/**
* Returns a new input method window for the platform
*/
Window createInputMethodWindow(String title, InputContext context);
/**
* Returns whether input methods are enabled on the platform
*/
boolean enableInputMethodsForTextComponent();
/**
* Returns the default keyboard locale of the underlying operating system.
*/
Locale getDefaultKeyboardLocale();
}

View File

@@ -0,0 +1,181 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Component;
import java.awt.KeyboardFocusManager;
import java.awt.Window;
import java.awt.Canvas;
import java.awt.Scrollbar;
import java.awt.Panel;
import java.awt.event.FocusEvent;
import java.awt.peer.KeyboardFocusManagerPeer;
import java.awt.peer.ComponentPeer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import sun.util.logging.PlatformLogger;
public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
private static class KfmAccessor {
private static AWTAccessor.KeyboardFocusManagerAccessor instance =
AWTAccessor.getKeyboardFocusManagerAccessor();
}
// The constants are copied from java.awt.KeyboardFocusManager
public static final int SNFH_FAILURE = 0;
public static final int SNFH_SUCCESS_HANDLED = 1;
public static final int SNFH_SUCCESS_PROCEED = 2;
@Override
public void clearGlobalFocusOwner(Window activeWindow) {
if (activeWindow != null) {
Component focusOwner = activeWindow.getFocusOwner();
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Clearing global focus owner " + focusOwner);
}
if (focusOwner != null) {
FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
SunToolkit.postPriorityEvent(fl);
}
}
}
/*
* WARNING: Don't call it on the Toolkit thread.
*
* Checks if the component:
* 1) accepts focus on click (in general)
* 2) may be a focus owner (in particular)
*/
@SuppressWarnings("deprecation")
public static boolean shouldFocusOnClick(Component component) {
boolean acceptFocusOnClick = false;
// A component is generally allowed to accept focus on click
// if its peer is focusable. There're some exceptions though.
// CANVAS & SCROLLBAR accept focus on click
if (component instanceof Canvas ||
component instanceof Scrollbar)
{
acceptFocusOnClick = true;
// PANEL, empty only, accepts focus on click
} else if (component instanceof Panel) {
acceptFocusOnClick = (((Panel)component).getComponentCount() == 0);
// Other components
} else {
ComponentPeer peer = (component != null ? component.getPeer() : null);
acceptFocusOnClick = (peer != null ? peer.isFocusable() : false);
}
return acceptFocusOnClick &&
AWTAccessor.getComponentAccessor().canBeFocusOwner(component);
}
/*
* Posts proper lost/gain focus events to the event queue.
*/
@SuppressWarnings("deprecation")
public static boolean deliverFocus(Component lightweightChild,
Component target,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time,
CausedFocusEvent.Cause cause,
Component currentFocusOwner) // provided by the descendant peers
{
if (lightweightChild == null) {
lightweightChild = target;
}
Component currentOwner = currentFocusOwner;
if (currentOwner != null && currentOwner.getPeer() == null) {
currentOwner = null;
}
if (currentOwner != null) {
FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
false, lightweightChild, cause);
if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Posting focus event: " + fl);
}
SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl);
}
FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
false, currentOwner, cause);
if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Posting focus event: " + fg);
}
SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg);
return true;
}
// WARNING: Don't call it on the Toolkit thread.
public static boolean requestFocusFor(Component target, CausedFocusEvent.Cause cause) {
return AWTAccessor.getComponentAccessor().requestFocus(target, cause);
}
// WARNING: Don't call it on the Toolkit thread.
public static int shouldNativelyFocusHeavyweight(Component heavyweight,
Component descendant,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time,
CausedFocusEvent.Cause cause)
{
return KfmAccessor.instance.shouldNativelyFocusHeavyweight(
heavyweight, descendant, temporary, focusedWindowChangeAllowed,
time, cause);
}
public static void removeLastFocusRequest(Component heavyweight) {
KfmAccessor.instance.removeLastFocusRequest(heavyweight);
}
// WARNING: Don't call it on the Toolkit thread.
public static boolean processSynchronousLightweightTransfer(Component heavyweight,
Component descendant,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time)
{
return KfmAccessor.instance.processSynchronousLightweightTransfer(
heavyweight, descendant, temporary, focusedWindowChangeAllowed,
time);
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.peer.KeyboardFocusManagerPeer;
/**
* {@link KeyboardFocusManagerPeerProvider} is required to be implemented by
* the currently used {@link java.awt.Toolkit} instance. In order to initialize
* {@link java.awt.KeyboardFocusManager}, a singleton instance of {@link KeyboardFocusManagerPeer}
* is needed. To obtain that instance, the {@link #getKeyboardFocusManagerPeer}
* method of the current toolkit is called.
*/
public interface KeyboardFocusManagerPeerProvider {
/**
* Gets a singleton KeyboardFocusManagerPeer instance.
*/
KeyboardFocusManagerPeer getKeyboardFocusManagerPeer();
}

View File

@@ -0,0 +1,203 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Component;
import java.awt.Container;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MenuBar;
import java.awt.MenuComponent;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.dnd.DragGestureEvent;
import java.awt.dnd.DragGestureListener;
import java.awt.dnd.DragGestureRecognizer;
import java.awt.dnd.DragSource;
import java.awt.dnd.DropTarget;
import java.awt.dnd.InvalidDnDOperationException;
import java.awt.dnd.peer.DragSourceContextPeer;
import java.awt.peer.FramePeer;
/**
* The class provides basic functionality for a lightweight frame
* implementation. A subclass is expected to provide painting to an
* offscreen image and access to it. Thus it can be used for lightweight
* embedding.
*
* @author Artem Ananiev
* @author Anton Tarasov
*/
@SuppressWarnings("serial")
public abstract class LightweightFrame extends Frame {
/**
* Constructs a new, initially invisible {@code LightweightFrame}
* instance.
*/
public LightweightFrame() {
setUndecorated(true);
setResizable(true);
setEnabled(true);
}
/**
* Blocks introspection of a parent window by this child.
*
* @return null
*/
@Override public final Container getParent() { return null; }
@Override public Graphics getGraphics() { return null; }
@Override public final boolean isResizable() { return true; }
// Block modification of any frame attributes, since they aren't
// applicable for a lightweight frame.
@Override public final void setTitle(String title) {}
@Override public final void setIconImage(Image image) {}
@Override public final void setIconImages(java.util.List<? extends Image> icons) {}
@Override public final void setMenuBar(MenuBar mb) {}
@Override public final void setResizable(boolean resizable) {}
@Override public final void remove(MenuComponent m) {}
@Override public final void toFront() {}
@Override public final void toBack() {}
@Override public void addNotify() {
synchronized (getTreeLock()) {
if (getPeer() == null) {
SunToolkit stk = (SunToolkit)Toolkit.getDefaultToolkit();
try {
setPeer(stk.createLightweightFrame(this));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
super.addNotify();
}
}
private void setPeer(final FramePeer p) {
AWTAccessor.getComponentAccessor().setPeer(this, p);
}
/**
* Requests the peer to emulate activation or deactivation of the
* frame. Peers should override this method if they are to implement
* this functionality.
*
* @param activate if <code>true</code>, activates the frame;
* otherwise, deactivates the frame
*/
public void emulateActivation(boolean activate) {
((FramePeer)getPeer()).emulateActivation(activate);
}
/**
* Delegates the focus grab action to the client (embedding) application.
* The method is called by the AWT grab machinery.
*
* @see SunToolkit#grab(java.awt.Window)
*/
public abstract void grabFocus();
/**
* Delegates the focus ungrab action to the client (embedding) application.
* The method is called by the AWT grab machinery.
*
* @see SunToolkit#ungrab(java.awt.Window)
*/
public abstract void ungrabFocus();
/**
* Returns the scale factor of this frame. The default value is 1.
*
* @return the scale factor
* @see #notifyDisplayChanged(int)
*/
public abstract int getScaleFactor();
/**
* Called when display of the hosted frame is changed.
*
* @param scaleFactor the scale factor
*/
public abstract void notifyDisplayChanged(int scaleFactor);
/**
* Host window absolute bounds.
*/
private int hostX, hostY, hostW, hostH;
/**
* Returns the absolute bounds of the host (embedding) window.
*
* @return the host window bounds
*/
public Rectangle getHostBounds() {
if (hostX == 0 && hostY == 0 && hostW == 0 && hostH == 0) {
// The client app is probably unaware of the setHostBounds.
// A safe fall-back:
return getBounds();
}
return new Rectangle(hostX, hostY, hostW, hostH);
}
/**
* Sets the absolute bounds of the host (embedding) window.
*/
public void setHostBounds(int x, int y, int w, int h) {
hostX = x;
hostY = y;
hostW = w;
hostH = h;
}
/**
* Create a drag gesture recognizer for the lightweight frame.
*/
public abstract <T extends DragGestureRecognizer> T createDragGestureRecognizer(
Class<T> abstractRecognizerClass,
DragSource ds, Component c, int srcActions,
DragGestureListener dgl);
/**
* Create a drag source context peer for the lightweight frame.
*/
public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException;
/**
* Adds a drop target to the lightweight frame.
*/
public abstract void addDropTarget(DropTarget dt);
/**
* Removes a drop target from the lightweight frame.
*/
public abstract void removeDropTarget(DropTarget dt);
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* Interface for identifying a component that will be excluded during
* modal operations. Implementing this interface will ensure that the
* component willl still receive it's events.
*
* @since 1.5
* @author Joshua Outwater
*/
public interface ModalExclude {
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
/**
* Event object describing changes in AWT modality
*/
@SuppressWarnings("serial")
public class ModalityEvent extends AWTEvent implements ActiveEvent {
public static final int MODALITY_PUSHED = 1300;
public static final int MODALITY_POPPED = 1301;
private ModalityListener listener;
public ModalityEvent(Object source, ModalityListener listener, int id) {
super(source, id);
this.listener = listener;
}
public void dispatch() {
switch(getID()) {
case MODALITY_PUSHED:
listener.modalityPushed(this);
break;
case MODALITY_POPPED:
listener.modalityPopped(this);
break;
default:
throw new Error("Invalid event id.");
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* Listener interface so Java Plug-in can be notified
* of changes in AWT modality
*/
public interface ModalityListener {
/**
* Called by AWT when it enters a new level of modality
*/
public void modalityPushed(ModalityEvent ev);
/**
* Called by AWT when it exits a level of modality
*/
public void modalityPopped(ModalityEvent ev);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
public class Mutex {
private boolean locked;
private Thread owner;
public synchronized void lock() {
if (locked && Thread.currentThread() == owner) {
throw new IllegalMonitorStateException();
}
do {
if (!locked) {
locked = true;
owner = Thread.currentThread();
} else {
try {
wait();
} catch (InterruptedException e) {
// try again
}
}
} while (owner != Thread.currentThread());
}
public synchronized void unlock() {
if (Thread.currentThread() != owner) {
throw new IllegalMonitorStateException();
}
owner = null;
locked = false;
notify();
}
protected boolean isOwned() {
return (locked && Thread.currentThread() == owner);
}
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
class NativeLibLoader {
/**
* This is copied from java.awt.Toolkit since we need the library
* loaded in sun.awt.image also:
*
* WARNING: This is a temporary workaround for a problem in the
* way the AWT loads native libraries. A number of classes in this
* package (sun.awt.image) have a native method, initIDs(),
* which initializes
* the JNI field and method ids used in the native portion of
* their implementation.
*
* Since the use and storage of these ids is done by the
* implementation libraries, the implementation of these method is
* provided by the particular AWT implementations
* (i.e. "Toolkit"s/Peer), such as Motif, Win32 or Tiny. The
* problem is that this means that the native libraries must be
* loaded by the java.* classes, which do not necessarily know the
* names of the libraries to load. A better way of doing this
* would be to provide a separate library which defines java.awt.*
* initIDs, and exports the relevant symbols out to the
* implementation libraries.
*
* For now, we know it's done by the implementation, and we assume
* that the name of the library is "awt". -br.
*/
static void loadLibraries() {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
System.loadLibrary("awt");
return null;
}
});
}
}

View File

@@ -0,0 +1,308 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTException;
import java.awt.BufferCapabilities;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Insets;
import java.awt.MenuBar;
import java.awt.Point;
import java.awt.Event;
import java.awt.event.PaintEvent;
import java.awt.image.ColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage;
import java.awt.peer.CanvasPeer;
import java.awt.peer.LightweightPeer;
import java.awt.peer.PanelPeer;
import java.awt.peer.ComponentPeer;
import java.awt.peer.ContainerPeer;
import java.awt.Rectangle;
import sun.java2d.pipe.Region;
/**
* Implements the LightweightPeer interface for use in lightweight components
* that have no native window associated with them. This gets created by
* default in Component so that Component and Container can be directly
* extended to create useful components written entirely in java. These
* components must be hosted somewhere higher up in the component tree by a
* native container (such as a Frame).
*
* This implementation provides no useful semantics and serves only as a
* marker. One could provide alternative implementations in java that do
* something useful for some of the other peer interfaces to minimize the
* native code.
*
* This was renamed from java.awt.LightweightPeer (a horrible and confusing
* name) and moved from java.awt.Toolkit into sun.awt as a public class in
* its own file.
*
* @author Timothy Prinzing
* @author Michael Martak
*/
public class NullComponentPeer implements LightweightPeer,
CanvasPeer, PanelPeer {
public boolean isObscured() {
return false;
}
public boolean canDetermineObscurity() {
return false;
}
public boolean isFocusable() {
return false;
}
public void setVisible(boolean b) {
}
public void show() {
}
public void hide() {
}
public void setEnabled(boolean b) {
}
public void enable() {
}
public void disable() {
}
public void paint(Graphics g) {
}
public void repaint(long tm, int x, int y, int width, int height) {
}
public void print(Graphics g) {
}
public void setBounds(int x, int y, int width, int height, int op) {
}
public void reshape(int x, int y, int width, int height) {
}
public void coalescePaintEvent(PaintEvent e) {
}
public boolean handleEvent(Event e) {
return false;
}
public void handleEvent(java.awt.AWTEvent arg0) {
}
public Dimension getPreferredSize() {
return new Dimension(1,1);
}
public Dimension getMinimumSize() {
return new Dimension(1,1);
}
public ColorModel getColorModel() {
return null;
}
public Graphics getGraphics() {
return null;
}
public GraphicsConfiguration getGraphicsConfiguration() {
return null;
}
public FontMetrics getFontMetrics(Font font) {
return null;
}
public void dispose() {
// no native code
}
public void setForeground(Color c) {
}
public void setBackground(Color c) {
}
public void setFont(Font f) {
}
public void updateCursorImmediately() {
}
public void setCursor(Cursor cursor) {
}
public boolean requestFocus
(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause) {
return false;
}
public Image createImage(ImageProducer producer) {
return null;
}
public Image createImage(int width, int height) {
return null;
}
public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
return false;
}
public int checkImage(Image img, int w, int h, ImageObserver o) {
return 0;
}
public Dimension preferredSize() {
return getPreferredSize();
}
public Dimension minimumSize() {
return getMinimumSize();
}
public Point getLocationOnScreen() {
return new Point(0,0);
}
public Insets getInsets() {
return insets();
}
public void beginValidate() {
}
public void endValidate() {
}
public Insets insets() {
return new Insets(0, 0, 0, 0);
}
public boolean isPaintPending() {
return false;
}
public boolean handlesWheelScrolling() {
return false;
}
public VolatileImage createVolatileImage(int width, int height) {
return null;
}
public void beginLayout() {
}
public void endLayout() {
}
public void createBuffers(int numBuffers, BufferCapabilities caps)
throws AWTException {
throw new AWTException(
"Page-flipping is not allowed on a lightweight component");
}
public Image getBackBuffer() {
throw new IllegalStateException(
"Page-flipping is not allowed on a lightweight component");
}
public void flip(int x1, int y1, int x2, int y2,
BufferCapabilities.FlipContents flipAction)
{
throw new IllegalStateException(
"Page-flipping is not allowed on a lightweight component");
}
public void destroyBuffers() {
}
/**
* @see java.awt.peer.ComponentPeer#isReparentSupported
*/
public boolean isReparentSupported() {
return false;
}
/**
* @see java.awt.peer.ComponentPeer#reparent
*/
public void reparent(ContainerPeer newNativeParent) {
throw new UnsupportedOperationException();
}
public void layout() {
}
public Rectangle getBounds() {
return new Rectangle(0, 0, 0, 0);
}
/**
* Applies the shape to the native component window.
* @since 1.7
*/
public void applyShape(Region shape) {
}
/**
* Lowers this component at the bottom of the above HW peer. If the above parameter
* is null then the method places this component at the top of the Z-order.
*/
public void setZOrder(ComponentPeer above) {
}
public boolean updateGraphicsData(GraphicsConfiguration gc) {
return false;
}
public GraphicsConfiguration getAppropriateGraphicsConfiguration(
GraphicsConfiguration gc)
{
return gc;
}
}

View File

@@ -0,0 +1,189 @@
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.Map;
import static sun.awt.OSInfo.OSType.*;
/**
* @author Pavel Porvatov
*/
public class OSInfo {
public static enum OSType {
WINDOWS,
LINUX,
SOLARIS,
MACOSX,
UNKNOWN
}
/*
The map windowsVersionMap must contain all windows version constants except WINDOWS_UNKNOWN,
and so the method getWindowsVersion() will return the constant for known OS.
It allows compare objects by "==" instead of "equals".
*/
public static final WindowsVersion WINDOWS_UNKNOWN = new WindowsVersion(-1, -1);
public static final WindowsVersion WINDOWS_95 = new WindowsVersion(4, 0);
public static final WindowsVersion WINDOWS_98 = new WindowsVersion(4, 10);
public static final WindowsVersion WINDOWS_ME = new WindowsVersion(4, 90);
public static final WindowsVersion WINDOWS_2000 = new WindowsVersion(5, 0);
public static final WindowsVersion WINDOWS_XP = new WindowsVersion(5, 1);
public static final WindowsVersion WINDOWS_2003 = new WindowsVersion(5, 2);
public static final WindowsVersion WINDOWS_VISTA = new WindowsVersion(6, 0);
private static final String OS_NAME = "os.name";
private static final String OS_VERSION = "os.version";
private final static Map<String, WindowsVersion> windowsVersionMap = new HashMap<String, OSInfo.WindowsVersion>();
static {
windowsVersionMap.put(WINDOWS_95.toString(), WINDOWS_95);
windowsVersionMap.put(WINDOWS_98.toString(), WINDOWS_98);
windowsVersionMap.put(WINDOWS_ME.toString(), WINDOWS_ME);
windowsVersionMap.put(WINDOWS_2000.toString(), WINDOWS_2000);
windowsVersionMap.put(WINDOWS_XP.toString(), WINDOWS_XP);
windowsVersionMap.put(WINDOWS_2003.toString(), WINDOWS_2003);
windowsVersionMap.put(WINDOWS_VISTA.toString(), WINDOWS_VISTA);
}
private static final PrivilegedAction<OSType> osTypeAction = new PrivilegedAction<OSType>() {
public OSType run() {
return getOSType();
}
};
private OSInfo() {
// Don't allow to create instances
}
/**
* Returns type of operating system.
*/
public static OSType getOSType() throws SecurityException {
String osName = System.getProperty(OS_NAME);
if (osName != null) {
if (osName.contains("Windows")) {
return WINDOWS;
}
if (osName.contains("Linux")) {
return LINUX;
}
if (osName.contains("Solaris") || osName.contains("SunOS")) {
return SOLARIS;
}
if (osName.contains("OS X")) {
return MACOSX;
}
// determine another OS here
}
return UNKNOWN;
}
public static PrivilegedAction<OSType> getOSTypeAction() {
return osTypeAction;
}
public static WindowsVersion getWindowsVersion() throws SecurityException {
String osVersion = System.getProperty(OS_VERSION);
if (osVersion == null) {
return WINDOWS_UNKNOWN;
}
synchronized (windowsVersionMap) {
WindowsVersion result = windowsVersionMap.get(osVersion);
if (result == null) {
// Try parse version and put object into windowsVersionMap
String[] arr = osVersion.split("\\.");
if (arr.length == 2) {
try {
result = new WindowsVersion(Integer.parseInt(arr[0]), Integer.parseInt(arr[1]));
} catch (NumberFormatException e) {
return WINDOWS_UNKNOWN;
}
} else {
return WINDOWS_UNKNOWN;
}
windowsVersionMap.put(osVersion, result);
}
return result;
}
}
public static class WindowsVersion implements Comparable<WindowsVersion> {
private final int major;
private final int minor;
private WindowsVersion(int major, int minor) {
this.major = major;
this.minor = minor;
}
public int getMajor() {
return major;
}
public int getMinor() {
return minor;
}
public int compareTo(WindowsVersion o) {
int result = major - o.getMajor();
if (result == 0) {
result = minor - o.getMinor();
}
return result;
}
public boolean equals(Object obj) {
return obj instanceof WindowsVersion && compareTo((WindowsVersion) obj) == 0;
}
public int hashCode() {
return 31 * major + minor;
}
public String toString() {
return major + "." + minor;
}
}
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* Used for replacing window owner with another non-Swing window.
* It is useful in case of JavaFX-Swing interop:
* it helps to keep Swing dialogs above its owner(JavaFX stage).
*/
public interface OverrideNativeWindowHandle {
/**
* Replaces an owner window with a window with provided handle.
* @param handle native window handle
*/
void overrideWindowHandle(final long handle);
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Component;
import java.awt.Rectangle;
import java.awt.event.PaintEvent;
/**
* PaintEventDispatcher is responsible for dispatching PaintEvents. There
* can be only one PaintEventDispatcher active at a particular time.
*
*/
public class PaintEventDispatcher {
/**
* Singleton dispatcher.
*/
private static PaintEventDispatcher dispatcher;
/**
* Sets the current <code>PaintEventDispatcher</code>.
*
* @param dispatcher PaintEventDispatcher
*/
public static void setPaintEventDispatcher(
PaintEventDispatcher dispatcher) {
synchronized(PaintEventDispatcher.class) {
PaintEventDispatcher.dispatcher = dispatcher;
}
}
/**
* Returns the currently active <code>PaintEventDispatcher</code>. This
* will never return null.
*
* @return PaintEventDispatcher
*/
public static PaintEventDispatcher getPaintEventDispatcher() {
synchronized(PaintEventDispatcher.class) {
if (dispatcher == null) {
dispatcher = new PaintEventDispatcher();
}
return dispatcher;
}
}
/**
* Creates and returns the <code>PaintEvent</code> that should be
* dispatched for the specified component. If this returns null
* no <code>PaintEvent</code> is dispatched.
* <p>
* <b>WARNING:</b> This is invoked from the native thread, be careful
* what methods you end up invoking here.
*/
public PaintEvent createPaintEvent(Component target, int x, int y, int w,
int h) {
return new PaintEvent(target, PaintEvent.PAINT,
new Rectangle(x, y, w, h));
}
/**
* Returns true if a native background erase should be done for
* the specified Component.
*/
public boolean shouldDoNativeBackgroundErase(Component c) {
return true;
}
/**
* This method is invoked from the toolkit thread when the surface
* data of the component needs to be replaced. The method run() of
* the Runnable argument performs surface data replacing, run()
* should be invoked on the EDT of this component's AppContext.
* Returns true if the Runnable has been enqueued to be invoked
* on the EDT.
* (Fix 6255371.)
*/
public boolean queueSurfaceDataReplacing(Component c, Runnable r) {
return false;
}
}

View File

@@ -0,0 +1,56 @@
/*
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.event.InvocationEvent;
@SuppressWarnings("serial")
public class PeerEvent extends InvocationEvent {
public static final long PRIORITY_EVENT = 0x01;
public static final long ULTIMATE_PRIORITY_EVENT = 0x02;
public static final long LOW_PRIORITY_EVENT = 0x04;
private long flags;
public PeerEvent(Object source, Runnable runnable, long flags) {
this(source, runnable, null, false, flags);
}
public PeerEvent(Object source, Runnable runnable, Object notifier,
boolean catchExceptions, long flags) {
super(source, runnable, notifier, catchExceptions);
this.flags = flags;
}
public long getFlags() {
return flags;
}
public PeerEvent coalesceEvents(PeerEvent newEvent) {
return null;
}
}

View File

@@ -0,0 +1,440 @@
/*
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.peer.FontPeer;
import java.util.Locale;
import java.util.Vector;
import sun.font.SunFontManager;
import sun.java2d.FontSupport;
import java.nio.CharBuffer;
import java.nio.ByteBuffer;
public abstract class PlatformFont implements FontPeer {
static {
NativeLibLoader.loadLibraries();
initIDs();
}
protected FontDescriptor[] componentFonts;
protected char defaultChar;
protected FontConfiguration fontConfig;
protected FontDescriptor defaultFont;
protected String familyName;
private Object[] fontCache;
// Maybe this should be a property that is set based
// on the locale?
protected static int FONTCACHESIZE = 256;
protected static int FONTCACHEMASK = PlatformFont.FONTCACHESIZE - 1;
protected static String osVersion;
public PlatformFont(String name, int style){
SunFontManager sfm = SunFontManager.getInstance();
if (sfm instanceof FontSupport) {
fontConfig = ((FontSupport)sfm).getFontConfiguration();
}
if (fontConfig == null) {
return;
}
// map given font name to a valid logical font family name
familyName = name.toLowerCase(Locale.ENGLISH);
if (!FontConfiguration.isLogicalFontFamilyName(familyName)) {
familyName = fontConfig.getFallbackFamilyName(familyName, "sansserif");
}
componentFonts = fontConfig.getFontDescriptors(familyName, style);
// search default character
//
char missingGlyphCharacter = getMissingGlyphCharacter();
defaultChar = '?';
if (componentFonts.length > 0)
defaultFont = componentFonts[0];
for (int i = 0; i < componentFonts.length; i++){
if (componentFonts[i].isExcluded(missingGlyphCharacter)) {
continue;
}
if (componentFonts[i].encoder.canEncode(missingGlyphCharacter)) {
defaultFont = componentFonts[i];
defaultChar = missingGlyphCharacter;
break;
}
}
}
/**
* Returns the character that should be rendered when a glyph
* is missing.
*/
protected abstract char getMissingGlyphCharacter();
/**
* make a array of CharsetString with given String.
*/
public CharsetString[] makeMultiCharsetString(String str){
return makeMultiCharsetString(str.toCharArray(), 0, str.length(), true);
}
/**
* make a array of CharsetString with given String.
*/
public CharsetString[] makeMultiCharsetString(String str, boolean allowdefault){
return makeMultiCharsetString(str.toCharArray(), 0, str.length(), allowdefault);
}
/**
* make a array of CharsetString with given char array.
* @param str The char array to convert.
* @param offset offset of first character of interest
* @param len number of characters to convert
*/
public CharsetString[] makeMultiCharsetString(char str[], int offset, int len) {
return makeMultiCharsetString(str, offset, len, true);
}
/**
* make a array of CharsetString with given char array.
* @param str The char array to convert.
* @param offset offset of first character of interest
* @param len number of characters to convert
* @param allowDefault whether to allow the default char.
* Setting this to true overloads the meaning of this method to
* return non-null only if all chars can be converted.
* @return array of CharsetString or if allowDefault is false and any
* of the returned chars would have been converted to a default char,
* then return null.
* This is used to choose alternative means of displaying the text.
*/
public CharsetString[] makeMultiCharsetString(char str[], int offset, int len,
boolean allowDefault) {
if (len < 1) {
return new CharsetString[0];
}
Vector mcs = null;
char[] tmpStr = new char[len];
char tmpChar = defaultChar;
boolean encoded = false;
FontDescriptor currentFont = defaultFont;
for (int i = 0; i < componentFonts.length; i++) {
if (componentFonts[i].isExcluded(str[offset])){
continue;
}
/* Need "encoded" variable to distinguish the case when
* the default char is the same as the encoded char.
* The defaultChar on Linux is '?' so it is needed there.
*/
if (componentFonts[i].encoder.canEncode(str[offset])){
currentFont = componentFonts[i];
tmpChar = str[offset];
encoded = true;
break;
}
}
if (!allowDefault && !encoded) {
return null;
} else {
tmpStr[0] = tmpChar;
}
int lastIndex = 0;
for (int i = 1; i < len; i++){
char ch = str[offset + i];
FontDescriptor fd = defaultFont;
tmpChar = defaultChar;
encoded = false;
for (int j = 0; j < componentFonts.length; j++){
if (componentFonts[j].isExcluded(ch)){
continue;
}
if (componentFonts[j].encoder.canEncode(ch)){
fd = componentFonts[j];
tmpChar = ch;
encoded = true;
break;
}
}
if (!allowDefault && !encoded) {
return null;
} else {
tmpStr[i] = tmpChar;
}
if (currentFont != fd){
if (mcs == null) {
mcs = new Vector(3);
}
mcs.addElement(new CharsetString(tmpStr, lastIndex,
i-lastIndex, currentFont));
currentFont = fd;
fd = defaultFont;
lastIndex = i;
}
}
CharsetString[] result;
CharsetString cs = new CharsetString(tmpStr, lastIndex,
len-lastIndex, currentFont);
if (mcs == null) {
result = new CharsetString[1];
result[0] = cs;
} else {
mcs.addElement(cs);
result = new CharsetString[mcs.size()];
for (int i = 0; i < mcs.size(); i++){
result[i] = (CharsetString)mcs.elementAt(i);
}
}
return result;
}
/**
* Is it possible that this font's metrics require the multi-font calls?
* This might be true, for example, if the font supports kerning.
**/
public boolean mightHaveMultiFontMetrics() {
return fontConfig != null;
}
/**
* Specialized fast path string conversion for AWT.
*/
public Object[] makeConvertedMultiFontString(String str)
{
return makeConvertedMultiFontChars(str.toCharArray(),0,str.length());
}
public Object[] makeConvertedMultiFontChars(char[] data,
int start, int len)
{
Object[] result = new Object[2];
Object[] workingCache;
byte[] convertedData = null;
int stringIndex = start;
int convertedDataIndex = 0;
int resultIndex = 0;
int cacheIndex;
FontDescriptor currentFontDescriptor = null;
FontDescriptor lastFontDescriptor = null;
char currentDefaultChar;
PlatformFontCache theChar;
// Simple bounds check
int end = start + len;
if (start < 0 || end > data.length) {
throw new ArrayIndexOutOfBoundsException();
}
if(stringIndex >= end) {
return null;
}
// coversion loop
while(stringIndex < end)
{
currentDefaultChar = data[stringIndex];
// Note that cache sizes must be a power of two!
cacheIndex = (int)(currentDefaultChar & this.FONTCACHEMASK);
theChar = (PlatformFontCache)getFontCache()[cacheIndex];
// Is the unicode char we want cached?
if(theChar == null || theChar.uniChar != currentDefaultChar)
{
/* find a converter that can convert the current character */
currentFontDescriptor = defaultFont;
currentDefaultChar = defaultChar;
char ch = (char)data[stringIndex];
int componentCount = componentFonts.length;
for (int j = 0; j < componentCount; j++) {
FontDescriptor fontDescriptor = componentFonts[j];
fontDescriptor.encoder.reset();
//fontDescriptor.encoder.onUnmappleCharacterAction(...);
if (fontDescriptor.isExcluded(ch)) {
continue;
}
if (fontDescriptor.encoder.canEncode(ch)) {
currentFontDescriptor = fontDescriptor;
currentDefaultChar = ch;
break;
}
}
try {
char[] input = new char[1];
input[0] = currentDefaultChar;
theChar = new PlatformFontCache();
if (currentFontDescriptor.useUnicode()) {
/*
currentFontDescriptor.unicodeEncoder.encode(CharBuffer.wrap(input),
theChar.bb,
true);
*/
if (currentFontDescriptor.isLE) {
theChar.bb.put((byte)(input[0] & 0xff));
theChar.bb.put((byte)(input[0] >>8));
} else {
theChar.bb.put((byte)(input[0] >> 8));
theChar.bb.put((byte)(input[0] & 0xff));
}
}
else {
currentFontDescriptor.encoder.encode(CharBuffer.wrap(input),
theChar.bb,
true);
}
theChar.fontDescriptor = currentFontDescriptor;
theChar.uniChar = data[stringIndex];
getFontCache()[cacheIndex] = theChar;
} catch(Exception e){
// Should never happen!
System.err.println(e);
e.printStackTrace();
return null;
}
}
// Check to see if we've changed fonts.
if(lastFontDescriptor != theChar.fontDescriptor) {
if(lastFontDescriptor != null) {
result[resultIndex++] = lastFontDescriptor;
result[resultIndex++] = convertedData;
// Add the size to the converted data field.
if(convertedData != null) {
convertedDataIndex -= 4;
convertedData[0] = (byte)(convertedDataIndex >> 24);
convertedData[1] = (byte)(convertedDataIndex >> 16);
convertedData[2] = (byte)(convertedDataIndex >> 8);
convertedData[3] = (byte)convertedDataIndex;
}
if(resultIndex >= result.length) {
Object[] newResult = new Object[result.length * 2];
System.arraycopy(result, 0, newResult, 0,
result.length);
result = newResult;
}
}
if (theChar.fontDescriptor.useUnicode()) {
convertedData = new byte[(end - stringIndex + 1) *
(int)theChar.fontDescriptor.unicodeEncoder.maxBytesPerChar()
+ 4];
}
else {
convertedData = new byte[(end - stringIndex + 1) *
(int)theChar.fontDescriptor.encoder.maxBytesPerChar()
+ 4];
}
convertedDataIndex = 4;
lastFontDescriptor = theChar.fontDescriptor;
}
byte[] ba = theChar.bb.array();
int size = theChar.bb.position();
if(size == 1) {
convertedData[convertedDataIndex++] = ba[0];
}
else if(size == 2) {
convertedData[convertedDataIndex++] = ba[0];
convertedData[convertedDataIndex++] = ba[1];
} else if(size == 3) {
convertedData[convertedDataIndex++] = ba[0];
convertedData[convertedDataIndex++] = ba[1];
convertedData[convertedDataIndex++] = ba[2];
} else if(size == 4) {
convertedData[convertedDataIndex++] = ba[0];
convertedData[convertedDataIndex++] = ba[1];
convertedData[convertedDataIndex++] = ba[2];
convertedData[convertedDataIndex++] = ba[3];
}
stringIndex++;
}
result[resultIndex++] = lastFontDescriptor;
result[resultIndex] = convertedData;
// Add the size to the converted data field.
if(convertedData != null) {
convertedDataIndex -= 4;
convertedData[0] = (byte)(convertedDataIndex >> 24);
convertedData[1] = (byte)(convertedDataIndex >> 16);
convertedData[2] = (byte)(convertedDataIndex >> 8);
convertedData[3] = (byte)convertedDataIndex;
}
return result;
}
/*
* Create fontCache on demand instead of during construction to
* reduce overall memory consumption.
*
* This method is declared final so that its code can be inlined
* by the compiler.
*/
protected final Object[] getFontCache() {
// This method is not MT-safe by design. Since this is just a
// cache anyways, it's okay if we occasionally allocate the array
// twice or return an array which will be dereferenced and gced
// right away.
if (fontCache == null) {
fontCache = new Object[this.FONTCACHESIZE];
}
return fontCache;
}
/**
* Initialize JNI field and method IDs
*/
private static native void initIDs();
class PlatformFontCache
{
char uniChar;
FontDescriptor fontDescriptor;
ByteBuffer bb = ByteBuffer.allocate(4);
}
}

View File

@@ -0,0 +1,312 @@
/*
* Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.PaintEvent;
/**
* The <code>RepaintArea</code> is a geometric construct created for the
* purpose of holding the geometry of several coalesced paint events.
* This geometry is accessed synchronously, although it is written such
* that painting may still be executed asynchronously.
*
* @author Eric Hawkes
* @since 1.3
*/
public class RepaintArea {
/**
* Maximum ratio of bounding rectangle to benefit for which
* both the vertical and horizontal unions are repainted.
* For smaller ratios the whole bounding rectangle is repainted.
* @see #paint
*/
private static final int MAX_BENEFIT_RATIO = 4;
private static final int HORIZONTAL = 0;
private static final int VERTICAL = 1;
private static final int UPDATE = 2;
private static final int RECT_COUNT = UPDATE + 1;
private Rectangle paintRects[] = new Rectangle[RECT_COUNT];
/**
* Constructs a new <code>RepaintArea</code>
* @since 1.3
*/
public RepaintArea() {
}
/**
* Constructs a new <code>RepaintArea</code> initialized to match
* the values of the specified RepaintArea.
*
* @param ra the <code>RepaintArea</code> from which to copy initial
* values to a newly constructed RepaintArea
* @since 1.3
*/
private RepaintArea(RepaintArea ra) {
// This constructor is private because it should only be called
// from the cloneAndReset method
for (int i = 0; i < RECT_COUNT; i++) {
paintRects[i] = ra.paintRects[i];
}
}
/**
* Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
* PAINT Rectangles are divided into mostly vertical and mostly horizontal.
* Each group is unioned together.
* UPDATE Rectangles are unioned.
*
* @param r the specified <code>Rectangle</code>
* @param id possible values PaintEvent.UPDATE or PaintEvent.PAINT
* @since 1.3
*/
public synchronized void add(Rectangle r, int id) {
// Make sure this new rectangle has positive dimensions
if (r.isEmpty()) {
return;
}
int addTo = UPDATE;
if (id == PaintEvent.PAINT) {
addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
}
if (paintRects[addTo] != null) {
paintRects[addTo].add(r);
} else {
paintRects[addTo] = new Rectangle(r);
}
}
/**
* Creates a new <code>RepaintArea</code> with the same geometry as this
* RepaintArea, then removes all of the geometry from this
* RepaintArea and restores it to an empty RepaintArea.
*
* @return ra a new <code>RepaintArea</code> having the same geometry as
* this RepaintArea.
* @since 1.3
*/
private synchronized RepaintArea cloneAndReset() {
RepaintArea ra = new RepaintArea(this);
for (int i = 0; i < RECT_COUNT; i++) {
paintRects[i] = null;
}
return ra;
}
public boolean isEmpty() {
for (int i = 0; i < RECT_COUNT; i++) {
if (paintRects[i] != null) {
return false;
}
}
return true;
}
/**
* Constrains the size of the repaint area to the passed in bounds.
*/
public synchronized void constrain(int x, int y, int w, int h) {
for (int i = 0; i < RECT_COUNT; i++) {
Rectangle rect = paintRects[i];
if (rect != null) {
if (rect.x < x) {
rect.width -= (x - rect.x);
rect.x = x;
}
if (rect.y < y) {
rect.height -= (y - rect.y);
rect.y = y;
}
int xDelta = rect.x + rect.width - x - w;
if (xDelta > 0) {
rect.width -= xDelta;
}
int yDelta = rect.y + rect.height - y - h;
if (yDelta > 0) {
rect.height -= yDelta;
}
if (rect.width <= 0 || rect.height <= 0) {
paintRects[i] = null;
}
}
}
}
/**
* Marks the passed in region as not needing to be painted. It's possible
* this will do nothing.
*/
public synchronized void subtract(int x, int y, int w, int h) {
Rectangle subtract = new Rectangle(x, y, w, h);
for (int i = 0; i < RECT_COUNT; i++) {
if (subtract(paintRects[i], subtract)) {
if (paintRects[i] != null && paintRects[i].isEmpty()) {
paintRects[i] = null;
}
}
}
}
/**
* Invokes paint and update on target Component with optimal
* rectangular clip region.
* If PAINT bounding rectangle is less than
* MAX_BENEFIT_RATIO times the benefit, then the vertical and horizontal unions are
* painted separately. Otherwise the entire bounding rectangle is painted.
*
* @param target Component to <code>paint</code> or <code>update</code>
* @since 1.4
*/
public void paint(Object target, boolean shouldClearRectBeforePaint) {
Component comp = (Component)target;
if (isEmpty()) {
return;
}
if (!comp.isVisible()) {
return;
}
RepaintArea ra = this.cloneAndReset();
if (!subtract(ra.paintRects[VERTICAL], ra.paintRects[HORIZONTAL])) {
subtract(ra.paintRects[HORIZONTAL], ra.paintRects[VERTICAL]);
}
if (ra.paintRects[HORIZONTAL] != null && ra.paintRects[VERTICAL] != null) {
Rectangle paintRect = ra.paintRects[HORIZONTAL].union(ra.paintRects[VERTICAL]);
int square = paintRect.width * paintRect.height;
int benefit = square - ra.paintRects[HORIZONTAL].width
* ra.paintRects[HORIZONTAL].height - ra.paintRects[VERTICAL].width
* ra.paintRects[VERTICAL].height;
// if benefit is comparable with bounding box
if (MAX_BENEFIT_RATIO * benefit < square) {
ra.paintRects[HORIZONTAL] = paintRect;
ra.paintRects[VERTICAL] = null;
}
}
for (int i = 0; i < paintRects.length; i++) {
if (ra.paintRects[i] != null
&& !ra.paintRects[i].isEmpty())
{
// Should use separate Graphics for each paint() call,
// since paint() can change Graphics state for next call.
Graphics g = comp.getGraphics();
if (g != null) {
try {
g.setClip(ra.paintRects[i]);
if (i == UPDATE) {
updateComponent(comp, g);
} else {
if (shouldClearRectBeforePaint) {
g.clearRect( ra.paintRects[i].x,
ra.paintRects[i].y,
ra.paintRects[i].width,
ra.paintRects[i].height);
}
paintComponent(comp, g);
}
} finally {
g.dispose();
}
}
}
}
}
/**
* Calls <code>Component.update(Graphics)</code> with given Graphics.
*/
protected void updateComponent(Component comp, Graphics g) {
if (comp != null) {
comp.update(g);
}
}
/**
* Calls <code>Component.paint(Graphics)</code> with given Graphics.
*/
protected void paintComponent(Component comp, Graphics g) {
if (comp != null) {
comp.paint(g);
}
}
/**
* Subtracts subtr from rect. If the result is rectangle
* changes rect and returns true. Otherwise false.
*/
static boolean subtract(Rectangle rect, Rectangle subtr) {
if (rect == null || subtr == null) {
return true;
}
Rectangle common = rect.intersection(subtr);
if (common.isEmpty()) {
return true;
}
if (rect.x == common.x && rect.y == common.y) {
if (rect.width == common.width) {
rect.y += common.height;
rect.height -= common.height;
return true;
} else
if (rect.height == common.height) {
rect.x += common.width;
rect.width -= common.width;
return true;
}
} else
if (rect.x + rect.width == common.x + common.width
&& rect.y + rect.height == common.y + common.height)
{
if (rect.width == common.width) {
rect.height -= common.height;
return true;
} else
if (rect.height == common.height) {
rect.width -= common.width;
return true;
}
}
return false;
}
public String toString() {
return super.toString() + "[ horizontal=" + paintRects[0] +
" vertical=" + paintRects[1] +
" update=" + paintRects[2] + "]";
}
}

View File

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.Component;
public interface RequestFocusController
{
public boolean acceptRequestFocus(Component from, Component to,
boolean temporary, boolean focusedWindowChangeAllowed,
CausedFocusEvent.Cause cause);
}

View File

@@ -0,0 +1,187 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.ScrollPane;
import java.awt.Insets;
import java.awt.Adjustable;
import java.awt.event.MouseWheelEvent;
import sun.util.logging.PlatformLogger;
/*
* ScrollPaneWheelScroller is a helper class for implmenenting mouse wheel
* scrolling on a java.awt.ScrollPane. It contains only static methods.
* No objects of this class may be instantiated, thus it is declared abstract.
*/
public abstract class ScrollPaneWheelScroller {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ScrollPaneWheelScroller");
private ScrollPaneWheelScroller() {}
/*
* Called from ScrollPane.processMouseWheelEvent()
*/
public static void handleWheelScrolling(ScrollPane sp, MouseWheelEvent e) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
}
int increment = 0;
if (sp != null && e.getScrollAmount() != 0) {
Adjustable adj = getAdjustableToScroll(sp);
if (adj != null) {
increment = getIncrementFromAdjustable(adj, e);
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment);
}
scrollAdjustable(adj, increment);
}
}
}
/*
* Given a ScrollPane, determine which Scrollbar should be scrolled by the
* mouse wheel, if any.
*/
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
int policy = sp.getScrollbarDisplayPolicy();
// if policy is display always or never, use vert
if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
policy == ScrollPane.SCROLLBARS_NEVER) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using vertical scrolling due to scrollbar policy");
}
return sp.getVAdjustable();
}
else {
Insets ins = sp.getInsets();
int vertScrollWidth = sp.getVScrollbarWidth();
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("insets: l = " + ins.left + ", r = " + ins.right +
", t = " + ins.top + ", b = " + ins.bottom);
log.finer("vertScrollWidth = " + vertScrollWidth);
}
// Check if scrollbar is showing by examining insets of the
// ScrollPane
if (ins.right >= vertScrollWidth) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using vertical scrolling because scrollbar is present");
}
return sp.getVAdjustable();
}
else {
int horizScrollHeight = sp.getHScrollbarHeight();
if (ins.bottom >= horizScrollHeight) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using horiz scrolling because scrollbar is present");
}
return sp.getHAdjustable();
}
else {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using NO scrollbar becsause neither is present");
}
return null;
}
}
}
}
/*
* Given the info in a MouseWheelEvent and an Adjustable to scroll, return
* the amount by which the Adjustable should be adjusted. This value may
* be positive or negative.
*/
public static int getIncrementFromAdjustable(Adjustable adj,
MouseWheelEvent e) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (adj == null) {
log.fine("Assertion (adj != null) failed");
}
}
int increment = 0;
if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
increment = e.getUnitsToScroll() * adj.getUnitIncrement();
}
else if (e.getScrollType() == MouseWheelEvent.WHEEL_BLOCK_SCROLL) {
increment = adj.getBlockIncrement() * e.getWheelRotation();
}
return increment;
}
/*
* Scroll the given Adjustable by the given amount. Checks the Adjustable's
* bounds and sets the new value to the Adjustable.
*/
public static void scrollAdjustable(Adjustable adj, int amount) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (adj == null) {
log.fine("Assertion (adj != null) failed");
}
if (amount == 0) {
log.fine("Assertion (amount != 0) failed");
}
}
int current = adj.getValue();
int upperLimit = adj.getMaximum() - adj.getVisibleAmount();
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("doScrolling by " + amount);
}
if (amount > 0 && current < upperLimit) { // still some room to scroll
// down
if (current + amount < upperLimit) {
adj.setValue(current + amount);
return;
}
else {
adj.setValue(upperLimit);
return;
}
}
else if (amount < 0 && current > adj.getMinimum()) { // still some room
// to scroll up
if (current + amount > adj.getMinimum()) {
adj.setValue(current + amount);
return;
}
else {
adj.setValue(adj.getMinimum());
return;
}
}
}
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* Interface used by Swing to make copies from the Swing back buffer
* more optimal when using BufferStrategy; no need to copy the entire
* buffer when only a small sub-region has changed.
* @see javax.swing.BufferStrategyPaintManager
*
*/
public interface SubRegionShowable {
/**
* Shows the specific subregion.
*/
public void show(int x1, int y1, int x2, int y2);
/**
* Shows the specified region if the buffer is not lost and the dimensions
* of the back-buffer match those of the component.
*
* @return true if successful
*/
// NOTE: this is invoked by swing on the toolkit thread!
public boolean showIfNotLost(int x1, int y1, int x2, int y2);
}

View File

@@ -0,0 +1,186 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.IllegalComponentStateException;
import java.util.Collections;
import java.util.Iterator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import sun.util.logging.PlatformLogger;
/**
* This class is used to aid in keeping track of DisplayChangedListeners and
* notifying them when a display change has taken place. DisplayChangedListeners
* are notified when the display's bit depth is changed, or when a top-level
* window has been dragged onto another screen.
*
* It is safe for a DisplayChangedListener to be added while the list is being
* iterated.
*
* The displayChanged() call is propagated after some occurrence (either
* due to user action or some other application) causes the display mode
* (e.g., depth or resolution) to change. All heavyweight components need
* to know when this happens because they need to create new surfaceData
* objects based on the new depth.
*
* displayChanged() is also called on Windows when they are moved from one
* screen to another on a system equipped with multiple displays.
*/
public class SunDisplayChanger {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.multiscreen.SunDisplayChanger");
// Create a new synchronized map with initial capacity of one listener.
// It is asserted that the most common case is to have one GraphicsDevice
// and one top-level Window.
private Map<DisplayChangedListener, Void> listeners =
Collections.synchronizedMap(new WeakHashMap<DisplayChangedListener, Void>(1));
public SunDisplayChanger() {}
/*
* Add a DisplayChangeListener to this SunDisplayChanger so that it is
* notified when the display is changed.
*/
public void add(DisplayChangedListener theListener) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (theListener == null) {
log.fine("Assertion (theListener != null) failed");
}
}
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Adding listener: " + theListener);
}
listeners.put(theListener, null);
}
/*
* Remove the given DisplayChangeListener from this SunDisplayChanger.
*/
public void remove(DisplayChangedListener theListener) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (theListener == null) {
log.fine("Assertion (theListener != null) failed");
}
}
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Removing listener: " + theListener);
}
listeners.remove(theListener);
}
/*
* Notify our list of DisplayChangedListeners that a display change has
* taken place by calling their displayChanged() methods.
*/
public void notifyListeners() {
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("notifyListeners");
}
// This method is implemented by making a clone of the set of listeners,
// and then iterating over the clone. This is because during the course
// of responding to a display change, it may be appropriate for a
// DisplayChangedListener to add or remove itself from a SunDisplayChanger.
// If the set itself were iterated over, rather than a clone, it is
// trivial to get a ConcurrentModificationException by having a
// DisplayChangedListener remove itself from its list.
// Because all display change handling is done on the event thread,
// synchronization provides no protection against modifying the listener
// list while in the middle of iterating over it. -bchristi 7/10/2001
Set<DisplayChangedListener> cloneSet;
synchronized(listeners) {
cloneSet = new HashSet<DisplayChangedListener>(listeners.keySet());
}
Iterator<DisplayChangedListener> itr = cloneSet.iterator();
while (itr.hasNext()) {
DisplayChangedListener current = itr.next();
try {
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("displayChanged for listener: " + current);
}
current.displayChanged();
} catch (IllegalComponentStateException e) {
// This DisplayChangeListener is no longer valid. Most
// likely, a top-level window was dispose()d, but its
// Java objects have not yet been garbage collected. In any
// case, we no longer need to track this listener, though we
// do need to remove it from the original list, not the clone.
listeners.remove(current);
}
}
}
/*
* Notify our list of DisplayChangedListeners that a palette change has
* taken place by calling their paletteChanged() methods.
*/
public void notifyPaletteChanged() {
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("notifyPaletteChanged");
}
// This method is implemented by making a clone of the set of listeners,
// and then iterating over the clone. This is because during the course
// of responding to a display change, it may be appropriate for a
// DisplayChangedListener to add or remove itself from a SunDisplayChanger.
// If the set itself were iterated over, rather than a clone, it is
// trivial to get a ConcurrentModificationException by having a
// DisplayChangedListener remove itself from its list.
// Because all display change handling is done on the event thread,
// synchronization provides no protection against modifying the listener
// list while in the middle of iterating over it. -bchristi 7/10/2001
Set<DisplayChangedListener> cloneSet;
synchronized (listeners) {
cloneSet = new HashSet<DisplayChangedListener>(listeners.keySet());
}
Iterator<DisplayChangedListener> itr = cloneSet.iterator();
while (itr.hasNext()) {
DisplayChangedListener current = itr.next();
try {
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("paletteChanged for listener: " + current);
}
current.paletteChanged();
} catch (IllegalComponentStateException e) {
// This DisplayChangeListener is no longer valid. Most
// likely, a top-level window was dispose()d, but its
// Java objects have not yet been garbage collected. In any
// case, we no longer need to track this listener, though we
// do need to remove it from the original list, not the clone.
listeners.remove(current);
}
}
}
}

View File

@@ -0,0 +1,159 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.*;
import sun.util.logging.PlatformLogger;
public abstract class SunGraphicsCallback {
public static final int HEAVYWEIGHTS = 0x1;
public static final int LIGHTWEIGHTS = 0x2;
public static final int TWO_PASSES = 0x4;
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunGraphicsCallback");
public abstract void run(Component comp, Graphics cg);
protected void constrainGraphics(Graphics g, Rectangle bounds) {
if (g instanceof ConstrainableGraphics) {
((ConstrainableGraphics)g).constrain(bounds.x, bounds.y, bounds.width, bounds.height);
} else {
g.translate(bounds.x, bounds.y);
}
g.clipRect(0, 0, bounds.width, bounds.height);
}
@SuppressWarnings("deprecation")
public final void runOneComponent(Component comp, Rectangle bounds,
Graphics g, Shape clip,
int weightFlags) {
if (comp == null || comp.getPeer() == null || !comp.isVisible()) {
return;
}
boolean lightweight = comp.isLightweight();
if ((lightweight && (weightFlags & LIGHTWEIGHTS) == 0) ||
(!lightweight && (weightFlags & HEAVYWEIGHTS) == 0)) {
return;
}
if (bounds == null) {
bounds = comp.getBounds();
}
if (clip == null || clip.intersects(bounds)) {
Graphics cg = g.create();
try {
constrainGraphics(cg, bounds);
cg.setFont(comp.getFont());
cg.setColor(comp.getForeground());
if (cg instanceof Graphics2D) {
((Graphics2D)cg).setBackground(comp.getBackground());
} else if (cg instanceof Graphics2Delegate) {
((Graphics2Delegate)cg).setBackground(
comp.getBackground());
}
run(comp, cg);
} finally {
cg.dispose();
}
}
}
public final void runComponents(Component[] comps, Graphics g,
int weightFlags) {
int ncomponents = comps.length;
Shape clip = g.getClip();
if (log.isLoggable(PlatformLogger.Level.FINER) && (clip != null)) {
Rectangle newrect = clip.getBounds();
log.finer("x = " + newrect.x + ", y = " + newrect.y +
", width = " + newrect.width +
", height = " + newrect.height);
}
// A seriously sad hack--
// Lightweight components always paint behind peered components,
// even if they are at the top of the Z order. We emulate this
// behavior by making two printing passes: the first for lightweights;
// the second for heavyweights.
//
// ToDo(dpm): Either build a list of heavyweights during the
// lightweight pass, or redesign the components array to keep
// lightweights and heavyweights separate.
if ((weightFlags & TWO_PASSES) != 0) {
for (int i = ncomponents - 1; i >= 0; i--) {
runOneComponent(comps[i], null, g, clip, LIGHTWEIGHTS);
}
for (int i = ncomponents - 1; i >= 0; i--) {
runOneComponent(comps[i], null, g, clip, HEAVYWEIGHTS);
}
} else {
for (int i = ncomponents - 1; i >= 0; i--) {
runOneComponent(comps[i], null, g, clip, weightFlags);
}
}
}
public static final class PaintHeavyweightComponentsCallback
extends SunGraphicsCallback
{
private static PaintHeavyweightComponentsCallback instance =
new PaintHeavyweightComponentsCallback();
private PaintHeavyweightComponentsCallback() {}
public void run(Component comp, Graphics cg) {
if (!comp.isLightweight()) {
comp.paintAll(cg);
} else if (comp instanceof Container) {
runComponents(((Container)comp).getComponents(), cg,
LIGHTWEIGHTS | HEAVYWEIGHTS);
}
}
public static PaintHeavyweightComponentsCallback getInstance() {
return instance;
}
}
public static final class PrintHeavyweightComponentsCallback
extends SunGraphicsCallback
{
private static PrintHeavyweightComponentsCallback instance =
new PrintHeavyweightComponentsCallback();
private PrintHeavyweightComponentsCallback() {}
public void run(Component comp, Graphics cg) {
if (!comp.isLightweight()) {
comp.printAll(cg);
} else if (comp instanceof Container) {
runComponents(((Container)comp).getComponents(), cg,
LIGHTWEIGHTS | HEAVYWEIGHTS);
}
}
public static PrintHeavyweightComponentsCallback getInstance() {
return instance;
}
}
}

View File

@@ -0,0 +1,506 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.RenderingHints;
import java.lang.annotation.Native;
/**
* This class contains rendering hints that can be used by the
* {@link java.awt.Graphics2D} class, and classes that implement
* {@link java.awt.image.BufferedImageOp} and
* {@link java.awt.image.Raster}.
*/
public class SunHints {
/**
* Defines the type of all keys used to control various
* aspects of the rendering and imaging pipelines. Instances
* of this class are immutable and unique which means that
* tests for matches can be made using the == operator instead
* of the more expensive equals() method.
*/
public static class Key extends RenderingHints.Key {
String description;
/**
* Construct a key using the indicated private key. Each
* subclass of Key maintains its own unique domain of integer
* keys. No two objects with the same integer key and of the
* same specific subclass can be constructed. An exception
* will be thrown if an attempt is made to construct another
* object of a given class with the same integer key as a
* pre-existing instance of that subclass of Key.
*/
public Key(int privatekey, String description) {
super(privatekey);
this.description = description;
}
/**
* Returns the numeric index associated with this Key. This
* is useful for use in switch statements and quick lookups
* of the setting of a particular key.
*/
public final int getIndex() {
return intKey();
}
/**
* Returns a string representation of the Key.
*/
public final String toString() {
return description;
}
/**
* Returns true if the specified object is a valid value
* for this Key.
*/
public boolean isCompatibleValue(Object val) {
if (val instanceof Value) {
return ((Value)val).isCompatibleKey(this);
}
return false;
}
}
/**
* Defines the type of all "enumerative" values used to control
* various aspects of the rendering and imaging pipelines. Instances
* of this class are immutable and unique which means that
* tests for matches can be made using the == operator instead
* of the more expensive equals() method.
*/
public static class Value {
private SunHints.Key myKey;
private int index;
private String description;
private static Value[][] ValueObjects =
new Value[NUM_KEYS][VALS_PER_KEY];
private synchronized static void register(SunHints.Key key,
Value value) {
int kindex = key.getIndex();
int vindex = value.getIndex();
if (ValueObjects[kindex][vindex] != null) {
throw new InternalError("duplicate index: "+vindex);
}
ValueObjects[kindex][vindex] = value;
}
public static Value get(int keyindex, int valueindex) {
return ValueObjects[keyindex][valueindex];
}
/**
* Construct a value using the indicated private index. Each
* subclass of Value maintains its own unique domain of integer
* indices. Enforcing the uniqueness of the integer indices
* is left to the subclass.
*/
public Value(SunHints.Key key, int index, String description) {
this.myKey = key;
this.index = index;
this.description = description;
register(key, this);
}
/**
* Returns the numeric index associated with this Key. This
* is useful for use in switch statements and quick lookups
* of the setting of a particular key.
*/
public final int getIndex() {
return index;
}
/**
* Returns a string representation of this Value.
*/
public final String toString() {
return description;
}
/**
* Returns true if the specified object is a valid Key
* for this Value.
*/
public final boolean isCompatibleKey(Key k) {
return myKey == k;
}
/**
* The hash code for all SunHints.Value objects will be the same
* as the system identity code of the object as defined by the
* System.identityHashCode() method.
*/
public final int hashCode() {
return System.identityHashCode(this);
}
/**
* The equals method for all SunHints.Value objects will return
* the same result as the equality operator '=='.
*/
public final boolean equals(Object o) {
return this == o;
}
}
private static final int NUM_KEYS = 10;
private static final int VALS_PER_KEY = 8;
/**
* Rendering hint key and values
*/
@Native public static final int INTKEY_RENDERING = 0;
@Native public static final int INTVAL_RENDER_DEFAULT = 0;
@Native public static final int INTVAL_RENDER_SPEED = 1;
@Native public static final int INTVAL_RENDER_QUALITY = 2;
/**
* Antialiasing hint key and values
*/
@Native public static final int INTKEY_ANTIALIASING = 1;
@Native public static final int INTVAL_ANTIALIAS_DEFAULT = 0;
@Native public static final int INTVAL_ANTIALIAS_OFF = 1;
@Native public static final int INTVAL_ANTIALIAS_ON = 2;
/**
* Text antialiasing hint key and values
*/
@Native public static final int INTKEY_TEXT_ANTIALIASING = 2;
@Native public static final int INTVAL_TEXT_ANTIALIAS_DEFAULT = 0;
@Native public static final int INTVAL_TEXT_ANTIALIAS_OFF = 1;
@Native public static final int INTVAL_TEXT_ANTIALIAS_ON = 2;
@Native public static final int INTVAL_TEXT_ANTIALIAS_GASP = 3;
@Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HRGB = 4;
@Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HBGR = 5;
@Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VRGB = 6;
@Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VBGR = 7;
/**
* Font fractional metrics hint key and values
*/
@Native public static final int INTKEY_FRACTIONALMETRICS = 3;
@Native public static final int INTVAL_FRACTIONALMETRICS_DEFAULT = 0;
@Native public static final int INTVAL_FRACTIONALMETRICS_OFF = 1;
@Native public static final int INTVAL_FRACTIONALMETRICS_ON = 2;
/**
* Dithering hint key and values
*/
@Native public static final int INTKEY_DITHERING = 4;
@Native public static final int INTVAL_DITHER_DEFAULT = 0;
@Native public static final int INTVAL_DITHER_DISABLE = 1;
@Native public static final int INTVAL_DITHER_ENABLE = 2;
/**
* Interpolation hint key and values
*/
@Native public static final int INTKEY_INTERPOLATION = 5;
@Native public static final int INTVAL_INTERPOLATION_NEAREST_NEIGHBOR = 0;
@Native public static final int INTVAL_INTERPOLATION_BILINEAR = 1;
@Native public static final int INTVAL_INTERPOLATION_BICUBIC = 2;
/**
* Alpha interpolation hint key and values
*/
@Native public static final int INTKEY_ALPHA_INTERPOLATION = 6;
@Native public static final int INTVAL_ALPHA_INTERPOLATION_DEFAULT = 0;
@Native public static final int INTVAL_ALPHA_INTERPOLATION_SPEED = 1;
@Native public static final int INTVAL_ALPHA_INTERPOLATION_QUALITY = 2;
/**
* Color rendering hint key and values
*/
@Native public static final int INTKEY_COLOR_RENDERING = 7;
@Native public static final int INTVAL_COLOR_RENDER_DEFAULT = 0;
@Native public static final int INTVAL_COLOR_RENDER_SPEED = 1;
@Native public static final int INTVAL_COLOR_RENDER_QUALITY = 2;
/**
* Stroke normalization control hint key and values
*/
@Native public static final int INTKEY_STROKE_CONTROL = 8;
@Native public static final int INTVAL_STROKE_DEFAULT = 0;
@Native public static final int INTVAL_STROKE_NORMALIZE = 1;
@Native public static final int INTVAL_STROKE_PURE = 2;
/**
* Image scaling hint key and values
*/
@Native public static final int INTKEY_RESOLUTION_VARIANT = 9;
@Native public static final int INTVAL_RESOLUTION_VARIANT_DEFAULT = 0;
@Native public static final int INTVAL_RESOLUTION_VARIANT_OFF = 1;
@Native public static final int INTVAL_RESOLUTION_VARIANT_ON = 2;
/**
* LCD text contrast control hint key.
* Value is "100" to make discontiguous with the others which
* are all enumerative and are of a different class.
*/
@Native public static final int INTKEY_AATEXT_LCD_CONTRAST = 100;
/**
* Rendering hint key and value objects
*/
public static final Key KEY_RENDERING =
new SunHints.Key(SunHints.INTKEY_RENDERING,
"Global rendering quality key");
public static final Object VALUE_RENDER_SPEED =
new SunHints.Value(KEY_RENDERING,
SunHints.INTVAL_RENDER_SPEED,
"Fastest rendering methods");
public static final Object VALUE_RENDER_QUALITY =
new SunHints.Value(KEY_RENDERING,
SunHints.INTVAL_RENDER_QUALITY,
"Highest quality rendering methods");
public static final Object VALUE_RENDER_DEFAULT =
new SunHints.Value(KEY_RENDERING,
SunHints.INTVAL_RENDER_DEFAULT,
"Default rendering methods");
/**
* Antialiasing hint key and value objects
*/
public static final Key KEY_ANTIALIASING =
new SunHints.Key(SunHints.INTKEY_ANTIALIASING,
"Global antialiasing enable key");
public static final Object VALUE_ANTIALIAS_ON =
new SunHints.Value(KEY_ANTIALIASING,
SunHints.INTVAL_ANTIALIAS_ON,
"Antialiased rendering mode");
public static final Object VALUE_ANTIALIAS_OFF =
new SunHints.Value(KEY_ANTIALIASING,
SunHints.INTVAL_ANTIALIAS_OFF,
"Nonantialiased rendering mode");
public static final Object VALUE_ANTIALIAS_DEFAULT =
new SunHints.Value(KEY_ANTIALIASING,
SunHints.INTVAL_ANTIALIAS_DEFAULT,
"Default antialiasing rendering mode");
/**
* Text antialiasing hint key and value objects
*/
public static final Key KEY_TEXT_ANTIALIASING =
new SunHints.Key(SunHints.INTKEY_TEXT_ANTIALIASING,
"Text-specific antialiasing enable key");
public static final Object VALUE_TEXT_ANTIALIAS_ON =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_ON,
"Antialiased text mode");
public static final Object VALUE_TEXT_ANTIALIAS_OFF =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_OFF,
"Nonantialiased text mode");
public static final Object VALUE_TEXT_ANTIALIAS_DEFAULT =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_DEFAULT,
"Default antialiasing text mode");
public static final Object VALUE_TEXT_ANTIALIAS_GASP =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_GASP,
"gasp antialiasing text mode");
public static final Object VALUE_TEXT_ANTIALIAS_LCD_HRGB =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB,
"LCD HRGB antialiasing text mode");
public static final Object VALUE_TEXT_ANTIALIAS_LCD_HBGR =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HBGR,
"LCD HBGR antialiasing text mode");
public static final Object VALUE_TEXT_ANTIALIAS_LCD_VRGB =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB,
"LCD VRGB antialiasing text mode");
public static final Object VALUE_TEXT_ANTIALIAS_LCD_VBGR =
new SunHints.Value(KEY_TEXT_ANTIALIASING,
SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VBGR,
"LCD VBGR antialiasing text mode");
/**
* Font fractional metrics hint key and value objects
*/
public static final Key KEY_FRACTIONALMETRICS =
new SunHints.Key(SunHints.INTKEY_FRACTIONALMETRICS,
"Fractional metrics enable key");
public static final Object VALUE_FRACTIONALMETRICS_ON =
new SunHints.Value(KEY_FRACTIONALMETRICS,
SunHints.INTVAL_FRACTIONALMETRICS_ON,
"Fractional text metrics mode");
public static final Object VALUE_FRACTIONALMETRICS_OFF =
new SunHints.Value(KEY_FRACTIONALMETRICS,
SunHints.INTVAL_FRACTIONALMETRICS_OFF,
"Integer text metrics mode");
public static final Object VALUE_FRACTIONALMETRICS_DEFAULT =
new SunHints.Value(KEY_FRACTIONALMETRICS,
SunHints.INTVAL_FRACTIONALMETRICS_DEFAULT,
"Default fractional text metrics mode");
/**
* Dithering hint key and value objects
*/
public static final Key KEY_DITHERING =
new SunHints.Key(SunHints.INTKEY_DITHERING,
"Dithering quality key");
public static final Object VALUE_DITHER_ENABLE =
new SunHints.Value(KEY_DITHERING,
SunHints.INTVAL_DITHER_ENABLE,
"Dithered rendering mode");
public static final Object VALUE_DITHER_DISABLE =
new SunHints.Value(KEY_DITHERING,
SunHints.INTVAL_DITHER_DISABLE,
"Nondithered rendering mode");
public static final Object VALUE_DITHER_DEFAULT =
new SunHints.Value(KEY_DITHERING,
SunHints.INTVAL_DITHER_DEFAULT,
"Default dithering mode");
/**
* Interpolation hint key and value objects
*/
public static final Key KEY_INTERPOLATION =
new SunHints.Key(SunHints.INTKEY_INTERPOLATION,
"Image interpolation method key");
public static final Object VALUE_INTERPOLATION_NEAREST_NEIGHBOR =
new SunHints.Value(KEY_INTERPOLATION,
SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR,
"Nearest Neighbor image interpolation mode");
public static final Object VALUE_INTERPOLATION_BILINEAR =
new SunHints.Value(KEY_INTERPOLATION,
SunHints.INTVAL_INTERPOLATION_BILINEAR,
"Bilinear image interpolation mode");
public static final Object VALUE_INTERPOLATION_BICUBIC =
new SunHints.Value(KEY_INTERPOLATION,
SunHints.INTVAL_INTERPOLATION_BICUBIC,
"Bicubic image interpolation mode");
/**
* Alpha interpolation hint key and value objects
*/
public static final Key KEY_ALPHA_INTERPOLATION =
new SunHints.Key(SunHints.INTKEY_ALPHA_INTERPOLATION,
"Alpha blending interpolation method key");
public static final Object VALUE_ALPHA_INTERPOLATION_SPEED =
new SunHints.Value(KEY_ALPHA_INTERPOLATION,
SunHints.INTVAL_ALPHA_INTERPOLATION_SPEED,
"Fastest alpha blending methods");
public static final Object VALUE_ALPHA_INTERPOLATION_QUALITY =
new SunHints.Value(KEY_ALPHA_INTERPOLATION,
SunHints.INTVAL_ALPHA_INTERPOLATION_QUALITY,
"Highest quality alpha blending methods");
public static final Object VALUE_ALPHA_INTERPOLATION_DEFAULT =
new SunHints.Value(KEY_ALPHA_INTERPOLATION,
SunHints.INTVAL_ALPHA_INTERPOLATION_DEFAULT,
"Default alpha blending methods");
/**
* Color rendering hint key and value objects
*/
public static final Key KEY_COLOR_RENDERING =
new SunHints.Key(SunHints.INTKEY_COLOR_RENDERING,
"Color rendering quality key");
public static final Object VALUE_COLOR_RENDER_SPEED =
new SunHints.Value(KEY_COLOR_RENDERING,
SunHints.INTVAL_COLOR_RENDER_SPEED,
"Fastest color rendering mode");
public static final Object VALUE_COLOR_RENDER_QUALITY =
new SunHints.Value(KEY_COLOR_RENDERING,
SunHints.INTVAL_COLOR_RENDER_QUALITY,
"Highest quality color rendering mode");
public static final Object VALUE_COLOR_RENDER_DEFAULT =
new SunHints.Value(KEY_COLOR_RENDERING,
SunHints.INTVAL_COLOR_RENDER_DEFAULT,
"Default color rendering mode");
/**
* Stroke normalization control hint key and value objects
*/
public static final Key KEY_STROKE_CONTROL =
new SunHints.Key(SunHints.INTKEY_STROKE_CONTROL,
"Stroke normalization control key");
public static final Object VALUE_STROKE_DEFAULT =
new SunHints.Value(KEY_STROKE_CONTROL,
SunHints.INTVAL_STROKE_DEFAULT,
"Default stroke normalization");
public static final Object VALUE_STROKE_NORMALIZE =
new SunHints.Value(KEY_STROKE_CONTROL,
SunHints.INTVAL_STROKE_NORMALIZE,
"Normalize strokes for consistent rendering");
public static final Object VALUE_STROKE_PURE =
new SunHints.Value(KEY_STROKE_CONTROL,
SunHints.INTVAL_STROKE_PURE,
"Pure stroke conversion for accurate paths");
/**
* Image resolution variant hint key and value objects
*/
public static final Key KEY_RESOLUTION_VARIANT =
new SunHints.Key(SunHints.INTKEY_RESOLUTION_VARIANT,
"Global image resolution variant key");
public static final Object VALUE_RESOLUTION_VARIANT_DEFAULT =
new SunHints.Value(KEY_RESOLUTION_VARIANT,
SunHints.INTVAL_RESOLUTION_VARIANT_DEFAULT,
"Choose image resolutions based on a default heuristic");
public static final Object VALUE_RESOLUTION_VARIANT_OFF =
new SunHints.Value(KEY_RESOLUTION_VARIANT,
SunHints.INTVAL_RESOLUTION_VARIANT_OFF,
"Use only the standard resolution of an image");
public static final Object VALUE_RESOLUTION_VARIANT_ON =
new SunHints.Value(KEY_RESOLUTION_VARIANT,
SunHints.INTVAL_RESOLUTION_VARIANT_ON,
"Always use resolution-specific variants of images");
public static class LCDContrastKey extends Key {
public LCDContrastKey(int privatekey, String description) {
super(privatekey, description);
}
/**
* Returns true if the specified object is a valid value
* for this Key. The allowable range is 100 to 250.
*/
public final boolean isCompatibleValue(Object val) {
if (val instanceof Integer) {
int ival = ((Integer)val).intValue();
return ival >= 100 && ival <= 250;
}
return false;
}
}
/**
* LCD text contrast hint key
*/
public static final RenderingHints.Key
KEY_TEXT_ANTIALIAS_LCD_CONTRAST =
new LCDContrastKey(SunHints.INTKEY_AATEXT_LCD_CONTRAST,
"Text-specific LCD contrast key");
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,191 @@
/*
* Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.*;
public class Symbol extends Charset {
public Symbol () {
super("Symbol", null);
}
public CharsetEncoder newEncoder() {
return new Encoder(this);
}
/* Seems like supporting a decoder is required, but we aren't going
* to be publically exposing this class, so no need to waste work
*/
public CharsetDecoder newDecoder() {
throw new Error("Decoder is not implemented for Symbol Charset");
}
public boolean contains(Charset cs) {
return cs instanceof Symbol;
}
private static class Encoder extends CharsetEncoder {
public Encoder(Charset cs) {
super(cs, 1.0f, 1.0f);
}
public boolean canEncode(char c) {
if (c >= 0x2200 && c <= 0x22ef) {
if (table_math[c - 0x2200] != 0x00) {
return true;
}
} else if (c >= 0x0391 && c <= 0x03d6) {
if (table_greek[c - 0x0391] != 0x00) {
return true;
}
}
return false;
}
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
char[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
assert (sp <= sl);
sp = (sp <= sl ? sp : sl);
byte[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
assert (dp <= dl);
dp = (dp <= dl ? dp : dl);
try {
while (sp < sl) {
char c = sa[sp];
if (dl - dp < 1)
return CoderResult.OVERFLOW;
if (!canEncode(c))
return CoderResult.unmappableForLength(1);
sp++;
if (c >= 0x2200 && c <= 0x22ef){
da[dp++] = table_math[c - 0x2200];
} else if (c >= 0x0391 && c <= 0x03d6) {
da[dp++]= table_greek[c - 0x0391];
}
}
return CoderResult.UNDERFLOW;
} finally {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());
}
}
private static byte[] table_math = {
(byte)0042, (byte)0000, (byte)0144, (byte)0044,
(byte)0000, (byte)0306, (byte)0104, (byte)0321, // 00
(byte)0316, (byte)0317, (byte)0000, (byte)0000,
(byte)0000, (byte)0047, (byte)0000, (byte)0120,
(byte)0000, (byte)0345, (byte)0055, (byte)0000,
(byte)0000, (byte)0244, (byte)0000, (byte)0052, // 10
(byte)0260, (byte)0267, (byte)0326, (byte)0000,
(byte)0000, (byte)0265, (byte)0245, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0275,
(byte)0000, (byte)0000, (byte)0000, (byte)0331, // 20
(byte)0332, (byte)0307, (byte)0310, (byte)0362,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0134, (byte)0000, (byte)0000, (byte)0000, // 30
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0176, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0100, (byte)0000, (byte)0000, // 40
(byte)0273, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000, // 50
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0271, (byte)0272, (byte)0000, (byte)0000,
(byte)0243, (byte)0263, (byte)0000, (byte)0000, // 60
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000, // 70
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0314, (byte)0311,
(byte)0313, (byte)0000, (byte)0315, (byte)0312, // 80
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0305, (byte)0000, (byte)0304, // 90
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0136, (byte)0000, (byte)0000, // a0
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000, // b0
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0340, (byte)0327, (byte)0000, (byte)0000, // c0
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000, // d0
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000, // e0
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0274,
};
private static byte[] table_greek = {
(byte)0101, (byte)0102, (byte)0107,
(byte)0104, (byte)0105, (byte)0132, (byte)0110, // 90
(byte)0121, (byte)0111, (byte)0113, (byte)0114,
(byte)0115, (byte)0116, (byte)0130, (byte)0117,
(byte)0120, (byte)0122, (byte)0000, (byte)0123,
(byte)0124, (byte)0125, (byte)0106, (byte)0103, // a0
(byte)0131, (byte)0127, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0141, (byte)0142, (byte)0147,
(byte)0144, (byte)0145, (byte)0172, (byte)0150, // b0
(byte)0161, (byte)0151, (byte)0153, (byte)0154,
(byte)0155, (byte)0156, (byte)0170, (byte)0157,
(byte)0160, (byte)0162, (byte)0126, (byte)0163,
(byte)0164, (byte)0165, (byte)0146, (byte)0143, // c0
(byte)0171, (byte)0167, (byte)0000, (byte)0000,
(byte)0000, (byte)0000, (byte)0000, (byte)0000,
(byte)0000, (byte)0112, (byte)0241, (byte)0000,
(byte)0000, (byte)0152, (byte)0166, // d0
};
/* The default implementation creates a decoder and we don't have one */
public boolean isLegalReplacement(byte[] repl) {
return true;
}
}
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.event.WindowEvent;
import java.awt.Window;
public class TimedWindowEvent extends WindowEvent {
private long time;
public long getWhen() {
return time;
}
public TimedWindowEvent(Window source, int id, Window opposite, long time) {
super(source, id, opposite);
this.time = time;
}
public TimedWindowEvent(Window source, int id, Window opposite,
int oldState, int newState, long time)
{
super(source, id, opposite, oldState, newState);
this.time = time;
}
}

View File

@@ -0,0 +1,91 @@
/*
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* An EventQueue subclass which adds selective tracing of events as they
* are posted to an EventQueue. Tracing is globally enabled and disabled
* by the AWT.TraceEventPosting property in awt.properties. <P>
*
* The optional AWT.NoTraceIDs property defines a list of AWTEvent IDs
* which should not be traced, such as MouseEvent.MOUSE_MOVED or PaintEvents.
* This list is declared by specifying the decimal value of each event's ID,
* separated by commas.
*
* @author Thomas Ball
*/
package sun.awt;
import java.awt.EventQueue;
import java.awt.AWTEvent;
import java.awt.Toolkit;
import java.util.StringTokenizer;
public class TracedEventQueue extends EventQueue {
// Determines whether any event tracing is enabled.
static boolean trace = false;
// The list of event IDs to ignore when tracing.
static int suppressedIDs[] = null;
static {
String s = Toolkit.getProperty("AWT.IgnoreEventIDs", "");
if (s.length() > 0) {
StringTokenizer st = new StringTokenizer(s, ",");
int nIDs = st.countTokens();
suppressedIDs = new int[nIDs];
for (int i = 0; i < nIDs; i++) {
String idString = st.nextToken();
try {
suppressedIDs[i] = Integer.parseInt(idString);
} catch (NumberFormatException e) {
System.err.println("Bad ID listed in AWT.IgnoreEventIDs " +
"in awt.properties: \"" +
idString + "\" -- skipped");
suppressedIDs[i] = 0;
}
}
} else {
suppressedIDs = new int[0];
}
}
public void postEvent(AWTEvent theEvent) {
boolean printEvent = true;
int id = theEvent.getID();
for (int i = 0; i < suppressedIDs.length; i++) {
if (id == suppressedIDs[i]) {
printEvent = false;
break;
}
}
if (printEvent) {
System.out.println(Thread.currentThread().getName() +
": " + theEvent);
}
super.postEvent(theEvent);
}
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.awt.AWTEvent;
import java.awt.Component;
/**
* Sent when one of the following events occur on the grabbed window: <ul>
* <li> it looses focus, but not to one of the owned windows
* <li> mouse click on the outside area happens (except for one of the owned windows)
* <li> switch to another application or desktop happens
* <li> click in the non-client area of the owning window or this window happens
* </ul>
*
* <p>Notice that this event is not generated on mouse click inside of the window area.
* <p>To listen for this event, install AWTEventListener with {@value sun.awt.SunToolkit#GRAB_EVENT_MASK}
*/
@SuppressWarnings("serial")
public class UngrabEvent extends AWTEvent {
private final static int UNGRAB_EVENT_ID = 1998;
public UngrabEvent(Component source) {
super(source, UNGRAB_EVENT_ID);
}
public String toString() {
return "sun.awt.UngrabEvent[" + getSource() + "]";
}
}

Some files were not shown because too many files have changed in this diff Show More