提交 747aa491 编写于 作者: L lana

Merge

......@@ -429,7 +429,7 @@ ifeq ($(USE_EXTERNAL_LIBZ), true)
UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
UNPACKEXE_ZIPOBJS := -lz
else
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
......
......@@ -1242,7 +1242,7 @@ ifndef BUILD_HEADLESS_ONLY
LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
ifneq ($(USE_EXTERNAL_LIBZ), true)
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
endif
......
......@@ -230,9 +230,9 @@ $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
BUILD_LIBZIP_EXCLUDES :=
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
LIBZIP_EXCLUDES += zlib-1.2.5
LIBZIP_EXCLUDES += zlib-1.2.8
else
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
endif
BUILD_LIBZIP_REORDER :=
......@@ -384,7 +384,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
BUILD_LIBJLI_FILES += \
inflate.c \
......
......@@ -155,6 +155,7 @@ SUNWprivate_1.1 {
g_CMpDataID;
colorValueID;
mul8table;
div8table;
jvm;
# ProcessPath entry points and data
......
......@@ -359,7 +359,57 @@ int NET_Accept(int s, struct sockaddr *addr, int *addrlen) {
}
int NET_Connect(int s, struct sockaddr *addr, int addrlen) {
BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen) );
int crc = -1, prc = -1;
threadEntry_t self;
fdEntry_t* fdEntry = getFdEntry(s);
if (fdEntry == NULL) {
errno = EBADF;
return -1;
}
/* On AIX, when the system call connect() is interrupted, the connection
* is not aborted and it will be established asynchronously by the kernel.
* Hence, no need to restart connect() when EINTR is received
*/
startOp(fdEntry, &self);
crc = connect(s, addr, addrlen);
endOp(fdEntry, &self);
if (crc == -1 && errno == EINTR) {
struct pollfd s_pollfd;
int sockopt_arg = 0;
socklen_t len;
s_pollfd.fd = s;
s_pollfd.events = POLLOUT | POLLERR;
/* poll the file descriptor */
do {
startOp(fdEntry, &self);
prc = poll(&s_pollfd, 1, -1);
endOp(fdEntry, &self);
} while (prc == -1 && errno == EINTR);
if (prc < 0)
return prc;
len = sizeof(sockopt_arg);
/* Check whether the connection has been established */
if (getsockopt(s, SOL_SOCKET, SO_ERROR, &sockopt_arg, &len) == -1)
return -1;
if (sockopt_arg != 0 ) {
errno = sockopt_arg;
return -1;
}
} else {
return crc;
}
/* At this point, fd is connected. Set successful return code */
return 0;
}
#ifndef USE_SELECT
......
此差异已折叠。
此差异已折叠。
'\" t
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
.\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
......@@ -21,14 +21,16 @@
.\" or visit www.oracle.com if you need additional information or have any
.\" questions.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" Title: javap
.\" Language: English
.\" Date: 8 August 2014
.\" SectDesc: Basic Tools
.\" Title: javap.1
.\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-03
.\"
.if n .pl 99999
.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
.TH "javap" "1" "8 August 2014" "JDK 8" "Basic Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
......@@ -48,395 +50,342 @@
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
.SH "NAME"
javap \- Disassembles one or more class files\&.
.SH SYNOPSIS
.SH "SYNOPSIS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
.fi
.sp
.TP
.if n \{\
.RE
.\}
.PP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
.RS 4
The command\-line options\&. See Options\&.
.RE
.PP
\fIclassfile\fR
One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
.SH DESCRIPTION
The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
.SH OPTIONS
.TP
-help, --help, -?
.RS 4
One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as
\fBfile:///home/user/myproject/src/DocFooter\&.class\fR\&.
.RE
.SH "DESCRIPTION"
.PP
The
\fBjavap\fR
command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the
\fBjavap\fR
command prints the package, protected and public fields, and methods of the classes passed to it\&. The
\fBjavap\fR
command prints its output to
\fBstdout\fR\&.
.SH "OPTIONS"
.PP
\-help
.br
Prints a help message for the \f3javap\fR command\&.
.TP
-version
\-\-help
.br
\-?
.RS 4
Prints a help message for the
\fBjavap\fR
command\&.
.RE
.PP
\-version
.RS 4
Prints release information\&.
.TP
-l
.br
.RE
.PP
\-l
.RS 4
Prints line and local variable tables\&.
.TP
-public
.br
.RE
.PP
\-public
.RS 4
Shows only public classes and members\&.
.TP
-protected
.br
.RE
.PP
\-protected
.RS 4
Shows only protected and public classes and members\&.
.TP
-private, -p
.RE
.PP
\-private
.br
\-p
.RS 4
Shows all classes and members\&.
.TP
-J\fIoption\fR
.br
.RE
.PP
\-J\fIoption\fR
.RS 4
Passes the specified option to the JVM\&. For example:
.sp
.if n \{\
.RS 4
.\}
.nf
\f3javap \-J\-version\fP
.fi
.nf
\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
.fi
.nf
\f3\fP
.fi
.sp
\fBjavap \-J\-version\fR
\fBjavap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fR
For more information about JVM options, see the \f3java(1)\fR command documentation\&.
.TP
-s
.br
.fi
.if n \{\
.RE
.\}
For more information about JVM options, see the command documentation\&.
.RE
.PP
\-s
.RS 4
Prints internal type signatures\&.
.TP
-sysinfo
.br
.RE
.PP
\-sysinfo
.RS 4
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
.TP
-constants
.br
Shows \f3static final\fR constants\&.
.TP
-c
.br
.RE
.PP
\-constants
.RS 4
Shows
\fBstatic final\fR
constants\&.
.RE
.PP
\-c
.RS 4
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
.TP
-verbose
.br
.RE
.PP
\-verbose
.RS 4
Prints stack size, number of locals and arguments for methods\&.
.TP
-classpath \fIpath\fR
.br
Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
.TP
-bootclasspath \fIpath\fR
.br
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
.TP
-extdir \fIdirs\fR
.br
Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
.SH EXAMPLE
Compile the following \f3DocFooter\fR class:
.RE
.PP
\-classpath \fIpath\fR
.RS 4
Specifies the path the
\fBjavap\fR
command uses to look up classes\&. Overrides the default or the
\fBCLASSPATH\fR
environment variable when it is set\&.
.RE
.PP
\-bootclasspath \fIpath\fR
.RS 4
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in
\fBjre/lib/rt\&.jar\fR
and several other JAR files\&.
.RE
.PP
\-extdir \fIdirs\fR
.RS 4
Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of
\fBjava\&.ext\&.dirs\fR\&.
.RE
.SH "EXAMPLE"
.PP
Compile the following
\fBDocFooter\fR
class:
.sp
.nf
\f3import java\&.awt\&.*;\fP
.fi
.nf
\f3import java\&.applet\&.*;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3public class DocFooter extends Applet {\fP
.fi
.nf
\f3 String date;\fP
.fi
.nf
\f3 String email;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void init() {\fP
.fi
.nf
\f3 resize(500,100);\fP
.fi
.nf
\f3 date = getParameter("LAST_UPDATED");\fP
.fi
.nf
\f3 email = getParameter("EMAIL");\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void paint(Graphics g) {\fP
.fi
.nf
\f3 g\&.drawString(date + " by ",100, 15);\fP
.fi
.nf
\f3 g\&.drawString(email,290,15);\fP
.fi
.nf
\f3 }\fP
.if n \{\
.RS 4
.\}
.nf
\fBimport java\&.awt\&.*;\fR
\fBimport java\&.applet\&.*;\fR
\fB \fR
\fBpublic class DocFooter extends Applet {\fR
\fB String date;\fR
\fB String email;\fR
\fB \fR
\fB public void init() {\fR
\fB resize(500,100);\fR
\fB date = getParameter("LAST_UPDATED");\fR
\fB email = getParameter("EMAIL");\fR
\fB }\fR
\fB \fR
\fB public void paint(Graphics g) {\fR
\fB g\&.drawString(date + " by ",100, 15);\fR
\fB g\&.drawString(email,290,15);\fR
\fB }\fR
\fB}\fR
.fi
.nf
\f3}\fP
.if n \{\
.RE
.\}
.PP
The output from the
\fBjavap DocFooter\&.class\fR
command yields the following:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBCompiled from "DocFooter\&.java"\fR
\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
\fB java\&.lang\&.String date;\fR
\fB java\&.lang\&.String email;\fR
\fB public DocFooter();\fR
\fB public void init();\fR
\fB public void paint(java\&.awt\&.Graphics);\fR
\fB}\fR
.fi
.nf
\f3\fP
.if n \{\
.RE
.\}
.PP
The output from
\fBjavap \-c DocFooter\&.class\fR
command yields the following:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBCompiled from "DocFooter\&.java"\fR
\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
\fB java\&.lang\&.String date;\fR
\fB java\&.lang\&.String email;\fR
\fB public DocFooter();\fR
\fB Code:\fR
\fB 0: aload_0 \fR
\fB 1: invokespecial #1 // Method\fR
\fBjava/applet/Applet\&."<init>":()V\fR
\fB 4: return \fR
\fB public void init();\fR
\fB Code:\fR
\fB 0: aload_0 \fR
\fB 1: sipush 500\fR
\fB 4: bipush 100\fR
\fB 6: invokevirtual #2 // Method resize:(II)V\fR
\fB 9: aload_0 \fR
\fB 10: aload_0 \fR
\fB 11: ldc #3 // String LAST_UPDATED\fR
\fB 13: invokevirtual #4 // Method\fR
\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
\fB 16: putfield #5 // Field date:Ljava/lang/String;\fR
\fB 19: aload_0 \fR
\fB 20: aload_0 \fR
\fB 21: ldc #6 // String EMAIL\fR
\fB 23: invokevirtual #4 // Method\fR
\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
\fB 26: putfield #7 // Field email:Ljava/lang/String;\fR
\fB 29: return \fR
\fB public void paint(java\&.awt\&.Graphics);\fR
\fB Code:\fR
\fB 0: aload_1 \fR
\fB 1: new #8 // class java/lang/StringBuilder\fR
\fB 4: dup \fR
\fB 5: invokespecial #9 // Method\fR
\fB java/lang/StringBuilder\&."<init>":()V\fR
\fB 8: aload_0 \fR
\fB 9: getfield #5 // Field date:Ljava/lang/String;\fR
\fB 12: invokevirtual #10 // Method\fR
\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
\fB 15: ldc #11 // String by \fR
\fB 17: invokevirtual #10 // Method\fR
\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
\fB 20: invokevirtual #12 // Method\fR
\fB java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fR
\fB 23: bipush 100\fR
\fB 25: bipush 15\fR
\fB 27: invokevirtual #13 // Method\fR
\fB java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
\fB 30: aload_1 \fR
\fB 31: aload_0 \fR
\fB 32: getfield #7 // Field email:Ljava/lang/String;\fR
\fB 35: sipush 290\fR
\fB 38: bipush 15\fR
\fB 40: invokevirtual #13 // Method\fR
\fBjava/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
\fB 43: return \fR
\fB}\fR
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.sp
The output from the \f3javap DocFooter\&.class\fR command yields the following:
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
java(1)
.RE
.sp
.nf
\f3Compiled from "DocFooter\&.java"\fP
.fi
.nf
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
.fi
.nf
\f3 java\&.lang\&.String date;\fP
.fi
.nf
\f3 java\&.lang\&.String email;\fP
.fi
.nf
\f3 public DocFooter();\fP
.fi
.nf
\f3 public void init();\fP
.fi
.nf
\f3 public void paint(java\&.awt\&.Graphics);\fP
.fi
.nf
\f3}\fP
.fi
.nf
\f3\fP
.fi
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
javac(1)
.RE
.sp
The output from \f3javap -c DocFooter\&.class\fR command yields the following:
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
javadoc(1)
.RE
.sp
.nf
\f3Compiled from "DocFooter\&.java"\fP
.fi
.nf
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
.fi
.nf
\f3 java\&.lang\&.String date;\fP
.fi
.nf
\f3 java\&.lang\&.String email;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public DocFooter();\fP
.fi
.nf
\f3 Code:\fP
.fi
.nf
\f3 0: aload_0 \fP
.fi
.nf
\f3 1: invokespecial #1 // Method\fP
.fi
.nf
\f3java/applet/Applet\&."<init>":()V\fP
.fi
.nf
\f3 4: return \fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void init();\fP
.fi
.nf
\f3 Code:\fP
.fi
.nf
\f3 0: aload_0 \fP
.fi
.nf
\f3 1: sipush 500\fP
.fi
.nf
\f3 4: bipush 100\fP
.fi
.nf
\f3 6: invokevirtual #2 // Method resize:(II)V\fP
.fi
.nf
\f3 9: aload_0 \fP
.fi
.nf
\f3 10: aload_0 \fP
.fi
.nf
\f3 11: ldc #3 // String LAST_UPDATED\fP
.fi
.nf
\f3 13: invokevirtual #4 // Method\fP
.fi
.nf
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
.fi
.nf
\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
.fi
.nf
\f3 19: aload_0 \fP
.fi
.nf
\f3 20: aload_0 \fP
.fi
.nf
\f3 21: ldc #6 // String EMAIL\fP
.fi
.nf
\f3 23: invokevirtual #4 // Method\fP
.fi
.nf
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
.fi
.nf
\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
.fi
.nf
\f3 29: return \fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void paint(java\&.awt\&.Graphics);\fP
.fi
.nf
\f3 Code:\fP
.fi
.nf
\f3 0: aload_1 \fP
.fi
.nf
\f3 1: new #8 // class java/lang/StringBuilder\fP
.fi
.nf
\f3 4: dup \fP
.fi
.nf
\f3 5: invokespecial #9 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&."<init>":()V\fP
.fi
.nf
\f3 8: aload_0 \fP
.fi
.nf
\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
.fi
.nf
\f3 12: invokevirtual #10 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
.fi
.nf
\f3 15: ldc #11 // String by \fP
.fi
.nf
\f3 17: invokevirtual #10 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
.fi
.nf
\f3 20: invokevirtual #12 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
.fi
.nf
\f3 23: bipush 100\fP
.fi
.nf
\f3 25: bipush 15\fP
.fi
.nf
\f3 27: invokevirtual #13 // Method\fP
.fi
.nf
\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
.fi
.nf
\f3 30: aload_1 \fP
.fi
.nf
\f3 31: aload_0 \fP
.fi
.nf
\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
.fi
.nf
\f3 35: sipush 290\fP
.fi
.nf
\f3 38: bipush 15\fP
.fi
.nf
\f3 40: invokevirtual #13 // Method\fP
.fi
.nf
\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
.fi
.nf
\f3 43: return \fP
.fi
.nf
\f3}\fP
.fi
.nf
\f3\fP
.fi
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
javah(1)
.RE
.sp
.SH SEE\ ALSO
.TP 0.2i
\(bu
javac(1)
.TP 0.2i
\(bu
java(1)
.TP 0.2i
\(bu
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jdb(1)
.TP 0.2i
\(bu
javah(1)
.TP 0.2i
\(bu
javadoc(1)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jdeps(1)
.RE
.br
'pl 8.5i
......
此差异已折叠。
此差异已折叠。
'\" t
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
.\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
......@@ -21,14 +21,16 @@
.\" or visit www.oracle.com if you need additional information or have any
.\" questions.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" Title: javap
.\" Language: English
.\" Date: 8 August 2014
.\" SectDesc: Basic Tools
.\" Title: javap.1
.\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-03
.\"
.if n .pl 99999
.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
.TH "javap" "1" "8 August 2014" "JDK 8" "Basic Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
......@@ -48,395 +50,342 @@
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
.SH "NAME"
javap \- Disassembles one or more class files\&.
.SH SYNOPSIS
.SH "SYNOPSIS"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
.fi
.sp
.TP
.if n \{\
.RE
.\}
.PP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
.RS 4
The command\-line options\&. See Options\&.
.RE
.PP
\fIclassfile\fR
One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
.SH DESCRIPTION
The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
.SH OPTIONS
.TP
-help, --help, -?
.RS 4
One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as
\fBfile:///home/user/myproject/src/DocFooter\&.class\fR\&.
.RE
.SH "DESCRIPTION"
.PP
The
\fBjavap\fR
command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the
\fBjavap\fR
command prints the package, protected and public fields, and methods of the classes passed to it\&. The
\fBjavap\fR
command prints its output to
\fBstdout\fR\&.
.SH "OPTIONS"
.PP
\-help
.br
Prints a help message for the \f3javap\fR command\&.
.TP
-version
\-\-help
.br
\-?
.RS 4
Prints a help message for the
\fBjavap\fR
command\&.
.RE
.PP
\-version
.RS 4
Prints release information\&.
.TP
-l
.br
.RE
.PP
\-l
.RS 4
Prints line and local variable tables\&.
.TP
-public
.br
.RE
.PP
\-public
.RS 4
Shows only public classes and members\&.
.TP
-protected
.br
.RE
.PP
\-protected
.RS 4
Shows only protected and public classes and members\&.
.TP
-private, -p
.RE
.PP
\-private
.br
\-p
.RS 4
Shows all classes and members\&.
.TP
-J\fIoption\fR
.br
.RE
.PP
\-J\fIoption\fR
.RS 4
Passes the specified option to the JVM\&. For example:
.sp
.if n \{\
.RS 4
.\}
.nf
\f3javap \-J\-version\fP
.fi
.nf
\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
.fi
.nf
\f3\fP
.fi
.sp
\fBjavap \-J\-version\fR
\fBjavap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fR
For more information about JVM options, see the \f3java(1)\fR command documentation\&.
.TP
-s
.br
.fi
.if n \{\
.RE
.\}
For more information about JVM options, see the command documentation\&.
.RE
.PP
\-s
.RS 4
Prints internal type signatures\&.
.TP
-sysinfo
.br
.RE
.PP
\-sysinfo
.RS 4
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
.TP
-constants
.br
Shows \f3static final\fR constants\&.
.TP
-c
.br
.RE
.PP
\-constants
.RS 4
Shows
\fBstatic final\fR
constants\&.
.RE
.PP
\-c
.RS 4
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
.TP
-verbose
.br
.RE
.PP
\-verbose
.RS 4
Prints stack size, number of locals and arguments for methods\&.
.TP
-classpath \fIpath\fR
.br
Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
.TP
-bootclasspath \fIpath\fR
.br
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
.TP
-extdir \fIdirs\fR
.br
Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
.SH EXAMPLE
Compile the following \f3DocFooter\fR class:
.RE
.PP
\-classpath \fIpath\fR
.RS 4
Specifies the path the
\fBjavap\fR
command uses to look up classes\&. Overrides the default or the
\fBCLASSPATH\fR
environment variable when it is set\&.
.RE
.PP
\-bootclasspath \fIpath\fR
.RS 4
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in
\fBjre/lib/rt\&.jar\fR
and several other JAR files\&.
.RE
.PP
\-extdir \fIdirs\fR
.RS 4
Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of
\fBjava\&.ext\&.dirs\fR\&.
.RE
.SH "EXAMPLE"
.PP
Compile the following
\fBDocFooter\fR
class:
.sp
.nf
\f3import java\&.awt\&.*;\fP
.fi
.nf
\f3import java\&.applet\&.*;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3public class DocFooter extends Applet {\fP
.fi
.nf
\f3 String date;\fP
.fi
.nf
\f3 String email;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void init() {\fP
.fi
.nf
\f3 resize(500,100);\fP
.fi
.nf
\f3 date = getParameter("LAST_UPDATED");\fP
.fi
.nf
\f3 email = getParameter("EMAIL");\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void paint(Graphics g) {\fP
.fi
.nf
\f3 g\&.drawString(date + " by ",100, 15);\fP
.fi
.nf
\f3 g\&.drawString(email,290,15);\fP
.fi
.nf
\f3 }\fP
.if n \{\
.RS 4
.\}
.nf
\fBimport java\&.awt\&.*;\fR
\fBimport java\&.applet\&.*;\fR
\fB \fR
\fBpublic class DocFooter extends Applet {\fR
\fB String date;\fR
\fB String email;\fR
\fB \fR
\fB public void init() {\fR
\fB resize(500,100);\fR
\fB date = getParameter("LAST_UPDATED");\fR
\fB email = getParameter("EMAIL");\fR
\fB }\fR
\fB \fR
\fB public void paint(Graphics g) {\fR
\fB g\&.drawString(date + " by ",100, 15);\fR
\fB g\&.drawString(email,290,15);\fR
\fB }\fR
\fB}\fR
.fi
.nf
\f3}\fP
.if n \{\
.RE
.\}
.PP
The output from the
\fBjavap DocFooter\&.class\fR
command yields the following:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBCompiled from "DocFooter\&.java"\fR
\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
\fB java\&.lang\&.String date;\fR
\fB java\&.lang\&.String email;\fR
\fB public DocFooter();\fR
\fB public void init();\fR
\fB public void paint(java\&.awt\&.Graphics);\fR
\fB}\fR
.fi
.nf
\f3\fP
.if n \{\
.RE
.\}
.PP
The output from
\fBjavap \-c DocFooter\&.class\fR
command yields the following:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBCompiled from "DocFooter\&.java"\fR
\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
\fB java\&.lang\&.String date;\fR
\fB java\&.lang\&.String email;\fR
\fB public DocFooter();\fR
\fB Code:\fR
\fB 0: aload_0 \fR
\fB 1: invokespecial #1 // Method\fR
\fBjava/applet/Applet\&."<init>":()V\fR
\fB 4: return \fR
\fB public void init();\fR
\fB Code:\fR
\fB 0: aload_0 \fR
\fB 1: sipush 500\fR
\fB 4: bipush 100\fR
\fB 6: invokevirtual #2 // Method resize:(II)V\fR
\fB 9: aload_0 \fR
\fB 10: aload_0 \fR
\fB 11: ldc #3 // String LAST_UPDATED\fR
\fB 13: invokevirtual #4 // Method\fR
\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
\fB 16: putfield #5 // Field date:Ljava/lang/String;\fR
\fB 19: aload_0 \fR
\fB 20: aload_0 \fR
\fB 21: ldc #6 // String EMAIL\fR
\fB 23: invokevirtual #4 // Method\fR
\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
\fB 26: putfield #7 // Field email:Ljava/lang/String;\fR
\fB 29: return \fR
\fB public void paint(java\&.awt\&.Graphics);\fR
\fB Code:\fR
\fB 0: aload_1 \fR
\fB 1: new #8 // class java/lang/StringBuilder\fR
\fB 4: dup \fR
\fB 5: invokespecial #9 // Method\fR
\fB java/lang/StringBuilder\&."<init>":()V\fR
\fB 8: aload_0 \fR
\fB 9: getfield #5 // Field date:Ljava/lang/String;\fR
\fB 12: invokevirtual #10 // Method\fR
\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
\fB 15: ldc #11 // String by \fR
\fB 17: invokevirtual #10 // Method\fR
\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
\fB 20: invokevirtual #12 // Method\fR
\fB java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fR
\fB 23: bipush 100\fR
\fB 25: bipush 15\fR
\fB 27: invokevirtual #13 // Method\fR
\fB java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
\fB 30: aload_1 \fR
\fB 31: aload_0 \fR
\fB 32: getfield #7 // Field email:Ljava/lang/String;\fR
\fB 35: sipush 290\fR
\fB 38: bipush 15\fR
\fB 40: invokevirtual #13 // Method\fR
\fBjava/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
\fB 43: return \fR
\fB}\fR
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.sp
The output from the \f3javap DocFooter\&.class\fR command yields the following:
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
java(1)
.RE
.sp
.nf
\f3Compiled from "DocFooter\&.java"\fP
.fi
.nf
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
.fi
.nf
\f3 java\&.lang\&.String date;\fP
.fi
.nf
\f3 java\&.lang\&.String email;\fP
.fi
.nf
\f3 public DocFooter();\fP
.fi
.nf
\f3 public void init();\fP
.fi
.nf
\f3 public void paint(java\&.awt\&.Graphics);\fP
.fi
.nf
\f3}\fP
.fi
.nf
\f3\fP
.fi
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
javac(1)
.RE
.sp
The output from \f3javap -c DocFooter\&.class\fR command yields the following:
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
javadoc(1)
.RE
.sp
.nf
\f3Compiled from "DocFooter\&.java"\fP
.fi
.nf
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
.fi
.nf
\f3 java\&.lang\&.String date;\fP
.fi
.nf
\f3 java\&.lang\&.String email;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public DocFooter();\fP
.fi
.nf
\f3 Code:\fP
.fi
.nf
\f3 0: aload_0 \fP
.fi
.nf
\f3 1: invokespecial #1 // Method\fP
.fi
.nf
\f3java/applet/Applet\&."<init>":()V\fP
.fi
.nf
\f3 4: return \fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void init();\fP
.fi
.nf
\f3 Code:\fP
.fi
.nf
\f3 0: aload_0 \fP
.fi
.nf
\f3 1: sipush 500\fP
.fi
.nf
\f3 4: bipush 100\fP
.fi
.nf
\f3 6: invokevirtual #2 // Method resize:(II)V\fP
.fi
.nf
\f3 9: aload_0 \fP
.fi
.nf
\f3 10: aload_0 \fP
.fi
.nf
\f3 11: ldc #3 // String LAST_UPDATED\fP
.fi
.nf
\f3 13: invokevirtual #4 // Method\fP
.fi
.nf
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
.fi
.nf
\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
.fi
.nf
\f3 19: aload_0 \fP
.fi
.nf
\f3 20: aload_0 \fP
.fi
.nf
\f3 21: ldc #6 // String EMAIL\fP
.fi
.nf
\f3 23: invokevirtual #4 // Method\fP
.fi
.nf
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
.fi
.nf
\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
.fi
.nf
\f3 29: return \fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public void paint(java\&.awt\&.Graphics);\fP
.fi
.nf
\f3 Code:\fP
.fi
.nf
\f3 0: aload_1 \fP
.fi
.nf
\f3 1: new #8 // class java/lang/StringBuilder\fP
.fi
.nf
\f3 4: dup \fP
.fi
.nf
\f3 5: invokespecial #9 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&."<init>":()V\fP
.fi
.nf
\f3 8: aload_0 \fP
.fi
.nf
\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
.fi
.nf
\f3 12: invokevirtual #10 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
.fi
.nf
\f3 15: ldc #11 // String by \fP
.fi
.nf
\f3 17: invokevirtual #10 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
.fi
.nf
\f3 20: invokevirtual #12 // Method\fP
.fi
.nf
\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
.fi
.nf
\f3 23: bipush 100\fP
.fi
.nf
\f3 25: bipush 15\fP
.fi
.nf
\f3 27: invokevirtual #13 // Method\fP
.fi
.nf
\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
.fi
.nf
\f3 30: aload_1 \fP
.fi
.nf
\f3 31: aload_0 \fP
.fi
.nf
\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
.fi
.nf
\f3 35: sipush 290\fP
.fi
.nf
\f3 38: bipush 15\fP
.fi
.nf
\f3 40: invokevirtual #13 // Method\fP
.fi
.nf
\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
.fi
.nf
\f3 43: return \fP
.fi
.nf
\f3}\fP
.fi
.nf
\f3\fP
.fi
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
javah(1)
.RE
.sp
.SH SEE\ ALSO
.TP 0.2i
\(bu
javac(1)
.TP 0.2i
\(bu
java(1)
.TP 0.2i
\(bu
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jdb(1)
.TP 0.2i
\(bu
javah(1)
.TP 0.2i
\(bu
javadoc(1)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jdeps(1)
.RE
.br
'pl 8.5i
......
......@@ -120,6 +120,10 @@ class AquaComboBoxPopup extends BasicComboPopup {
public void show() {
final int startItemCount = comboBox.getItemCount();
if (startItemCount == 0) {
return;
}
final Rectangle popupBounds = adjustPopupAndGetBounds();
if (popupBounds == null) return; // null means don't show
......
......@@ -171,7 +171,9 @@ final class LWChoicePeer extends LWComponentPeer<Choice, JComboBox<String>>
SwingUtilities.invokeLater(() -> {
JPopupMenu popupMenu = getPopupMenu();
// Need to override the invoker for proper grab handling
if (popupMenu != null && popupMenu.getInvoker() != getTarget()) {
if (popupMenu != null
&& popupMenu.isShowing()
&& popupMenu.getInvoker() != getTarget()) {
// The popup is now visible with correct location
// Save it and restore after toggling visibility and changing invoker
Point loc = popupMenu.getLocationOnScreen();
......
......@@ -319,6 +319,8 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
* subclasses to initialize specific peers properties.
*/
void initializeImpl() {
// note that these methods can be overridden by the user and
// can return some strange values like null.
setBackground(target.getBackground());
setForeground(target.getForeground());
setFont(target.getFont());
......
......@@ -443,6 +443,12 @@ public class LWWindowPeer
getPlatformWindow().updateIconImages();
}
@Override
public void setBackground(final Color c) {
super.setBackground(c);
updateOpaque();
}
@Override
public void setOpacity(float opacity) {
getPlatformWindow().setOpacity(opacity);
......
......@@ -96,7 +96,8 @@ public class CEmbeddedFrame extends EmbeddedFrame {
public void handleKeyEvent(int eventType, int modifierFlags, String characters,
String charsIgnoringMods, boolean isRepeat, short keyCode,
boolean needsKeyTyped) {
responder.handleKeyEvent(eventType, modifierFlags, charsIgnoringMods, keyCode, needsKeyTyped, isRepeat);
responder.handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods,
keyCode, needsKeyTyped, isRepeat);
}
public void handleInputEvent(String text) {
......
......@@ -29,12 +29,18 @@ import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.awt.MenuBar;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Window;
import sun.awt.CGraphicsDevice;
import sun.awt.CGraphicsEnvironment;
import sun.awt.CausedFocusEvent;
import sun.awt.LightweightFrame;
import sun.java2d.SurfaceData;
import sun.lwawt.LWLightweightFramePeer;
import sun.lwawt.LWWindowPeer;
import sun.lwawt.PlatformWindow;
......@@ -72,11 +78,6 @@ public class CPlatformLWWindow extends CPlatformWindow {
return null;
}
@Override
public GraphicsDevice getGraphicsDevice() {
return null;
}
@Override
public SurfaceData getScreenSurface() {
return null;
......@@ -199,4 +200,24 @@ public class CPlatformLWWindow extends CPlatformWindow {
public long getLayerPtr() {
return 0;
}
@Override
public GraphicsDevice getGraphicsDevice() {
CGraphicsEnvironment ge = (CGraphicsEnvironment)GraphicsEnvironment.
getLocalGraphicsEnvironment();
LWLightweightFramePeer peer = (LWLightweightFramePeer)getPeer();
int scale = ((LightweightFrame)peer.getTarget()).getScaleFactor();
Rectangle bounds = ((LightweightFrame)peer.getTarget()).getHostBounds();
for (GraphicsDevice d : ge.getScreenDevices()) {
if (d.getDefaultConfiguration().getBounds().intersects(bounds) &&
((CGraphicsDevice)d).getScaleFactor() == scale)
{
return d;
}
}
// We shouldn't be here...
return ge.getDefaultScreenDevice();
}
}
......@@ -125,7 +125,7 @@ final class CPlatformResponder {
/**
* Handles key events.
*/
void handleKeyEvent(int eventType, int modifierFlags, String chars,
void handleKeyEvent(int eventType, int modifierFlags, String chars, String charsIgnoringModifiers,
short keyCode, boolean needsKeyTyped, boolean needsKeyReleased) {
boolean isFlagsChangedEvent =
isNpapiCallback ? (eventType == CocoaConstants.NPCocoaEventFlagsChanged) :
......@@ -153,7 +153,10 @@ final class CPlatformResponder {
testChar = chars.charAt(0);
}
int[] in = new int[] {testChar, isDeadChar ? 1 : 0, modifierFlags, keyCode};
char testCharIgnoringModifiers = charsIgnoringModifiers != null && charsIgnoringModifiers.length() > 0 ?
charsIgnoringModifiers.charAt(0) : KeyEvent.CHAR_UNDEFINED;
int[] in = new int[] {testCharIgnoringModifiers, isDeadChar ? 1 : 0, modifierFlags, keyCode};
int[] out = new int[3]; // [jkeyCode, jkeyLocation, deadChar]
postsTyped = NSEvent.nsToJavaKeyInfo(in, out);
......
......@@ -200,7 +200,7 @@ public class CPlatformView extends CFRetainedResource {
}
private void deliverKeyEvent(NSEvent event) {
responder.handleKeyEvent(event.getType(), event.getModifierFlags(),
responder.handleKeyEvent(event.getType(), event.getModifierFlags(), event.getCharacters(),
event.getCharactersIgnoringModifiers(), event.getKeyCode(), true, false);
}
......
......@@ -119,6 +119,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
static final int NONACTIVATING = 1 << 24;
static final int IS_DIALOG = 1 << 25;
static final int IS_MODAL = 1 << 26;
static final int IS_POPUP = 1 << 27;
static final int _STYLE_PROP_BITMASK = DECORATED | TEXTURED | UNIFIED | UTILITY | HUD | SHEET | CLOSEABLE | MINIMIZABLE | RESIZABLE;
......@@ -318,6 +319,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
styleBits = SET(styleBits, TEXTURED, false);
// Popups in applets don't activate applet's process
styleBits = SET(styleBits, NONACTIVATING, true);
styleBits = SET(styleBits, IS_POPUP, true);
}
if (Window.Type.UTILITY.equals(target.getType())) {
......@@ -745,20 +747,22 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
@Override
public void setOpaque(boolean isOpaque) {
CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque);
boolean isTextured = (peer == null)? false : peer.isTextured();
if (!isOpaque && !isTextured) {
long clearColor = CWrapper.NSColor.clearColor();
CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), clearColor);
boolean isTextured = (peer == null) ? false : peer.isTextured();
if (!isTextured) {
if (!isOpaque) {
CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), 0);
} else if (peer != null) {
Color color = peer.getBackground();
if (color != null) {
int rgb = color.getRGB();
CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), rgb);
}
}
}
//This is a temporary workaround. Looks like after 7124236 will be fixed
//the correct place for invalidateShadow() is CGLayer.drawInCGLContext.
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
invalidateShadow();
}
});
SwingUtilities.invokeLater(this::invalidateShadow);
}
@Override
......
......@@ -61,7 +61,14 @@ final class CWrapper {
static native void setAlphaValue(long window, float alpha);
static native void setOpaque(long window, boolean opaque);
static native void setBackgroundColor(long window, long color);
/**
* Sets background color of the NSWindow.
*
* @param window the pointer of the NSWindow
* @param color the color in argb format
*/
static native void setBackgroundColor(long window, int color);
static native void miniaturize(long window);
static native void deminiaturize(long window);
......@@ -82,8 +89,4 @@ final class CWrapper {
static native void setToolTip(long view, String msg);
}
static final class NSColor {
static native long clearColor();
}
}
......@@ -47,13 +47,15 @@ final class NSEvent {
// Key event information
private short keyCode;
private String characters;
private String charactersIgnoringModifiers;
// Called from native
NSEvent(int type, int modifierFlags, short keyCode, String charactersIgnoringModifiers) {
NSEvent(int type, int modifierFlags, short keyCode, String characters, String charactersIgnoringModifiers) {
this.type = type;
this.modifierFlags = modifierFlags;
this.keyCode = keyCode;
this.characters = characters;
this.charactersIgnoringModifiers = charactersIgnoringModifiers;
}
......@@ -121,12 +123,16 @@ final class NSEvent {
return charactersIgnoringModifiers;
}
String getCharacters() {
return characters;
}
@Override
public String toString() {
return "NSEvent[" + getType() + " ," + getModifierFlags() + " ,"
+ getClickCount() + " ," + getButtonNumber() + " ," + getX() + " ,"
+ getY() + " ," + getAbsX() + " ," + getAbsY()+ " ," + getKeyCode() + " ,"
+ getCharactersIgnoringModifiers() + "]";
+ getCharacters() + " ," + getCharactersIgnoringModifiers() + "]";
}
/*
......
......@@ -367,7 +367,7 @@ AWT_ASSERT_APPKIT_THREAD;
// TODO: need consitent way for doing that both with global as well as with local coordinates.
// The reason to do it here is one more native method for getting screen dimension otherwise.
NSRect screenRect = [[NSScreen mainScreen] frame];
NSRect screenRect = [[[NSScreen screens] objectAtIndex:0] frame];
absP.y = screenRect.size.height - absP.y;
jint clickCount;
......@@ -441,17 +441,20 @@ AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnv];
jstring characters = NULL;
jstring charactersIgnoringModifiers = NULL;
if ([event type] != NSFlagsChanged) {
characters = JNFNSToJavaString(env, [event characters]);
charactersIgnoringModifiers = JNFNSToJavaString(env, [event charactersIgnoringModifiers]);
}
static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/NSEvent");
static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IISLjava/lang/String;)V");
static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IISLjava/lang/String;Ljava/lang/String;)V");
jobject jevent = JNFNewObject(env, jctor_NSEvent,
[event type],
[event modifierFlags],
[event keyCode],
characters);
characters,
charactersIgnoringModifiers);
static JNF_CLASS_CACHE(jc_PlatformView, "sun/lwawt/macosx/CPlatformView");
static JNF_MEMBER_CACHE(jm_deliverKeyEvent, jc_PlatformView,
......
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* 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
......@@ -252,6 +252,10 @@ AWT_ASSERT_APPKIT_THREAD;
self.ownerWindow = owner;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
if (IS(self.styleBits, IS_POPUP)) {
[self.nsWindow setCollectionBehavior:(1 << 8) /*NSWindowCollectionBehaviorFullScreenAuxiliary*/];
}
return self;
}
......
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
......@@ -459,10 +459,10 @@ public final class Connection implements Runnable {
// will be woken up before readTimeout only if reply is
// available
ldr.wait(readTimeout);
waited = true;
} else {
ldr.wait(15 * 1000); // 15 second timeout
}
waited = true;
} else {
break;
}
......@@ -474,7 +474,7 @@ public final class Connection implements Runnable {
}
if ((rber == null) && waited) {
removeRequest(ldr);
abandonRequest(ldr, null);
throw new NamingException("LDAP response read timed out, timeout used:"
+ readTimeout + "ms." );
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册