Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
f0fa3444
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f0fa3444
编写于
5月 11, 2012
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
f3c46a62
ed959b4b
变更
50
隐藏空白更改
内联
并排
Showing
50 changed file
with
2790 addition
and
841 deletion
+2790
-841
.hgtags
.hgtags
+2
-0
make/common/Release-macosx.gmk
make/common/Release-macosx.gmk
+4
-4
src/macosx/bin/java_md_macosx.c
src/macosx/bin/java_md_macosx.c
+46
-0
src/macosx/classes/sun/lwawt/LWTextAreaPeer.java
src/macosx/classes/sun/lwawt/LWTextAreaPeer.java
+9
-0
src/macosx/classes/sun/lwawt/LWTextComponentPeer.java
src/macosx/classes/sun/lwawt/LWTextComponentPeer.java
+4
-4
src/macosx/classes/sun/lwawt/LWTextFieldPeer.java
src/macosx/classes/sun/lwawt/LWTextFieldPeer.java
+10
-1
src/macosx/classes/sun/lwawt/LWWindowPeer.java
src/macosx/classes/sun/lwawt/LWWindowPeer.java
+31
-28
src/macosx/classes/sun/lwawt/macosx/CCursorManager.java
src/macosx/classes/sun/lwawt/macosx/CCursorManager.java
+1
-0
src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
+6
-0
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
+5
-0
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
+9
-1
src/macosx/native/sun/awt/AWTView.h
src/macosx/native/sun/awt/AWTView.h
+3
-0
src/macosx/native/sun/awt/AWTView.m
src/macosx/native/sun/awt/AWTView.m
+13
-1
src/macosx/native/sun/awt/AWTWindow.h
src/macosx/native/sun/awt/AWTWindow.h
+1
-0
src/macosx/native/sun/awt/AWTWindow.m
src/macosx/native/sun/awt/AWTWindow.m
+83
-0
src/macosx/native/sun/awt/CCursorManager.m
src/macosx/native/sun/awt/CCursorManager.m
+27
-0
src/macosx/native/sun/awt/PrinterView.m
src/macosx/native/sun/awt/PrinterView.m
+23
-0
src/share/classes/javax/swing/JComponent.java
src/share/classes/javax/swing/JComponent.java
+26
-10
src/share/classes/javax/swing/JDesktopPane.java
src/share/classes/javax/swing/JDesktopPane.java
+25
-37
src/share/classes/javax/swing/JPopupMenu.java
src/share/classes/javax/swing/JPopupMenu.java
+10
-13
src/share/classes/javax/swing/JTable.java
src/share/classes/javax/swing/JTable.java
+1
-1
src/share/classes/sun/awt/SunToolkit.java
src/share/classes/sun/awt/SunToolkit.java
+23
-1
src/share/classes/sun/print/ServiceDialog.java
src/share/classes/sun/print/ServiceDialog.java
+46
-9
src/share/classes/sun/print/resources/serviceui.properties
src/share/classes/sun/print/resources/serviceui.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_de.properties
...share/classes/sun/print/resources/serviceui_de.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_es.properties
...share/classes/sun/print/resources/serviceui_es.properties
+30
-62
src/share/classes/sun/print/resources/serviceui_fr.properties
...share/classes/sun/print/resources/serviceui_fr.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_it.properties
...share/classes/sun/print/resources/serviceui_it.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_ja.properties
...share/classes/sun/print/resources/serviceui_ja.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_ko.properties
...share/classes/sun/print/resources/serviceui_ko.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_pt_BR.properties
...re/classes/sun/print/resources/serviceui_pt_BR.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_sv.properties
...share/classes/sun/print/resources/serviceui_sv.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_zh_CN.properties
...re/classes/sun/print/resources/serviceui_zh_CN.properties
+32
-64
src/share/classes/sun/print/resources/serviceui_zh_TW.properties
...re/classes/sun/print/resources/serviceui_zh_TW.properties
+32
-64
src/share/classes/sun/util/logging/PlatformLogger.java
src/share/classes/sun/util/logging/PlatformLogger.java
+3
-0
src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
+5
-2
src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
+1
-25
test/java/awt/Frame/FrameStateTest/FrameStateTest.html
test/java/awt/Frame/FrameStateTest/FrameStateTest.html
+50
-0
test/java/awt/Frame/FrameStateTest/FrameStateTest.java
test/java/awt/Frame/FrameStateTest/FrameStateTest.java
+459
-0
test/java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java
...a/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java
+267
-0
test/java/awt/Mouse/EnterExitEvents/DragWindowTest.java
test/java/awt/Mouse/EnterExitEvents/DragWindowTest.java
+219
-0
test/java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java
test/java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java
+232
-0
test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java
.../awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java
+113
-0
test/java/awt/regtesthelpers/Util.java
test/java/awt/regtesthelpers/Util.java
+30
-0
test/javax/swing/JComponent/7154030/bug7154030.java
test/javax/swing/JComponent/7154030/bug7154030.java
+169
-0
test/javax/swing/JTable/7055065/bug7055065.java
test/javax/swing/JTable/7055065/bug7055065.java
+178
-0
test/javax/swing/JTree/4908142/bug4908142.java
test/javax/swing/JTree/4908142/bug4908142.java
+111
-0
test/tools/launcher/EnvironmentVariables.java
test/tools/launcher/EnvironmentVariables.java
+79
-0
test/tools/launcher/TestHelper.java
test/tools/launcher/TestHelper.java
+12
-2
test/tools/launcher/TestSpecialArgs.java
test/tools/launcher/TestSpecialArgs.java
+104
-0
未找到文件。
.hgtags
浏览文件 @
f0fa3444
...
...
@@ -158,3 +158,5 @@ ddfe5562f61f54ed2121ac0c73b688b94f3e66b5 jdk8-b32
29b680393f33bf953688c17d93aca7a870ca4024 jdk8-b34
2e3e1356ffbddb2ae95c08da72830ba9ab8b3181 jdk8-b35
45da9cb055ee258dc09e69c1718e27eadea38e45 jdk8-b36
9e82ac15ab80370d6e021aea7b98c7c9626adb5e jdk8-b37
c45f3509a70796c54b48f32910d1caf435763416 jdk8-b38
make/common/Release-macosx.gmk
浏览文件 @
f0fa3444
...
...
@@ -29,14 +29,14 @@ JA_DIRNAME=ja_JP.UTF-8
# Defines the release targets for Mac OS X build products
JDK_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2sdk-bundle/
$(THIS_
JDK_VERSION).jdk/Contents
JRE_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2re-bundle/
$(THIS_
JDK_VERSION).jre/Contents
JDK_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2sdk-bundle/
jdk$(
JDK_VERSION).jdk/Contents
JRE_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2re-bundle/
jre$(
JDK_VERSION).jre/Contents
MACOSX_SRC = $(JDK_TOPDIR)/src/macosx
BUNDLE_ID ?= net.java.openjdk
BUN
LD
E_ID_JRE ?= $(BUNDLE_ID).jre
BUN
LD
E_ID_JDK ?= $(BUNDLE_ID).jdk
BUN
DL
E_ID_JRE ?= $(BUNDLE_ID).jre
BUN
DL
E_ID_JDK ?= $(BUNDLE_ID).jdk
BUNDLE_NAME ?= OpenJDK $(JDK_MINOR_VERSION)
BUNDLE_NAME_JRE ?= $(BUNDLE_NAME)
...
...
src/macosx/bin/java_md_macosx.c
浏览文件 @
f0fa3444
...
...
@@ -906,11 +906,41 @@ SetXDockArgForAWT(const char *arg)
{
char
envVar
[
80
];
if
(
strstr
(
arg
,
"-Xdock:name="
)
==
arg
)
{
/*
* The APP_NAME_<pid> environment variable is used to pass
* an application name as specified with the -Xdock:name command
* line option from Java launcher code to the AWT code in order
* to assign this name to the app's dock tile on the Mac.
* The _<pid> part is added to avoid collisions with child processes.
*
* WARNING: This environment variable is an implementation detail and
* isn't meant for use outside of the core platform. The mechanism for
* passing this information from Java launcher to other modules may
* change drastically between update release, and it may even be
* removed or replaced with another mechanism.
*
* NOTE: It is used by SWT, and JavaFX.
*/
snprintf
(
envVar
,
sizeof
(
envVar
),
"APP_NAME_%d"
,
getpid
());
setenv
(
envVar
,
(
arg
+
12
),
1
);
}
if
(
strstr
(
arg
,
"-Xdock:icon="
)
==
arg
)
{
/*
* The APP_ICON_<pid> environment variable is used to pass
* an application icon as specified with the -Xdock:icon command
* line option from Java launcher code to the AWT code in order
* to assign this icon to the app's dock tile on the Mac.
* The _<pid> part is added to avoid collisions with child processes.
*
* WARNING: This environment variable is an implementation detail and
* isn't meant for use outside of the core platform. The mechanism for
* passing this information from Java launcher to other modules may
* change drastically between update release, and it may even be
* removed or replaced with another mechanism.
*
* NOTE: It is used by SWT, and JavaFX.
*/
snprintf
(
envVar
,
sizeof
(
envVar
),
"APP_ICON_%d"
,
getpid
());
setenv
(
envVar
,
(
arg
+
12
),
1
);
}
...
...
@@ -931,6 +961,22 @@ SetMainClassForAWT(JNIEnv *env, jclass mainClass) {
NULL_CHECK
(
mainClassName
=
(
*
env
)
->
GetStringUTFChars
(
env
,
mainClassString
,
NULL
));
char
envVar
[
80
];
/*
* The JAVA_MAIN_CLASS_<pid> environment variable is used to pass
* the name of a Java class whose main() method is invoked by
* the Java launcher code to start the application, to the AWT code
* in order to assign the name to the Apple menu bar when the app
* is active on the Mac.
* The _<pid> part is added to avoid collisions with child processes.
*
* WARNING: This environment variable is an implementation detail and
* isn't meant for use outside of the core platform. The mechanism for
* passing this information from Java launcher to other modules may
* change drastically between update release, and it may even be
* removed or replaced with another mechanism.
*
* NOTE: It is used by SWT, and JavaFX.
*/
snprintf
(
envVar
,
sizeof
(
envVar
),
"JAVA_MAIN_CLASS_%d"
,
getpid
());
setenv
(
envVar
,
mainClassName
,
1
);
...
...
src/macosx/classes/sun/lwawt/LWTextAreaPeer.java
浏览文件 @
f0fa3444
...
...
@@ -210,6 +210,15 @@ final class LWTextAreaPeer
super
();
}
@Override
public
void
replaceSelection
(
String
content
)
{
getDocument
().
removeDocumentListener
(
LWTextAreaPeer
.
this
);
super
.
replaceSelection
(
content
);
// post only one text event in this case
postTextEvent
();
getDocument
().
addDocumentListener
(
LWTextAreaPeer
.
this
);
}
@Override
public
boolean
hasFocus
()
{
return
getTarget
().
hasFocus
();
...
...
src/macosx/classes/sun/lwawt/LWTextComponentPeer.java
浏览文件 @
f0fa3444
...
...
@@ -187,7 +187,7 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
}
}
pr
ivate
void
sendTextEvent
(
final
DocumentEvent
e
)
{
pr
otected
final
void
postTextEvent
(
)
{
postEvent
(
new
TextEvent
(
getTarget
(),
TextEvent
.
TEXT_VALUE_CHANGED
));
synchronized
(
getDelegateLock
())
{
revalidate
();
...
...
@@ -196,17 +196,17 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
@Override
public
final
void
changedUpdate
(
final
DocumentEvent
e
)
{
sendTextEvent
(
e
);
postTextEvent
(
);
}
@Override
public
final
void
insertUpdate
(
final
DocumentEvent
e
)
{
sendTextEvent
(
e
);
postTextEvent
(
);
}
@Override
public
final
void
removeUpdate
(
final
DocumentEvent
e
)
{
sendTextEvent
(
e
);
postTextEvent
(
);
}
@Override
...
...
src/macosx/classes/sun/lwawt/LWTextFieldPeer.java
浏览文件 @
f0fa3444
...
...
@@ -95,7 +95,7 @@ final class LWTextFieldPeer
@Override
public
void
actionPerformed
(
final
ActionEvent
e
)
{
postEvent
(
new
ActionEvent
(
getTarget
(),
ActionEvent
.
ACTION_PERFORMED
,
getText
(),
e
.
getWhen
(),
e
.
getModifiers
()));
getText
(),
e
.
getWhen
(),
e
.
getModifiers
()));
}
/**
...
...
@@ -121,6 +121,15 @@ final class LWTextFieldPeer
super
();
}
@Override
public
void
replaceSelection
(
String
content
)
{
getDocument
().
removeDocumentListener
(
LWTextFieldPeer
.
this
);
super
.
replaceSelection
(
content
);
// post only one text event in this case
postTextEvent
();
getDocument
().
addDocumentListener
(
LWTextFieldPeer
.
this
);
}
@Override
public
boolean
hasFocus
()
{
return
getTarget
().
hasFocus
();
...
...
src/macosx/classes/sun/lwawt/LWWindowPeer.java
浏览文件 @
f0fa3444
...
...
@@ -669,39 +669,42 @@ public class LWWindowPeer
}
}
else
{
if
(
targetPeer
!=
lastMouseEventPeer
)
{
// lastMouseEventPeer may be null if mouse was out of Java windows
if
(
lastMouseEventPeer
!=
null
&&
lastMouseEventPeer
.
isEnabled
())
{
// Sometimes, MOUSE_EXITED is not sent by delegate (or is sent a bit
// later), in which case lastWindowPeer is another window
if
(
lastWindowPeer
!=
this
)
{
Point
oldp
=
lastMouseEventPeer
.
windowToLocal
(
x
,
y
,
lastWindowPeer
);
// Additionally translate from this to lastWindowPeer coordinates
Rectangle
lr
=
lastWindowPeer
.
getBounds
();
oldp
.
x
+=
r
.
x
-
lr
.
x
;
oldp
.
y
+=
r
.
y
-
lr
.
y
;
postEvent
(
new
MouseEvent
(
lastMouseEventPeer
.
getTarget
(),
MouseEvent
.
MOUSE_EXITED
,
when
,
modifiers
,
oldp
.
x
,
oldp
.
y
,
screenX
,
screenY
,
clickCount
,
popupTrigger
,
button
));
}
else
{
Point
oldp
=
lastMouseEventPeer
.
windowToLocal
(
x
,
y
,
this
);
postEvent
(
new
MouseEvent
(
lastMouseEventPeer
.
getTarget
(),
MouseEvent
.
MOUSE_EXITED
,
if
(
id
!=
MouseEvent
.
MOUSE_DRAGGED
||
lastMouseEventPeer
==
null
)
{
// lastMouseEventPeer may be null if mouse was out of Java windows
if
(
lastMouseEventPeer
!=
null
&&
lastMouseEventPeer
.
isEnabled
())
{
// Sometimes, MOUSE_EXITED is not sent by delegate (or is sent a bit
// later), in which case lastWindowPeer is another window
if
(
lastWindowPeer
!=
this
)
{
Point
oldp
=
lastMouseEventPeer
.
windowToLocal
(
x
,
y
,
lastWindowPeer
);
// Additionally translate from this to lastWindowPeer coordinates
Rectangle
lr
=
lastWindowPeer
.
getBounds
();
oldp
.
x
+=
r
.
x
-
lr
.
x
;
oldp
.
y
+=
r
.
y
-
lr
.
y
;
postEvent
(
new
MouseEvent
(
lastMouseEventPeer
.
getTarget
(),
MouseEvent
.
MOUSE_EXITED
,
when
,
modifiers
,
oldp
.
x
,
oldp
.
y
,
screenX
,
screenY
,
clickCount
,
popupTrigger
,
button
));
}
else
{
Point
oldp
=
lastMouseEventPeer
.
windowToLocal
(
x
,
y
,
this
);
postEvent
(
new
MouseEvent
(
lastMouseEventPeer
.
getTarget
(),
MouseEvent
.
MOUSE_EXITED
,
when
,
modifiers
,
oldp
.
x
,
oldp
.
y
,
screenX
,
screenY
,
clickCount
,
popupTrigger
,
button
));
}
}
if
(
targetPeer
!=
null
&&
targetPeer
.
isEnabled
()
&&
id
!=
MouseEvent
.
MOUSE_ENTERED
)
{
Point
newp
=
targetPeer
.
windowToLocal
(
x
,
y
,
curWindowPeer
);
postEvent
(
new
MouseEvent
(
targetPeer
.
getTarget
(),
MouseEvent
.
MOUSE_ENTERED
,
when
,
modifiers
,
oldp
.
x
,
old
p
.
y
,
screenX
,
screenY
,
newp
.
x
,
new
p
.
y
,
screenX
,
screenY
,
clickCount
,
popupTrigger
,
button
));
}
}
lastMouseEventPeer
=
targetPeer
;
if
(
targetPeer
!=
null
&&
targetPeer
.
isEnabled
()
&&
id
!=
MouseEvent
.
MOUSE_ENTERED
)
{
Point
newp
=
targetPeer
.
windowToLocal
(
x
,
y
,
curWindowPeer
);
postEvent
(
new
MouseEvent
(
targetPeer
.
getTarget
(),
MouseEvent
.
MOUSE_ENTERED
,
when
,
modifiers
,
newp
.
x
,
newp
.
y
,
screenX
,
screenY
,
clickCount
,
popupTrigger
,
button
));
}
}
// TODO: fill "bdata" member of AWTEvent
...
...
src/macosx/classes/sun/lwawt/macosx/CCursorManager.java
浏览文件 @
f0fa3444
...
...
@@ -36,6 +36,7 @@ final class CCursorManager extends LWCursorManager {
private
static
native
Point2D
nativeGetCursorPosition
();
private
static
native
void
nativeSetBuiltInCursor
(
final
int
type
,
final
String
name
);
private
static
native
void
nativeSetCustomCursor
(
final
long
imgPtr
,
final
double
x
,
final
double
y
);
public
static
native
void
nativeSetAllowsCursorSetInBackground
(
final
boolean
allows
);
private
static
final
int
NAMED_CURSOR
=
-
1
;
...
...
src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
浏览文件 @
f0fa3444
...
...
@@ -76,6 +76,12 @@ public class CEmbeddedFrame extends EmbeddedFrame {
int
screenX
=
locationOnScreen
.
x
+
x
;
int
screenY
=
locationOnScreen
.
y
+
y
;
if
(
eventType
==
CocoaConstants
.
NPCocoaEventMouseEntered
)
{
CCursorManager
.
nativeSetAllowsCursorSetInBackground
(
true
);
}
else
if
(
eventType
==
CocoaConstants
.
NPCocoaEventMouseExited
)
{
CCursorManager
.
nativeSetAllowsCursorSetInBackground
(
false
);
}
responder
.
handleMouseEvent
(
eventType
,
modifierFlags
,
buttonNumber
,
clickCount
,
x
,
y
,
screenX
,
screenY
);
}
...
...
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
浏览文件 @
f0fa3444
...
...
@@ -61,6 +61,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private
static
native
void
nativeSetNSWindowMinimizedIcon
(
long
nsWindowPtr
,
long
nsImage
);
private
static
native
void
nativeSetNSWindowRepresentedFilename
(
long
nsWindowPtr
,
String
representedFilename
);
private
static
native
void
nativeSetNSWindowSecurityWarningPositioning
(
long
nsWindowPtr
,
double
x
,
double
y
,
float
biasX
,
float
biasY
);
private
static
native
void
nativeSynthesizeMouseEnteredExitedEvents
(
long
nsWindowPtr
);
private
static
native
int
nativeGetScreenNSWindowIsOn_AppKitThread
(
long
nsWindowPtr
);
...
...
@@ -582,6 +583,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
}
}
nativeSynthesizeMouseEnteredExitedEvents
(
nsWindowPtr
);
// 6. Configure stuff #2
updateFocusabilityForAutoRequestFocus
(
true
);
...
...
@@ -791,6 +794,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
throw
new
RuntimeException
(
"Unknown window state: "
+
windowState
);
}
nativeSynthesizeMouseEnteredExitedEvents
(
nsWindowPtr
);
// NOTE: the SWP.windowState field gets updated to the newWindowState
// value when the native notification comes to us
}
...
...
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
浏览文件 @
f0fa3444
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011,
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
...
...
@@ -656,6 +656,14 @@ public class LWCToolkit extends LWToolkit {
return
((
mods
&
(
InputEvent
.
META_MASK
|
InputEvent
.
CTRL_MASK
))
==
0
);
}
/**
* Returns whether popup is allowed to be shown above the task bar.
*/
@Override
public
boolean
canPopupOverlapTaskBar
()
{
return
false
;
}
// Extends PeerEvent because we want to pass long an ObjC mediator object and because we want these events to be posted early
// Typically, rather than relying on the notifier to call notifyAll(), we use the mediator to stop the runloop
public
static
class
CPeerEvent
extends
PeerEvent
{
...
...
src/macosx/native/sun/awt/AWTView.h
浏览文件 @
f0fa3444
...
...
@@ -52,9 +52,12 @@
BOOL
fPAHNeedsToSelect
;
id
cglLayer
;
// is a sublayer of view.layer
BOOL
mouseIsOver
;
}
@property
(
nonatomic
,
retain
)
id
cglLayer
;
@property
(
nonatomic
)
BOOL
mouseIsOver
;
-
(
id
)
initWithRect
:(
NSRect
)
rect
platformView
:
(
jobject
)
cPlatformView
windowLayer
:(
CALayer
*
)
windowLayer
;
-
(
void
)
deliverJavaMouseEvent
:
(
NSEvent
*
)
event
;
...
...
src/macosx/native/sun/awt/AWTView.m
浏览文件 @
f0fa3444
...
...
@@ -61,6 +61,7 @@ static BOOL shouldUsePressAndHold() {
@synthesize
_dropTarget
;
@synthesize
_dragSource
;
@synthesize
cglLayer
;
@synthesize
mouseIsOver
;
// Note: Must be called on main (AppKit) thread only
-
(
id
)
initWithRect
:
(
NSRect
)
rect
...
...
@@ -80,6 +81,8 @@ AWT_ASSERT_APPKIT_THREAD;
fEnablePressAndHold
=
shouldUsePressAndHold
();
fInPressAndHold
=
NO
;
fPAHNeedsToSelect
=
NO
;
mouseIsOver
=
NO
;
if
(
windowLayer
!=
nil
)
{
self
.
cglLayer
=
windowLayer
;
...
...
@@ -299,6 +302,16 @@ AWT_ASSERT_APPKIT_THREAD;
*/
-
(
void
)
deliverJavaMouseEvent
:
(
NSEvent
*
)
event
{
NSEventType
type
=
[
event
type
];
// check synthesized mouse entered/exited events
if
((
type
==
NSMouseEntered
&&
mouseIsOver
)
||
(
type
==
NSMouseExited
&&
!
mouseIsOver
))
{
return
;
}
else
if
((
type
==
NSMouseEntered
&&
!
mouseIsOver
)
||
(
type
==
NSMouseExited
&&
mouseIsOver
))
{
mouseIsOver
=
!
mouseIsOver
;
}
[
AWTToolkit
eventCountPlusPlus
];
JNIEnv
*
env
=
[
ThreadUtilities
getJNIEnv
];
...
...
@@ -306,7 +319,6 @@ AWT_ASSERT_APPKIT_THREAD;
NSPoint
eventLocation
=
[
event
locationInWindow
];
NSPoint
localPoint
=
[
self
convertPoint
:
eventLocation
fromView
:
nil
];
NSPoint
absP
=
[
NSEvent
mouseLocation
];
NSEventType
type
=
[
event
type
];
// Convert global numbers between Cocoa's coordinate system and Java.
// TODO: need consitent way for doing that both with global as well as with local coordinates.
...
...
src/macosx/native/sun/awt/AWTWindow.h
浏览文件 @
f0fa3444
...
...
@@ -56,6 +56,7 @@
contentView
:(
NSView
*
)
contentView
;
-
(
void
)
adjustGrowBoxWindow
;
-
(
BOOL
)
isTopmostWindowUnderMouse
;
@end
#endif _AWTWINDOW_H
src/macosx/native/sun/awt/AWTWindow.m
浏览文件 @
f0fa3444
...
...
@@ -170,6 +170,66 @@ AWT_ASSERT_APPKIT_THREAD;
return
self
;
}
// checks that this window is under the mouse cursor and this point is not overlapped by others windows
-
(
BOOL
)
isTopmostWindowUnderMouse
{
int
currentWinID
=
[
self
windowNumber
];
NSRect
screenRect
=
[[
NSScreen
mainScreen
]
frame
];
NSPoint
nsMouseLocation
=
[
NSEvent
mouseLocation
];
CGPoint
cgMouseLocation
=
CGPointMake
(
nsMouseLocation
.
x
,
screenRect
.
size
.
height
-
nsMouseLocation
.
y
);
NSMutableArray
*
windows
=
(
NSMutableArray
*
)
CGWindowListCopyWindowInfo
(
kCGWindowListOptionOnScreenOnly
|
kCGWindowListExcludeDesktopElements
,
kCGNullWindowID
);
for
(
NSDictionary
*
window
in
windows
)
{
int
layer
=
[[
window
objectForKey
:(
id
)
kCGWindowLayer
]
intValue
];
if
(
layer
==
0
)
{
int
winID
=
[[
window
objectForKey
:(
id
)
kCGWindowNumber
]
intValue
];
CGRect
rect
;
CGRectMakeWithDictionaryRepresentation
((
CFDictionaryRef
)[
window
objectForKey
:(
id
)
kCGWindowBounds
],
&
rect
);
if
(
CGRectContainsPoint
(
rect
,
cgMouseLocation
))
{
return
currentWinID
==
winID
;
}
else
if
(
currentWinID
==
winID
)
{
return
NO
;
}
}
}
return
NO
;
}
-
(
void
)
synthesizeMouseEnteredExitedEvents
{
int
eventType
=
0
;
BOOL
isUnderMouse
=
[
self
isTopmostWindowUnderMouse
];
BOOL
mouseIsOver
=
[[
self
contentView
]
mouseIsOver
];
if
(
isUnderMouse
&&
!
mouseIsOver
)
{
eventType
=
NSMouseEntered
;
}
else
if
(
!
isUnderMouse
&&
mouseIsOver
)
{
eventType
=
NSMouseExited
;
}
else
{
return
;
}
NSPoint
screenLocation
=
[
NSEvent
mouseLocation
];
NSPoint
windowLocation
=
[
self
convertScreenToBase
:
screenLocation
];
int
modifierFlags
=
(
eventType
==
NSMouseEntered
)
?
NSMouseEnteredMask
:
NSMouseExitedMask
;
NSEvent
*
mouseEvent
=
[
NSEvent
enterExitEventWithType
:
eventType
location:
windowLocation
modifierFlags:
modifierFlags
timestamp:
0
windowNumber:
[
self
windowNumber
]
context:
nil
eventNumber:
0
trackingNumber:
0
userData:
nil
];
[[
self
contentView
]
deliverJavaMouseEvent
:
mouseEvent
];
}
-
(
void
)
dealloc
{
AWT_ASSERT_APPKIT_THREAD
;
...
...
@@ -669,6 +729,8 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
// ensure we repaint the whole window after the resize operation
// (this will also re-enable screen updates, which were disabled above)
// TODO: send PaintEvent
[
window
synthesizeMouseEnteredExitedEvents
];
}];
JNF_COCOA_EXIT
(
env
);
...
...
@@ -897,6 +959,27 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
JNF_COCOA_EXIT
(
env
);
}
/*
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeSynthesizeMouseEnteredExitedEvents
* Signature: (J)V
*/
JNIEXPORT
void
JNICALL
Java_sun_lwawt_macosx_CPlatformWindow_nativeSynthesizeMouseEnteredExitedEvents
(
JNIEnv
*
env
,
jclass
clazz
,
jlong
windowPtr
)
{
JNF_COCOA_ENTER
(
env
);
AWT_ASSERT_NOT_APPKIT_THREAD
;
AWTWindow
*
window
=
OBJC
(
windowPtr
);
[
JNFRunLoop
performOnMainThreadWaiting
:
NO
withBlock
:
^
(){
AWT_ASSERT_APPKIT_THREAD
;
[
window
synthesizeMouseEnteredExitedEvents
];
}];
JNF_COCOA_EXIT
(
env
);
}
/*
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeGetScreenNSWindowIsOn_AppKitThread
...
...
src/macosx/native/sun/awt/CCursorManager.m
浏览文件 @
f0fa3444
...
...
@@ -137,3 +137,30 @@ JNF_COCOA_EXIT(env);
return
jpt
;
}
JNIEXPORT
void
JNICALL
Java_sun_lwawt_macosx_CCursorManager_nativeSetAllowsCursorSetInBackground
(
JNIEnv
*
env
,
jclass
class
,
jboolean
allows
)
{
JNF_COCOA_ENTER
(
env
);
AWT_ASSERT_NOT_APPKIT_THREAD
;
SEL
allowsSetInBackground_SEL
=
@selector
(
javaSetAllowsCursorSetInBackground
:
);
if
([[
NSCursor
class
]
respondsToSelector
:
allowsSetInBackground_SEL
])
{
[
JNFRunLoop
performOnMainThreadWaiting
:
YES
withBlock
:
^
(){
NSMethodSignature
*
allowsSetInBackground_sig
=
[[
NSCursor
class
]
methodSignatureForSelector
:
allowsSetInBackground_SEL
];
NSInvocation
*
invocation
=
[
NSInvocation
invocationWithMethodSignature
:
allowsSetInBackground_sig
];
BOOL
arg
=
(
BOOL
)
allows
;
[
invocation
setSelector
:
allowsSetInBackground_SEL
];
[
invocation
setArgument
:
&
arg
atIndex
:
2
];
[
invocation
invokeWithTarget
:[
NSCursor
class
]];
}];
}
JNF_COCOA_EXIT
(
env
);
}
src/macosx/native/sun/awt/PrinterView.m
浏览文件 @
f0fa3444
...
...
@@ -27,6 +27,7 @@
#import "java_awt_print_Pageable.h"
#import "java_awt_print_Printable.h"
#import "java_awt_print_PageFormat.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
...
...
@@ -35,6 +36,7 @@
static
JNF_CLASS_CACHE
(
sjc_CPrinterJob
,
"sun/lwawt/macosx/CPrinterJob"
);
static
JNF_CLASS_CACHE
(
sjc_PageFormat
,
"java/awt/print/PageFormat"
);
@implementation
PrinterView
...
...
@@ -152,6 +154,7 @@ static JNF_CLASS_CACHE(sjc_CPrinterJob, "sun/lwawt/macosx/CPrinterJob");
static
JNF_MEMBER_CACHE
(
jm_getPageformatPrintablePeekgraphics
,
sjc_CPrinterJob
,
"getPageformatPrintablePeekgraphics"
,
"(I)[Ljava/lang/Object;"
);
static
JNF_MEMBER_CACHE
(
jm_printAndGetPageFormatArea
,
sjc_CPrinterJob
,
"printAndGetPageFormatArea"
,
"(Ljava/awt/print/Printable;Ljava/awt/Graphics;Ljava/awt/print/PageFormat;I)Ljava/awt/geom/Rectangle2D;"
);
static
JNF_MEMBER_CACHE
(
jm_getOrientation
,
sjc_PageFormat
,
"getOrientation"
,
"()I"
);
// Assertions removed, and corresponding JNFDeleteGlobalRefs added, for radr://3962543
// Actual fix that will keep these assertions from being true is radr://3205462 ,
...
...
@@ -201,6 +204,26 @@ static JNF_CLASS_CACHE(sjc_CPrinterJob, "sun/lwawt/macosx/CPrinterJob");
// Actually print and get the PageFormatArea
jobject
pageFormatArea
=
JNFCallObjectMethod
(
env
,
fPrinterJob
,
jm_printAndGetPageFormatArea
,
fCurPainter
,
fCurPeekGraphics
,
fCurPageFormat
,
jPageNumber
);
// AWT_THREADING Safe (AWTRunLoopMode)
if
(
pageFormatArea
!=
NULL
)
{
NSPrintingOrientation
currentOrientation
=
[[[
NSPrintOperation
currentOperation
]
printInfo
]
orientation
];
// set page orientation
switch
(
JNFCallIntMethod
(
env
,
fCurPageFormat
,
jm_getOrientation
))
{
case
java_awt_print_PageFormat_PORTRAIT
:
default:
if
(
currentOrientation
!=
NSPortraitOrientation
)
{
[[[
NSPrintOperation
currentOperation
]
printInfo
]
setOrientation:
NSPortraitOrientation
];
}
break
;
case
java_awt_print_PageFormat_LANDSCAPE
:
case
java_awt_print_PageFormat_REVERSE_LANDSCAPE
:
if
(
currentOrientation
!=
NSLandscapeOrientation
)
{
[[[
NSPrintOperation
currentOperation
]
printInfo
]
setOrientation:
NSLandscapeOrientation
];
}
break
;
}
result
=
JavaToNSRect
(
env
,
pageFormatArea
);
(
*
env
)
->
DeleteLocalRef
(
env
,
pageFormatArea
);
}
else
{
...
...
src/share/classes/javax/swing/JComponent.java
浏览文件 @
f0fa3444
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
2
, 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
...
...
@@ -2638,17 +2638,16 @@ public abstract class JComponent extends Container implements Serializable,
* attribute: visualUpdate true
*/
public
void
setVisible
(
boolean
aFlag
)
{
if
(
aFlag
!=
isVisible
())
{
if
(
aFlag
!=
isVisible
())
{
super
.
setVisible
(
aFlag
);
Container
parent
=
getParent
();
if
(
parent
!=
null
)
{
Rectangle
r
=
getBounds
();
parent
.
repaint
(
r
.
x
,
r
.
y
,
r
.
width
,
r
.
height
);
if
(
aFlag
)
{
Container
parent
=
getParent
();
if
(
parent
!=
null
)
{
Rectangle
r
=
getBounds
();
parent
.
repaint
(
r
.
x
,
r
.
y
,
r
.
width
,
r
.
height
);
}
revalidate
();
}
// Some (all should) LayoutManagers do not consider components
// that are not visible. As such we need to revalidate when the
// visible bit changes.
revalidate
();
}
}
...
...
@@ -5568,4 +5567,21 @@ public abstract class JComponent extends Container implements Serializable,
",preferredSize="
+
preferredSizeString
;
}
/**
* {@inheritDoc}
*/
@Override
public
void
hide
()
{
boolean
showing
=
isShowing
();
super
.
hide
();
if
(
showing
)
{
Container
parent
=
getParent
();
if
(
parent
!=
null
)
{
Rectangle
r
=
getBounds
();
parent
.
repaint
(
r
.
x
,
r
.
y
,
r
.
width
,
r
.
height
);
}
revalidate
();
}
}
}
src/share/classes/javax/swing/JDesktopPane.java
浏览文件 @
f0fa3444
...
...
@@ -27,7 +27,8 @@ package javax.swing;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.util.Vector
;
import
java.util.Collection
;
import
java.util.Iterator
;
import
javax.swing.plaf.*
;
import
javax.accessibility.*
;
...
...
@@ -42,7 +43,6 @@ import java.io.IOException;
import
java.beans.PropertyVetoException
;
import
java.util.Set
;
import
java.util.TreeSet
;
/**
* A container used to create a multiple-document interface or a virtual desktop.
* You create <code>JInternalFrame</code> objects and add them to the
...
...
@@ -261,25 +261,26 @@ public class JDesktopPane extends JLayeredPane implements Accessible
* @return an array of <code>JInternalFrame</code> objects
*/
public
JInternalFrame
[]
getAllFrames
()
{
return
getAllFrames
(
this
).
toArray
(
new
JInternalFrame
[
0
]);
}
private
static
Collection
<
JInternalFrame
>
getAllFrames
(
Container
parent
)
{
int
i
,
count
;
JInternalFrame
[]
results
;
Vector
<
JInternalFrame
>
vResults
=
new
Vector
<
JInternalFrame
>(
10
);
count
=
getComponentCount
();
for
(
i
=
0
;
i
<
count
;
i
++)
{
Component
next
=
getComponent
(
i
);
if
(
next
instanceof
JInternalFrame
)
vResults
.
addElement
((
JInternalFrame
)
next
);
else
if
(
next
instanceof
JInternalFrame
.
JDesktopIcon
)
{
JInternalFrame
tmp
=
((
JInternalFrame
.
JDesktopIcon
)
next
).
getInternalFrame
();
if
(
tmp
!=
null
)
vResults
.
addElement
(
tmp
);
Collection
<
JInternalFrame
>
results
=
new
ArrayList
<
JInternalFrame
>();
count
=
parent
.
getComponentCount
();
for
(
i
=
0
;
i
<
count
;
i
++)
{
Component
next
=
parent
.
getComponent
(
i
);
if
(
next
instanceof
JInternalFrame
)
{
results
.
add
((
JInternalFrame
)
next
);
}
else
if
(
next
instanceof
JInternalFrame
.
JDesktopIcon
)
{
JInternalFrame
tmp
=
((
JInternalFrame
.
JDesktopIcon
)
next
).
getInternalFrame
();
if
(
tmp
!=
null
)
{
results
.
add
(
tmp
);
}
}
else
if
(
next
instanceof
Container
)
{
results
.
addAll
(
getAllFrames
((
Container
)
next
));
}
}
results
=
new
JInternalFrame
[
vResults
.
size
()];
vResults
.
copyInto
(
results
);
return
results
;
}
...
...
@@ -322,27 +323,14 @@ public class JDesktopPane extends JLayeredPane implements Accessible
* @see JLayeredPane
*/
public
JInternalFrame
[]
getAllFramesInLayer
(
int
layer
)
{
int
i
,
count
;
JInternalFrame
[]
results
;
Vector
<
JInternalFrame
>
vResults
=
new
Vector
<
JInternalFrame
>(
10
);
count
=
getComponentCount
();
for
(
i
=
0
;
i
<
count
;
i
++)
{
Component
next
=
getComponent
(
i
);
if
(
next
instanceof
JInternalFrame
)
{
if
(((
JInternalFrame
)
next
).
getLayer
()
==
layer
)
vResults
.
addElement
((
JInternalFrame
)
next
);
}
else
if
(
next
instanceof
JInternalFrame
.
JDesktopIcon
)
{
JInternalFrame
tmp
=
((
JInternalFrame
.
JDesktopIcon
)
next
).
getInternalFrame
();
if
(
tmp
!=
null
&&
tmp
.
getLayer
()
==
layer
)
vResults
.
addElement
(
tmp
);
Collection
<
JInternalFrame
>
allFrames
=
getAllFrames
(
this
);
Iterator
<
JInternalFrame
>
iterator
=
allFrames
.
iterator
();
while
(
iterator
.
hasNext
())
{
if
(
iterator
.
next
().
getLayer
()
!=
layer
)
{
iterator
.
remove
();
}
}
results
=
new
JInternalFrame
[
vResults
.
size
()];
vResults
.
copyInto
(
results
);
return
results
;
return
allFrames
.
toArray
(
new
JInternalFrame
[
0
]);
}
private
List
<
JInternalFrame
>
getFrames
()
{
...
...
src/share/classes/javax/swing/JPopupMenu.java
浏览文件 @
f0fa3444
/*
* Copyright (c) 1997, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 20
12
, 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
...
...
@@ -41,6 +41,8 @@ import javax.swing.plaf.PopupMenuUI;
import
javax.swing.plaf.ComponentUI
;
import
javax.swing.plaf.basic.BasicComboPopup
;
import
javax.swing.event.*
;
import
sun.awt.SunToolkit
;
import
sun.security.util.SecurityConstants
;
import
java.applet.Applet
;
...
...
@@ -347,6 +349,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
long
popupBottomY
=
(
long
)
popupLocation
.
y
+
(
long
)
popupSize
.
height
;
int
scrWidth
=
scrBounds
.
width
;
int
scrHeight
=
scrBounds
.
height
;
if
(!
canPopupOverlapTaskBar
())
{
// Insets include the task bar. Take them into account.
Insets
scrInsets
=
toolkit
.
getScreenInsets
(
gc
);
...
...
@@ -407,25 +410,19 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
}
/**
* Checks that there are enough security permissions
* to make popup "always on top", which allows to show it above the task bar.
* Returns whether popup is allowed to be shown above the task bar.
*/
static
boolean
canPopupOverlapTaskBar
()
{
boolean
result
=
true
;
try
{
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
SecurityConstants
.
AWT
.
SET_WINDOW_ALWAYS_ON_TOP_PERMISSION
);
}
}
catch
(
SecurityException
se
)
{
// There is no permission to show popups over the task bar
result
=
false
;
Toolkit
tk
=
Toolkit
.
getDefaultToolkit
();
if
(
tk
instanceof
SunToolkit
)
{
result
=
((
SunToolkit
)
tk
).
canPopupOverlapTaskBar
();
}
return
result
;
}
/**
* Factory method which creates the <code>JMenuItem</code> for
* <code>Actions</code> added to the <code>JPopupMenu</code>.
...
...
src/share/classes/javax/swing/JTable.java
浏览文件 @
f0fa3444
...
...
@@ -5470,7 +5470,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
if
(
constructor
.
getDeclaringClass
()
==
String
.
class
)
{
value
=
s
;
}
super
.
stopCellEditing
();
return
super
.
stopCellEditing
();
}
try
{
...
...
src/share/classes/sun/awt/SunToolkit.java
浏览文件 @
f0fa3444
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
2
, 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
...
...
@@ -42,6 +42,8 @@ import java.util.concurrent.TimeUnit;
import
java.util.concurrent.locks.Condition
;
import
java.util.concurrent.locks.Lock
;
import
java.util.concurrent.locks.ReentrantLock
;
import
sun.security.util.SecurityConstants
;
import
sun.util.logging.PlatformLogger
;
import
sun.misc.SoftCache
;
import
sun.font.FontDesignMetrics
;
...
...
@@ -1135,6 +1137,26 @@ public abstract class SunToolkit extends Toolkit
return
((
mods
&
InputEvent
.
ALT_MASK
)
==
(
mods
&
InputEvent
.
CTRL_MASK
));
}
/**
* Returns whether popup is allowed to be shown above the task bar.
* This is a default implementation of this method, which checks
* corresponding security permission.
*/
public
boolean
canPopupOverlapTaskBar
()
{
boolean
result
=
true
;
try
{
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
SecurityConstants
.
AWT
.
SET_WINDOW_ALWAYS_ON_TOP_PERMISSION
);
}
}
catch
(
SecurityException
se
)
{
// There is no permission to show popups over the task bar
result
=
false
;
}
return
result
;
}
/**
* Returns a new input method window, with behavior as specified in
* {@link java.awt.im.spi.InputMethodContext#createInputMethodWindow}.
...
...
src/share/classes/sun/print/ServiceDialog.java
浏览文件 @
f0fa3444
...
...
@@ -72,6 +72,7 @@ import javax.swing.text.NumberFormatter;
import
sun.print.SunPageSelection
;
import
java.awt.event.KeyEvent
;
import
java.net.URISyntaxException
;
import
java.lang.reflect.Field
;
/**
...
...
@@ -479,20 +480,45 @@ public class ServiceDialog extends JDialog implements ActionListener {
*/
public
static
String
getMsg
(
String
key
)
{
try
{
return
messageRB
.
getString
(
key
);
return
removeMnemonics
(
messageRB
.
getString
(
key
)
);
}
catch
(
java
.
util
.
MissingResourceException
e
)
{
throw
new
Error
(
"Fatal: Resource for ServiceUI is broken; "
+
"there is no "
+
key
+
" key in resource"
);
}
}
private
static
String
removeMnemonics
(
String
s
)
{
int
i
=
s
.
indexOf
(
'&'
);
int
len
=
s
.
length
();
if
(
i
<
0
||
i
==
(
len
-
1
))
{
return
s
;
}
int
j
=
s
.
indexOf
(
'&'
,
i
+
1
);
if
(
j
==
i
+
1
)
{
if
(
j
+
1
==
len
)
{
return
s
.
substring
(
0
,
i
+
1
);
// string ends with &&
}
else
{
return
s
.
substring
(
0
,
i
+
1
)
+
removeMnemonics
(
s
.
substring
(
j
+
1
));
}
}
// ok first & not double &&
if
(
i
==
0
)
{
return
removeMnemonics
(
s
.
substring
(
1
));
}
else
{
return
(
s
.
substring
(
0
,
i
)
+
removeMnemonics
(
s
.
substring
(
i
+
1
)));
}
}
/**
* Returns mnemonic character from resource
*/
private
static
char
getMnemonic
(
String
key
)
{
String
str
=
getMsg
(
key
+
".mnemonic"
);
if
((
str
!=
null
)
&&
(
str
.
length
()
>
0
))
{
return
str
.
charAt
(
0
);
String
str
=
messageRB
.
getString
(
key
).
replace
(
"&&"
,
""
);
int
index
=
str
.
indexOf
(
'&'
);
if
(
0
<=
index
&&
index
<
str
.
length
()
-
1
)
{
char
c
=
str
.
charAt
(
index
+
1
);
return
Character
.
toUpperCase
(
c
);
}
else
{
return
(
char
)
0
;
}
...
...
@@ -501,12 +527,23 @@ public class ServiceDialog extends JDialog implements ActionListener {
/**
* Returns the mnemonic as a KeyEvent.VK constant from the resource.
*/
static
Class
_keyEventClazz
=
null
;
private
static
int
getVKMnemonic
(
String
key
)
{
String
str
=
getMsg
(
key
+
".vkMnemonic"
);
if
((
str
!=
null
)
&&
(
str
.
length
()
>
0
))
{
try
{
return
Integer
.
parseInt
(
str
);
}
catch
(
NumberFormatException
nfe
)
{}
String
s
=
String
.
valueOf
(
getMnemonic
(
key
));
if
(
s
==
null
||
s
.
length
()
!=
1
)
{
return
0
;
}
String
vkString
=
"VK_"
+
s
.
toUpperCase
();
try
{
if
(
_keyEventClazz
==
null
)
{
_keyEventClazz
=
Class
.
forName
(
"java.awt.event.KeyEvent"
,
true
,
(
ServiceDialog
.
class
).
getClassLoader
());
}
Field
field
=
_keyEventClazz
.
getDeclaredField
(
vkString
);
int
value
=
field
.
getInt
(
null
);
return
value
;
}
catch
(
Exception
e
)
{
}
return
0
;
}
...
...
src/share/classes/sun/print/resources/serviceui.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=Margins
button.cancel
=
Cancel
button.ok
=
OK
button.print
=
Print
button.properties
=
Properties...
button.properties.mnemonic
=
R
button.properties
=
P&roperties...
#
checkbox.collate
=
Collate
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
Banner Page
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
Print To File
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
&Collate
checkbox.jobsheets
=
&Banner Page
checkbox.printtofile
=
Print To &File
#
dialog.printtitle
=
Print
dialog.pstitle
=
Page Setup
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=No print service found.
dialog.writeerror
=
Cannot write to file:
#
label.info
=
Info:
label.jobname
=
Job Name:
label.jobname.mnemonic
=
J
label.numcopies
=
Number of copies:
label.numcopies.mnemonic
=
O
label.priority
=
Priority:
label.priority.mnemonic
=
R
label.psname
=
Name:
label.psname.mnemonic
=
N
label.jobname
=
&Job Name:
label.numcopies
=
Number &of copies:
label.priority
=
P&riority:
label.psname
=
&Name:
label.pstype
=
Type:
label.rangeto
=
To
label.size
=
Size:
label.size.mnemonic
=
Z
label.source
=
Source:
label.source.mnemonic
=
C
label.size
=
Si&ze:
label.source
=
Sour&ce:
label.status
=
Status:
label.username
=
User Name:
label.username.mnemonic
=
U
label.username
=
&User Name:
label.millimetres
=
(mm)
label.inches
=
(in)
label.topmargin
=
top
label.topmargin.mnemonic
=
T
label.bottommargin
=
bottom
label.bottommargin.mnemonic
=
B
label.leftmargin
=
left
label.leftmargin.mnemonic
=
F
label.rightmargin
=
right
label.rightmargin.mnemonic
=
R
label.topmargin
=
&top
label.bottommargin
=
&bottom
label.leftmargin
=
le&ft
label.rightmargin
=
&right
#
radiobutton.color
=
Color
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
Draft
radiobutton.draftq.mnemonic
=
F
radiobutton.duplex
=
Duplex
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
High
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
Landscape
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
Monochrome
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normal
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
One Side
radiobutton.oneside.mnemonic
=
O
radiobutton.portrait
=
Portrait
radiobutton.portrait.mnemonic
=
P
radiobutton.rangeall
=
All
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
Pages
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
Reverse Landscape
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
Reverse Portrait
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
Tumble
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
&Color
radiobutton.draftq
=
Dra&ft
radiobutton.duplex
=
&Duplex
radiobutton.highq
=
&High
radiobutton.landscape
=
&Landscape
radiobutton.monochrome
=
&Monochrome
radiobutton.normalq
=
&Normal
radiobutton.oneside
=
&One Side
radiobutton.portrait
=
&Portrait
radiobutton.rangeall
=
A&ll
radiobutton.rangepages
=
Pag&es
radiobutton.revlandscape
=
Reverse La&ndscape
radiobutton.revportrait
=
Reverse Portra&it
radiobutton.tumble
=
&Tumble
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Appearance
tab.appearance.vkMnemonic
=
65
tab.general
=
General
tab.general.vkMnemonic
=
71
tab.pagesetup
=
Page Setup
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
&Appearance
tab.general
=
&General
tab.pagesetup
=
Page &Setup
#
error.pagerange
=
Invalid page range; please re-enter values (e.g. 1-3,5,7-10)
error.destination
=
Invalid filename; please try again
...
...
src/share/classes/sun/print/resources/serviceui_de.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=R\u00E4nder
button.cancel
=
Abbrechen
button.ok
=
OK
button.print
=
Drucken
button.properties
=
Eigenschaften...
button.properties.mnemonic
=
I
button.properties
=
E&igenschaften...
#
checkbox.collate
=
Sortieren
checkbox.collate.mnemonic
=
R
checkbox.jobsheets
=
Bannerseite
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
Ausgabe in Datei
checkbox.printtofile.mnemonic
=
U
checkbox.collate
=
So&rtieren
checkbox.jobsheets
=
&Bannerseite
checkbox.printtofile
=
A&usgabe in Datei
#
dialog.printtitle
=
Drucken
dialog.pstitle
=
Seite einrichten
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=Kein Druckservice gefunden.
dialog.writeerror
=
Schreiben in Datei nicht m
\u
00F6glich:
#
label.info
=
Info:
label.jobname
=
Job-Name:
label.jobname.mnemonic
=
J
label.numcopies
=
Anzahl Kopien:
label.numcopies.mnemonic
=
K
label.priority
=
Priorit
\u
00E4t:
label.priority.mnemonic
=
R
label.psname
=
Name:
label.psname.mnemonic
=
N
label.jobname
=
&Job-Name:
label.numcopies
=
Anzahl &Kopien:
label.priority
=
P&riorit
\u
00E4t:
label.psname
=
&Name:
label.pstype
=
Typ:
label.rangeto
=
Bis
label.size
=
Gr
\u
00F6
\u
00DFe:
label.size.mnemonic
=
E
label.source
=
Quelle:
label.source.mnemonic
=
U
label.size
=
Gr
\u
00F6
\u
00DF&e:
label.source
=
Q&uelle:
label.status
=
Status:
label.username
=
Benutzername:
label.username.mnemonic
=
U
label.username
=
Ben&utzername:
label.millimetres
=
(mm)
label.inches
=
(Zoll)
label.topmargin
=
oben
label.topmargin.mnemonic
=
O
label.bottommargin
=
unten
label.bottommargin.mnemonic
=
N
label.leftmargin
=
links
label.leftmargin.mnemonic
=
L
label.rightmargin
=
rechts
label.rightmargin.mnemonic
=
R
label.topmargin
=
&oben
label.bottommargin
=
u&nten
label.leftmargin
=
&links
label.rightmargin
=
&rechts
#
radiobutton.color
=
Farbe
radiobutton.color.mnemonic
=
F
radiobutton.draftq
=
Entwurf
radiobutton.draftq.mnemonic
=
W
radiobutton.duplex
=
Duplex
radiobutton.duplex.mnemonic
=
P
radiobutton.highq
=
Hoch
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
Querformat
radiobutton.landscape.mnemonic
=
Q
radiobutton.monochrome
=
Monochrom
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normal
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
Einseitig
radiobutton.oneside.mnemonic
=
E
radiobutton.portrait
=
Hochformat
radiobutton.portrait.mnemonic
=
H
radiobutton.rangeall
=
Alle
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
Seiten
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
Umgekehrtes Querformat
radiobutton.revlandscape.mnemonic
=
M
radiobutton.revportrait
=
Umgekehrtes Hochformat
radiobutton.revportrait.mnemonic
=
K
radiobutton.tumble
=
Kalenderdruck
radiobutton.tumble.mnemonic
=
K
radiobutton.color
=
&Farbe
radiobutton.draftq
=
Ent&wurf
radiobutton.duplex
=
Du&plex
radiobutton.highq
=
&Hoch
radiobutton.landscape
=
&Querformat
radiobutton.monochrome
=
&Monochrom
radiobutton.normalq
=
&Normal
radiobutton.oneside
=
&Einseitig
radiobutton.portrait
=
&Hochformat
radiobutton.rangeall
=
A&lle
radiobutton.rangepages
=
S&eiten
radiobutton.revlandscape
=
U&mgekehrtes Querformat
radiobutton.revportrait
=
Umge&kehrtes Hochformat
radiobutton.tumble
=
&Kalenderdruck
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Darstellung
tab.appearance.vkMnemonic
=
68
tab.general
=
Allgemein
tab.general.vkMnemonic
=
65
tab.pagesetup
=
Seite einrichten
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
&Darstellung
tab.general
=
&Allgemein
tab.pagesetup
=
&Seite einrichten
#
error.pagerange
=
Ung
\u
00FCltiger Seitenbereich. Geben Sie die Werte erneut ein (Beispiel: 1-3,5,7-10)
error.destination
=
Ung
\u
00FCltiger Dateiname. Wiederholen Sie den Vorgang
...
...
src/share/classes/sun/print/resources/serviceui_es.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=M\u00E1rgenes
button.cancel
=
Cancelar
button.ok
=
Aceptar
button.print
=
Imprimir
button.properties
=
Propiedades...
button.properties.mnemonic
=
R
button.properties
=
P&ropiedades...
#
checkbox.collate
=
Intercalar
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
P
\u
00E1gina de R
\u
00F3tulo
checkbox.jobsheets.mnemonic
=
E
checkbox.printtofile
=
Imprimir en Archivo
checkbox.printtofile.mnemonic
=
M
checkbox.collate
=
Inter&calar
checkbox.jobsheets
=
P
\u
00E1gina d&e R
\u
00F3tulo
checkbox.printtofile
=
I&mprimir en Archivo
#
dialog.printtitle
=
Imprimir
dialog.pstitle
=
Preparar P
\u
00E1gina
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=No se ha encontrado el servicio de impresi\u00F3n.
dialog.writeerror
=
No se puede escribir en el archivo:
#
label.info
=
Informaci
\u
00F3n:
label.jobname
=
Nombre del Trabajo:
label.jobname.mnemonic
=
T
label.numcopies
=
N
\u
00FAmero de Copias:
label.numcopies.mnemonic
=
O
label.priority
=
Prioridad:
label.priority.mnemonic
=
I
label.psname
=
Nombre:
label.psname.mnemonic
=
N
label.jobname
=
Nombre del &Trabajo:
label.numcopies
=
N
\u
00FAmer&o de Copias:
label.priority
=
Pr&ioridad:
label.psname
=
&Nombre:
label.pstype
=
Tipo:
label.rangeto
=
A
label.size
=
Tama
\u
00F1o:
label.size.mnemonic
=
T
label.size
=
&Tama
\u
00F1o:
label.source
=
Origen:
label.source.mnemonic
=
O
label.status
=
Estado:
label.username
=
Usuario:
label.username.mnemonic
=
S
label.username
=
U&suario:
label.millimetres
=
(mm)
label.inches
=
(pulg.)
label.topmargin
=
superior
label.topmargin.mnemonic
=
S
label.bottommargin
=
inferior
label.bottommargin.mnemonic
=
F
label.leftmargin
=
izquierdo
label.leftmargin.mnemonic
=
Q
label.rightmargin
=
derecho
label.rightmargin.mnemonic
=
E
label.bottommargin
=
in&ferior
label.leftmargin
=
iz&quierdo
label.rightmargin
=
d&erecho
#
radiobutton.color
=
Color
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
Borrador
radiobutton.draftq.mnemonic
=
R
radiobutton.duplex
=
D
\u
00FAplex
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
Alta
radiobutton.highq.mnemonic
=
L
radiobutton.landscape
=
Horizontal
radiobutton.landscape.mnemonic
=
Z
radiobutton.monochrome
=
Monocromo
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normal
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
Una Cara
radiobutton.oneside.mnemonic
=
U
radiobutton.portrait
=
Vertical
radiobutton.portrait.mnemonic
=
V
radiobutton.rangeall
=
Todo
radiobutton.rangeall.mnemonic
=
T
radiobutton.rangepages
=
P
\u
00E1ginas
radiobutton.rangepages.mnemonic
=
G
radiobutton.revlandscape
=
Horizontal Inverso
radiobutton.revlandscape.mnemonic
=
H
radiobutton.revportrait
=
Vertical Inverso
radiobutton.revportrait.mnemonic
=
R
radiobutton.tumble
=
Cambio de Cara
radiobutton.tumble.mnemonic
=
B
radiobutton.color
=
&Color
radiobutton.draftq
=
Bo&rrador
radiobutton.duplex
=
&D
\u
00FAplex
radiobutton.highq
=
A<a
radiobutton.landscape
=
Hori&zontal
radiobutton.monochrome
=
&Monocromo
radiobutton.normalq
=
&Normal
radiobutton.oneside
=
&Una Cara
radiobutton.portrait
=
&Vertical
radiobutton.rangeall
=
&Todo
radiobutton.rangepages
=
P
\u
00E1&ginas
radiobutton.revlandscape
=
&Horizontal Inverso
radiobutton.revportrait
=
Ve&rtical Inverso
radiobutton.tumble
=
Cam&bio de Cara
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Apariencia
tab.appearance.vkMnemonic
=
65
tab.general
=
General
tab.general.vkMnemonic
=
71
tab.pagesetup
=
Preparar P
\u
00E1gina
tab.pagesetup.vkMnemonic
=
80
tab.appearance
=
&Apariencia
tab.general
=
&General
tab.pagesetup
=
&Preparar P
\u
00E1gina
#
error.pagerange
=
Rango de p
\u
00E1ginas no v
\u
00E1lido; vuelva a introducir los valores (por ejemplo, 1-3, 5, 7-10)
error.destination
=
Nombre de archivo no v
\u
00E1lido; int
\u
00E9ntelo de nuevo
...
...
src/share/classes/sun/print/resources/serviceui_fr.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=Marges
button.cancel
=
Annuler
button.ok
=
OK
button.print
=
Imprimer
button.properties
=
Propri
\u
00E9t
\u
00E9s...
button.properties.mnemonic
=
R
button.properties
=
P&ropri
\u
00E9t
\u
00E9s...
#
checkbox.collate
=
Collationner
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
Page de banni
\u
00E8re
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
Imprimer dans un fichier
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
&Collationner
checkbox.jobsheets
=
Page de &banni
\u
00E8re
checkbox.printtofile
=
Imprimer dans un &fichier
#
dialog.printtitle
=
Imprimer
dialog.pstitle
=
Mise en page
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=Service d'impression introuvable.
dialog.writeerror
=
Impossible d'
\u
00E9crire dans le fichier :
#
label.info
=
Infos :
label.jobname
=
Nom du travail :
label.jobname.mnemonic
=
T
label.numcopies
=
Nombre de copies :
label.numcopies.mnemonic
=
O
label.priority
=
Priorit
\u
00E9 :
label.priority.mnemonic
=
R
label.psname
=
Nom :
label.psname.mnemonic
=
N
label.jobname
=
Nom du &travail :
label.numcopies
=
N&ombre de copies :
label.priority
=
P&riorit
\u
00E9 :
label.psname
=
&Nom :
label.pstype
=
Type :
label.rangeto
=
A
label.size
=
Taille :
label.size.mnemonic
=
L
label.source
=
Source :
label.source.mnemonic
=
C
label.size
=
Tai&lle :
label.source
=
Sour&ce :
label.status
=
Statut :
label.username
=
Nom utilisateur :
label.username.mnemonic
=
O
label.username
=
N&om utilisateur :
label.millimetres
=
(mm)
label.inches
=
(po)
label.topmargin
=
haut
label.topmargin.mnemonic
=
H
label.bottommargin
=
bas
label.bottommargin.mnemonic
=
B
label.leftmargin
=
gauche
label.leftmargin.mnemonic
=
G
label.rightmargin
=
droite
label.rightmargin.mnemonic
=
D
label.topmargin
=
&haut
label.bottommargin
=
&bas
label.leftmargin
=
&gauche
label.rightmargin
=
&droite
#
radiobutton.color
=
Couleur
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
Brouillon
radiobutton.draftq.mnemonic
=
L
radiobutton.duplex
=
Duplex
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
Max.
radiobutton.highq.mnemonic
=
X
radiobutton.landscape
=
Paysage
radiobutton.landscape.mnemonic
=
Y
radiobutton.monochrome
=
Monochrome
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normal
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
Un c
\u
00F4t
\u
00E9
radiobutton.oneside.mnemonic
=
U
radiobutton.portrait
=
Portrait
radiobutton.portrait.mnemonic
=
P
radiobutton.rangeall
=
Tout
radiobutton.rangeall.mnemonic
=
T
radiobutton.rangepages
=
Pages
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
Paysage invers
\u
00E9
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
Portrait invers
\u
00E9
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
T
\u
00EAte-b
\u
00EAche
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
&Couleur
radiobutton.draftq
=
Broui&llon
radiobutton.duplex
=
&Duplex
radiobutton.highq
=
Ma&x.
radiobutton.landscape
=
Pa&ysage
radiobutton.monochrome
=
&Monochrome
radiobutton.normalq
=
&Normal
radiobutton.oneside
=
&Un c
\u
00F4t
\u
00E9
radiobutton.portrait
=
&Portrait
radiobutton.rangeall
=
&Tout
radiobutton.rangepages
=
Pag&es
radiobutton.revlandscape
=
Paysage i&nvers
\u
00E9
radiobutton.revportrait
=
Portra&it invers
\u
00E9
radiobutton.tumble
=
&T
\u
00EAte-b
\u
00EAche
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Apparence
tab.appearance.vkMnemonic
=
65
tab.general
=
G
\u
00E9n
\u
00E9ral
tab.general.vkMnemonic
=
71
tab.pagesetup
=
Mise en page
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
&Apparence
tab.general
=
&G
\u
00E9n
\u
00E9ral
tab.pagesetup
=
Mi&se en page
#
error.pagerange
=
Plage de pages non valide. Sp
\u
00E9cifiez les valeurs de nouveau (ex. : 1-3,5,7-10)
error.destination
=
Nom de fichier non valide ; recommencez
...
...
src/share/classes/sun/print/resources/serviceui_it.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=Margini
button.cancel
=
Annulla
button.ok
=
OK
button.print
=
Stampa
button.properties
=
Propriet
\u
00E0...
button.properties.mnemonic
=
R
button.properties
=
P&ropriet
\u
00E0...
#
checkbox.collate
=
Fascicola
checkbox.collate.mnemonic
=
L
checkbox.jobsheets
=
Pagina banner
checkbox.jobsheets.mnemonic
=
P
checkbox.printtofile
=
Stampa su file
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
Fascico&la
checkbox.jobsheets
=
&Pagina banner
checkbox.printtofile
=
Stampa su &file
#
dialog.printtitle
=
Stampa
dialog.pstitle
=
Imposta pagina
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=Nessun servizio di stampa trovato
dialog.writeerror
=
Impossibile scrivere nel file:
#
label.info
=
Informazioni:
label.jobname
=
Nome job:
label.jobname.mnemonic
=
J
label.numcopies
=
Numero di copie:
label.numcopies.mnemonic
=
O
label.priority
=
Priorit
\u
00E0:
label.priority.mnemonic
=
I
label.psname
=
Nome:
label.psname.mnemonic
=
N
label.jobname
=
Nome &job:
label.numcopies
=
Numer&o di copie:
label.priority
=
Pr&iorit
\u
00E0:
label.psname
=
&Nome:
label.pstype
=
Tipo:
label.rangeto
=
A
label.size
=
Dimensioni:
label.size.mnemonic
=
M
label.source
=
Origine:
label.source.mnemonic
=
R
label.size
=
Di&mensioni:
label.source
=
O&rigine:
label.status
=
Stato:
label.username
=
Nome utente:
label.username.mnemonic
=
U
label.username
=
Nome &utente:
label.millimetres
=
(mm)
label.inches
=
(poll.)
label.topmargin
=
superiore
label.topmargin.mnemonic
=
P
label.bottommargin
=
inferiore
label.bottommargin.mnemonic
=
F
label.leftmargin
=
sinistro
label.leftmargin.mnemonic
=
T
label.rightmargin
=
destro
label.rightmargin.mnemonic
=
D
label.topmargin
=
su&periore
label.bottommargin
=
in&feriore
label.leftmargin
=
sinis&tro
label.rightmargin
=
&destro
#
radiobutton.color
=
Colore
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
Bozza
radiobutton.draftq.mnemonic
=
B
radiobutton.duplex
=
Fronte retro
radiobutton.duplex.mnemonic
=
R
radiobutton.highq
=
Alta
radiobutton.highq.mnemonic
=
L
radiobutton.landscape
=
Orizzontale
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
Monocromatico
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normale
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
Un lato
radiobutton.oneside.mnemonic
=
O
radiobutton.portrait
=
Verticale
radiobutton.portrait.mnemonic
=
V
radiobutton.rangeall
=
Tutto
radiobutton.rangeall.mnemonic
=
U
radiobutton.rangepages
=
Pagine
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
Orizzontale capovolto
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
Verticale capovolto
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
Lato corto
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
&Colore
radiobutton.draftq
=
&Bozza
radiobutton.duplex
=
F&ronte retro
radiobutton.highq
=
A<a
radiobutton.landscape
=
Orizzonta&le
radiobutton.monochrome
=
&Monocromatico
radiobutton.normalq
=
&Normale
radiobutton.oneside
=
Un lat&o
radiobutton.portrait
=
&Verticale
radiobutton.rangeall
=
T&utto
radiobutton.rangepages
=
Pagin&e
radiobutton.revlandscape
=
Orizzo&ntale capovolto
radiobutton.revportrait
=
Vert&icale capovolto
radiobutton.tumble
=
La&to corto
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Aspetto
tab.appearance.vkMnemonic
=
65
tab.general
=
Generale
tab.general.vkMnemonic
=
71
tab.pagesetup
=
Imposta pagina
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
&Aspetto
tab.general
=
&Generale
tab.pagesetup
=
Impo&sta pagina
#
error.pagerange
=
Intervallo pagine non valido; immettere nuovamente i valori (ad es. 1-3,5,7-10)
error.destination
=
Nome file non valido; riprovare
...
...
src/share/classes/sun/print/resources/serviceui_ja.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=\u30DE\u30FC\u30B8\u30F3
button.cancel
=
\u
53D6
\u
6D88
button.ok
=
OK
button.print
=
\u5370\u5237
button.properties
=
\u
30D7
\u
30ED
\u
30D1
\u
30C6
\u
30A3(R)...
button.properties.mnemonic
=
R
button.properties
=
\u
30D7
\u
30ED
\u
30D1
\u
30C6
\u
30A3(&R)...
#
checkbox.collate
=
\u
4E01
\u5408\u3044
(C)
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
\u
30D0
\u
30CA
\u
30FC
\u
30FB
\u
30DA
\u
30FC
\u
30B8(B)
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
306B
\u
51FA
\u
529B(F)
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
\u
4E01
\u5408\u3044
(&C)
checkbox.jobsheets
=
\u
30D0
\u
30CA
\u
30FC
\u
30FB
\u
30DA
\u
30FC
\u
30B8(&B)
checkbox.printtofile
=
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
306B
\u
51FA
\u
529B(&F)
#
dialog.printtitle
=
\u5370\u5237
dialog.pstitle
=
\u
30DA
\u
30FC
\u
30B8
\u
8A2D
\u
5B9A
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=\u5370\u5237\u30B5\u30FC\u30D3\u30B9\u304C\u898B\u3064\u304B
dialog.writeerror
=
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
306B
\u
66F8
\u
304D
\u
8FBC
\u3081\u
307E
\u
305B
\u3093
:
#
label.info
=
\u
60C5
\u5831
:
label.jobname
=
\u
30B8
\u
30E7
\u
30D6
\u
540D(J):
label.jobname.mnemonic
=
J
label.numcopies
=
\u5370\u5237\u
90E8
\u6570
(O):
label.numcopies.mnemonic
=
O
label.priority
=
\u
512A
\u5148\u
5EA6(R):
label.priority.mnemonic
=
R
label.psname
=
\u
540D
\u
524D(N):
label.psname.mnemonic
=
N
label.jobname
=
\u
30B8
\u
30E7
\u
30D6
\u
540D(&J):
label.numcopies
=
\u5370\u5237\u
90E8
\u6570
(&O):
label.priority
=
\u
512A
\u5148\u
5EA6(&R):
label.psname
=
\u
540D
\u
524D(&N):
label.pstype
=
\u
30BF
\u
30A4
\u
30D7:
label.rangeto
=
\u5370\u5237\u
7BC4
\u
56F2
label.size
=
\u
30B5
\u
30A4
\u
30BA(Z):
label.size.mnemonic
=
Z
label.source
=
\u
30BD
\u
30FC
\u
30B9(C):
label.source.mnemonic
=
C
label.size
=
\u
30B5
\u
30A4
\u
30BA(&Z):
label.source
=
\u
30BD
\u
30FC
\u
30B9(&C):
label.status
=
\u
72B6
\u
614B:
label.username
=
\u
30E6
\u
30FC
\u
30B6
\u
30FC
\u
540D(U):
label.username.mnemonic
=
U
label.username
=
\u
30E6
\u
30FC
\u
30B6
\u
30FC
\u
540D(&U):
label.millimetres
=
(mm)
label.inches
=
(in)
label.topmargin
=
\u
4E0A(T)
label.topmargin.mnemonic
=
T
label.bottommargin
=
\u
4E0B(B)
label.bottommargin.mnemonic
=
B
label.leftmargin
=
\u
5DE6(F)
label.leftmargin.mnemonic
=
F
label.rightmargin
=
\u
53F3(R)
label.rightmargin.mnemonic
=
R
label.topmargin
=
\u
4E0A(&T)
label.bottommargin
=
\u
4E0B(&B)
label.leftmargin
=
\u
5DE6(&F)
label.rightmargin
=
\u
53F3(&R)
#
radiobutton.color
=
\u
30AB
\u
30E9
\u
30FC(C)
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
\u
30C9
\u
30E9
\u
30D5
\u
30C8(F)
radiobutton.draftq.mnemonic
=
F
radiobutton.duplex
=
\u
4E21
\u9762
(D)
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
\u
9AD8(H)
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
\u
6A2A(L)
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
\u
30E2
\u
30CE
\u
30AF
\u
30ED(M)
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
\u
6A19
\u
6E96(N)
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
\u7247\u9762
(O)
radiobutton.oneside.mnemonic
=
O
radiobutton.portrait
=
\u
7E26(P)
radiobutton.portrait.mnemonic
=
P
radiobutton.rangeall
=
\u3059\u3079\u3066
(L)
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
\u
30DA
\u
30FC
\u
30B8(E)
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
\u
30E9
\u
30F3
\u
30C9
\u
30B9
\u
30B1
\u
30FC
\u
30D7(
\u
53CD
\u
8EE2)(N)
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
\u
30DD
\u
30FC
\u
30C8
\u
30EC
\u
30A4
\u
30C8(
\u
53CD
\u
8EE2)(I)
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
\u
53CD
\u
8EE2(T)
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
\u
30AB
\u
30E9
\u
30FC(&C)
radiobutton.draftq
=
\u
30C9
\u
30E9
\u
30D5
\u
30C8(&F)
radiobutton.duplex
=
\u
4E21
\u9762
(&D)
radiobutton.highq
=
\u
9AD8(&H)
radiobutton.landscape
=
\u
6A2A(&L)
radiobutton.monochrome
=
\u
30E2
\u
30CE
\u
30AF
\u
30ED(&M)
radiobutton.normalq
=
\u
6A19
\u
6E96(&N)
radiobutton.oneside
=
\u7247\u9762
(&O)
radiobutton.portrait
=
\u
7E26(&P)
radiobutton.rangeall
=
\u3059\u3079\u3066
(&L)
radiobutton.rangepages
=
\u
30DA
\u
30FC
\u
30B8(&E)
radiobutton.revlandscape
=
\u
30E9
\u
30F3
\u
30C9
\u
30B9
\u
30B1
\u
30FC
\u
30D7(
\u
53CD
\u
8EE2)(&N)
radiobutton.revportrait
=
\u
30DD
\u
30FC
\u
30C8
\u
30EC
\u
30A4
\u
30C8(
\u
53CD
\u
8EE2)(&I)
radiobutton.tumble
=
\u
53CD
\u
8EE2(&T)
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
\u5916\u
89B3(A)
tab.appearance.vkMnemonic
=
65
tab.general
=
\u
4E00
\u
822C(G)
tab.general.vkMnemonic
=
71
tab.pagesetup
=
\u
30DA
\u
30FC
\u
30B8
\u
8A2D
\u
5B9A(S)
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
\u5916\u
89B3(&A)
tab.general
=
\u
4E00
\u
822C(&G)
tab.pagesetup
=
\u
30DA
\u
30FC
\u
30B8
\u
8A2D
\u
5B9A(&S)
#
error.pagerange
=
\u7121\u
52B9
\u
306A
\u
30DA
\u
30FC
\u
30B8
\u
7BC4
\u
56F2
\u3002\u5024\u3092\u
518D
\u5165\u
529B
\u3057\u3066\u
304F
\u3060\u3055\u3044
(
\u
4F8B
\u3001
1-3,5,7-10)
error.destination
=
\u7121\u
52B9
\u
306A
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
540D
\u3002\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
540D
\u3092\u
518D
\u5165\u
529B
\u3057\u3066\u
304F
\u3060\u3055\u3044
...
...
src/share/classes/sun/print/resources/serviceui_ko.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=\uC5EC\uBC31
button.cancel
=
\u
CDE8
\u
C18C
button.ok
=
\u
D655
\u
C778
button.print
=
\u
C778
\u
C1C4
button.properties
=
\u
C18D
\u
C131(R)...
button.properties.mnemonic
=
R
button.properties
=
\u
C18D
\u
C131(&R)...
#
checkbox.collate
=
\u
D55C
\u
BD80
\u
C529
\u
C778
\u
C1C4(C)
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
\u
BC30
\u
B108
\u
D398
\u
C774
\u
C9C0(B)
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
\u
D30C
\u
C77C
\u
B85C
\u
C778
\u
C1C4(F)
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
\u
D55C
\u
BD80
\u
C529
\u
C778
\u
C1C4(&C)
checkbox.jobsheets
=
\u
BC30
\u
B108
\u
D398
\u
C774
\u
C9C0(&B)
checkbox.printtofile
=
\u
D30C
\u
C77C
\u
B85C
\u
C778
\u
C1C4(&F)
#
dialog.printtitle
=
\u
C778
\u
C1C4
dialog.pstitle
=
\u
D398
\u
C774
\u
C9C0
\u
C124
\u
C815
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=\uC778\uC1C4 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC744 \uC218 \u
dialog.writeerror
=
\u
D30C
\u
C77C
\u
C5D0
\u
C4F8
\u
C218
\u
C5C6
\u
C74C:
#
label.info
=
\u
C815
\u
BCF4:
label.jobname
=
\u
C791
\u
C5C5
\u
C774
\u
B984(J):
label.jobname.mnemonic
=
J
label.numcopies
=
\u
B9E4
\u
C218(O):
label.numcopies.mnemonic
=
O
label.priority
=
\u
C6B0
\u
C120
\u
C21C
\u
C704(R):
label.priority.mnemonic
=
R
label.psname
=
\u
C774
\u
B984(N):
label.psname.mnemonic
=
N
label.jobname
=
\u
C791
\u
C5C5
\u
C774
\u
B984(&J):
label.numcopies
=
\u
B9E4
\u
C218(&O):
label.priority
=
\u
C6B0
\u
C120
\u
C21C
\u
C704(&R):
label.psname
=
\u
C774
\u
B984(&N):
label.pstype
=
\u
C720
\u
D615:
label.rangeto
=
\u
C885
\u
B8CC
label.size
=
\u
D06C
\u
AE30(Z):
label.size.mnemonic
=
Z
label.source
=
\u
C18C
\u
C2A4(C):
label.source.mnemonic
=
C
label.size
=
\u
D06C
\u
AE30(&Z):
label.source
=
\u
C18C
\u
C2A4(&C):
label.status
=
\u
C0C1
\u
D0DC:
label.username
=
\u
C0AC
\u
C6A9
\u
C790
\u
C774
\u
B984(U):
label.username.mnemonic
=
U
label.username
=
\u
C0AC
\u
C6A9
\u
C790
\u
C774
\u
B984(&U):
label.millimetres
=
(mm)
label.inches
=
(
\u
C778
\u
CE58)
label.topmargin
=
\u
C704
\u
CABD(T)
label.topmargin.mnemonic
=
T
label.bottommargin
=
\u
C544
\u
B798
\u
CABD(B)
label.bottommargin.mnemonic
=
B
label.leftmargin
=
\u
C67C
\u
CABD(F)
label.leftmargin.mnemonic
=
F
label.rightmargin
=
\u
C624
\u
B978
\u
CABD(R)
label.rightmargin.mnemonic
=
R
label.topmargin
=
\u
C704
\u
CABD(&T)
label.bottommargin
=
\u
C544
\u
B798
\u
CABD(&B)
label.leftmargin
=
\u
C67C
\u
CABD(&F)
label.rightmargin
=
\u
C624
\u
B978
\u
CABD(&R)
#
radiobutton.color
=
\u
C0C9
\u
C0C1(C)
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
\u
CD08
\u
C548(F)
radiobutton.draftq.mnemonic
=
F
radiobutton.duplex
=
\u
C591
\u
BA74(D)
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
\u
B192
\u
C74C(H)
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
\u
AC00
\u
B85C(L)
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
\u
B2E8
\u
C0C9(M)
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
\u
BCF4
\u
D1B5(N)
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
\u
B2E8
\u
BA74(O)
radiobutton.oneside.mnemonic
=
O
radiobutton.portrait
=
\u
C138
\u
B85C(P)
radiobutton.portrait.mnemonic
=
P
radiobutton.rangeall
=
\u
C804
\u
CCB4(L)
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
\u
D398
\u
C774
\u
C9C0(E)
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
\u
AC00
\u
B85C
\u
BC18
\u
C804(N)
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
\u
C138
\u
B85C
\u
BC18
\u
C804(I)
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
\u
D68C
\u
C804
\u
C2DD(T)
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
\u
C0C9
\u
C0C1(&C)
radiobutton.draftq
=
\u
CD08
\u
C548(&F)
radiobutton.duplex
=
\u
C591
\u
BA74(&D)
radiobutton.highq
=
\u
B192
\u
C74C(&H)
radiobutton.landscape
=
\u
AC00
\u
B85C(&L)
radiobutton.monochrome
=
\u
B2E8
\u
C0C9(&M)
radiobutton.normalq
=
\u
BCF4
\u
D1B5(&N)
radiobutton.oneside
=
\u
B2E8
\u
BA74(&O)
radiobutton.portrait
=
\u
C138
\u
B85C(&P)
radiobutton.rangeall
=
\u
C804
\u
CCB4(&L)
radiobutton.rangepages
=
\u
D398
\u
C774
\u
C9C0(&E)
radiobutton.revlandscape
=
\u
AC00
\u
B85C
\u
BC18
\u
C804(&N)
radiobutton.revportrait
=
\u
C138
\u
B85C
\u
BC18
\u
C804(&I)
radiobutton.tumble
=
\u
D68C
\u
C804
\u
C2DD(&T)
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
\u
BAA8
\u
C591(A)
tab.appearance.vkMnemonic
=
65
tab.general
=
\u
C77C
\u
BC18
\u
C0AC
\u
D56D(G)
tab.general.vkMnemonic
=
71
tab.pagesetup
=
\u
D398
\u
C774
\u
C9C0
\u
C124
\u
C815(S)
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
\u
BAA8
\u
C591(&A)
tab.general
=
\u
C77C
\u
BC18
\u
C0AC
\u
D56D(&G)
tab.pagesetup
=
\u
D398
\u
C774
\u
C9C0
\u
C124
\u
C815(&S)
#
error.pagerange
=
\u
BD80
\u
C801
\u
D569
\u
D55C
\u
D398
\u
C774
\u
C9C0
\u
BC94
\u
C704:
\u
AC12
\u
C744
\u
B2E4
\u
C2DC
\u
C785
\u
B825
\u
D558
\u
C2ED
\u
C2DC
\u
C624(
\u
C608: 1-3,5,7-10).
error.destination
=
\u
BD80
\u
C801
\u
D569
\u
D55C
\u
D30C
\u
C77C
\u
C774
\u
B984:
\u
B2E4
\u
C2DC
\u
C2DC
\u
B3C4
\u
D558
\u
C2ED
\u
C2DC
\u
C624.
...
...
src/share/classes/sun/print/resources/serviceui_pt_BR.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=Margens
button.cancel
=
Cancelar
button.ok
=
OK
button.print
=
Imprimir
button.properties
=
Propriedades...
button.properties.mnemonic
=
D
button.properties
=
Proprie&dades...
#
checkbox.collate
=
Agrupar
checkbox.collate.mnemonic
=
R
checkbox.jobsheets
=
P
\u
00E1gina com Banner
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
Imprimir em Arquivo
checkbox.printtofile.mnemonic
=
I
checkbox.collate
=
Ag&rupar
checkbox.jobsheets
=
P
\u
00E1gina com &Banner
checkbox.printtofile
=
&Imprimir em Arquivo
#
dialog.printtitle
=
Imprimir
dialog.pstitle
=
Configura
\u
00E7
\u
00E3o da P
\u
00E1gina
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=Nenhum servi\u00E7o de impress\u00E3o encontrado.
dialog.writeerror
=
N
\u
00E3o
\u
00E9 poss
\u
00EDvel gravar no arquivo:
#
label.info
=
Informa
\u
00E7
\u
00F5es:
label.jobname
=
Nome do Job:
label.jobname.mnemonic
=
J
label.numcopies
=
N
\u
00FAmero de c
\u
00F3pias:
label.numcopies.mnemonic
=
O
label.priority
=
Prioridade:
label.priority.mnemonic
=
P
label.psname
=
Nome:
label.psname.mnemonic
=
N
label.jobname
=
Nome do &Job:
label.numcopies
=
N
\u
00FAmer&o de c
\u
00F3pias:
label.priority
=
&Prioridade:
label.psname
=
&Nome:
label.pstype
=
Tipo:
label.rangeto
=
At
\u
00E9
label.size
=
Tamanho:
label.size.mnemonic
=
M
label.source
=
Origem:
label.source.mnemonic
=
O
label.size
=
Ta&manho:
label.source
=
&Origem:
label.status
=
Status:
label.username
=
Nome do Usu
\u
00E1rio:
label.username.mnemonic
=
U
label.username
=
Nome do &Usu
\u
00E1rio:
label.millimetres
=
(mm)
label.inches
=
(pol)
label.topmargin
=
superior
label.topmargin.mnemonic
=
S
label.bottommargin
=
inferior
label.bottommargin.mnemonic
=
I
label.leftmargin
=
esquerda:
label.leftmargin.mnemonic
=
Q
label.rightmargin
=
direita
label.rightmargin.mnemonic
=
D
label.topmargin
=
&superior
label.bottommargin
=
&inferior
label.leftmargin
=
es&querda:
label.rightmargin
=
&direita
#
radiobutton.color
=
Cor
radiobutton.color.mnemonic
=
O
radiobutton.draftq
=
Rascunho
radiobutton.draftq.mnemonic
=
R
radiobutton.duplex
=
Duplex
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
Alta
radiobutton.highq.mnemonic
=
T
radiobutton.landscape
=
Paisagem
radiobutton.landscape.mnemonic
=
P
radiobutton.monochrome
=
Monocrom
\u
00E1tico
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normal
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
Um Lado
radiobutton.oneside.mnemonic
=
L
radiobutton.portrait
=
Retrato
radiobutton.portrait.mnemonic
=
R
radiobutton.rangeall
=
Tudo
radiobutton.rangeall.mnemonic
=
U
radiobutton.rangepages
=
P
\u
00E1ginas
radiobutton.rangepages.mnemonic
=
P
radiobutton.revlandscape
=
Paisagem Invertida
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
Retrato Invertido
radiobutton.revportrait.mnemonic
=
E
radiobutton.tumble
=
Virar
radiobutton.tumble.mnemonic
=
V
radiobutton.color
=
C&or
radiobutton.draftq
=
&Rascunho
radiobutton.duplex
=
&Duplex
radiobutton.highq
=
Al&ta
radiobutton.landscape
=
&Paisagem
radiobutton.monochrome
=
&Monocrom
\u
00E1tico
radiobutton.normalq
=
&Normal
radiobutton.oneside
=
Um &Lado
radiobutton.portrait
=
&Retrato
radiobutton.rangeall
=
T&udo
radiobutton.rangepages
=
&P
\u
00E1ginas
radiobutton.revlandscape
=
Paisagem I&nvertida
radiobutton.revportrait
=
R&etrato Invertido
radiobutton.tumble
=
&Virar
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Apar
\u
00EAncia
tab.appearance.vkMnemonic
=
65
tab.general
=
Geral
tab.general.vkMnemonic
=
71
tab.pagesetup
=
Configura
\u
00E7
\u
00E3o de P
\u
00E1gina
tab.pagesetup.vkMnemonic
=
67
tab.appearance
=
&Apar
\u
00EAncia
tab.general
=
&Geral
tab.pagesetup
=
&Configura
\u
00E7
\u
00E3o de P
\u
00E1gina
#
error.pagerange
=
Faixa de p
\u
00E1ginas inv
\u
00E1lida; insira novamente os valores (por exemplo, 1-3,5,7-10)
error.destination
=
Nome de arquivo inv
\u
00E1lido; tente novamente
...
...
src/share/classes/sun/print/resources/serviceui_sv.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=Marginaler
button.cancel
=
Avbryt
button.ok
=
OK
button.print
=
Skriv ut
button.properties
=
Egenskaper...
button.properties.mnemonic
=
R
button.properties
=
Egenskape&r...
#
checkbox.collate
=
Sortera
checkbox.collate.mnemonic
=
T
checkbox.jobsheets
=
F
\u
00F6rs
\u
00E4ttsblad
checkbox.jobsheets.mnemonic
=
R
checkbox.printtofile
=
Skriv ut till fil
checkbox.printtofile.mnemonic
=
K
checkbox.collate
=
Sor&tera
checkbox.jobsheets
=
F
\u
00F6&rs
\u
00E4ttsblad
checkbox.printtofile
=
S&kriv ut till fil
#
dialog.printtitle
=
Skriv ut
dialog.pstitle
=
Utskriftsformat
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=Hittade ingen utskriftstj\u00E4nst.
dialog.writeerror
=
Kan inte skriva till filen:
#
label.info
=
Information:
label.jobname
=
Utskrift:
label.jobname.mnemonic
=
U
label.numcopies
=
Antal exemplar:
label.numcopies.mnemonic
=
E
label.priority
=
Prioritet:
label.priority.mnemonic
=
R
label.psname
=
Namn:
label.psname.mnemonic
=
N
label.jobname
=
&Utskrift:
label.numcopies
=
Antal &exemplar:
label.priority
=
P&rioritet:
label.psname
=
&Namn:
label.pstype
=
Typ:
label.rangeto
=
Till
label.size
=
Storlek:
label.size.mnemonic
=
O
label.source
=
K
\u
00E4lla:
label.source.mnemonic
=
K
label.size
=
St&orlek:
label.source
=
&K
\u
00E4lla:
label.status
=
Status:
label.username
=
Anv
\u
00E4ndarnamn:
label.username.mnemonic
=
N
label.username
=
A&nv
\u
00E4ndarnamn:
label.millimetres
=
(mm)
label.inches
=
(tum)
label.topmargin
=
\u
00F6verkant
label.topmargin.mnemonic
=
R
label.bottommargin
=
nederkant
label.bottommargin.mnemonic
=
N
label.leftmargin
=
v
\u
00E4nster
label.leftmargin.mnemonic
=
V
label.rightmargin
=
h
\u
00F6ger
label.rightmargin.mnemonic
=
H
label.topmargin
=
\u
00F6ve&rkant
label.bottommargin
=
&nederkant
label.leftmargin
=
&v
\u
00E4nster
label.rightmargin
=
&h
\u
00F6ger
#
radiobutton.color
=
F
\u
00E4rg
radiobutton.color.mnemonic
=
G
radiobutton.draftq
=
Utkast
radiobutton.draftq.mnemonic
=
K
radiobutton.duplex
=
Dubbelsidig
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
H
\u
00F6g
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
Liggande
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
Monokrom
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
Normal
radiobutton.normalq.mnemonic
=
O
radiobutton.oneside
=
Ensidig
radiobutton.oneside.mnemonic
=
E
radiobutton.portrait
=
St
\u
00E5ende
radiobutton.portrait.mnemonic
=
D
radiobutton.rangeall
=
Alla
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
Sidor
radiobutton.rangepages.mnemonic
=
D
radiobutton.revlandscape
=
Omv
\u
00E4nt liggande
radiobutton.revlandscape.mnemonic
=
G
radiobutton.revportrait
=
Omv
\u
00E4nt st
\u
00E5ende
radiobutton.revportrait.mnemonic
=
M
radiobutton.tumble
=
V
\u
00E4nd
radiobutton.tumble.mnemonic
=
V
radiobutton.color
=
F
\u
00E4r&g
radiobutton.draftq
=
Ut&kast
radiobutton.duplex
=
&Dubbelsidig
radiobutton.highq
=
&H
\u
00F6g
radiobutton.landscape
=
&Liggande
radiobutton.monochrome
=
&Monokrom
radiobutton.normalq
=
N&ormal
radiobutton.oneside
=
&Ensidig
radiobutton.portrait
=
St
\u
00E5en&de
radiobutton.rangeall
=
A&lla
radiobutton.rangepages
=
Si&dor
radiobutton.revlandscape
=
Omv
\u
00E4nt li&ggande
radiobutton.revportrait
=
O&mv
\u
00E4nt st
\u
00E5ende
radiobutton.tumble
=
&V
\u
00E4nd
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
Format
tab.appearance.vkMnemonic
=
70
tab.general
=
Allm
\u
00E4nt
tab.general.vkMnemonic
=
65
tab.pagesetup
=
Utskriftsformat
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
&Format
tab.general
=
&Allm
\u
00E4nt
tab.pagesetup
=
Ut&skriftsformat
#
error.pagerange
=
Ogiltigt sidintervall. Skriv in v
\u
00E4rdena igen (t ex 1-3,5,7-10)
error.destination
=
Ogiltigt filnamn. F
\u
00F6rs
\u
00F6k igen.
...
...
src/share/classes/sun/print/resources/serviceui_zh_CN.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=\u8FB9\u8DDD
button.cancel
=
\u
53D6
\u
6D88
button.ok
=
\u
786E
\u
5B9A
button.print
=
\u6253\u5370
button.properties
=
\u
5C5E
\u6027
(R)...
button.properties.mnemonic
=
R
button.properties
=
\u
5C5E
\u6027
(&R)...
#
checkbox.collate
=
\u9010\u
4EFD
\u6253\u5370
(C)
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
\u6807\u
5E1C
\u9875
(B)
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
\u6253\u5370\u5230\u6587\u
4EF6(F)
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
\u9010\u
4EFD
\u6253\u5370
(&C)
checkbox.jobsheets
=
\u6807\u
5E1C
\u9875
(&B)
checkbox.printtofile
=
\u6253\u5370\u5230\u6587\u
4EF6(&F)
#
dialog.printtitle
=
\u6253\u5370
dialog.pstitle
=
\u9875\u9762\u
8BBE
\u
7F6E
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=\u627E\u4E0D\u5230\u6253\u5370\u670D\u52A1\u3002
dialog.writeerror
=
\u
65E0
\u
6CD5
\u5199\u5165\u6587\u
4EF6:
#
label.info
=
\u
4FE1
\u
606F:
label.jobname
=
\u
4F5C
\u
4E1A
\u
540D(J):
label.jobname.mnemonic
=
J
label.numcopies
=
\u6253\u5370\u
4EFD
\u6570
(O):
label.numcopies.mnemonic
=
O
label.priority
=
\u
4F18
\u5148\u
7EA7(R):
label.priority.mnemonic
=
R
label.psname
=
\u
540D
\u
79F0(N):
label.psname.mnemonic
=
N
label.jobname
=
\u
4F5C
\u
4E1A
\u
540D(&J):
label.numcopies
=
\u6253\u5370\u
4EFD
\u6570
(&O):
label.priority
=
\u
4F18
\u5148\u
7EA7(&R):
label.psname
=
\u
540D
\u
79F0(&N):
label.pstype
=
\u
7C7B
\u
578B:
label.rangeto
=
\u
81F3
label.size
=
\u5927\u
5C0F(Z):
label.size.mnemonic
=
Z
label.source
=
\u6765\u
6E90(C):
label.source.mnemonic
=
C
label.size
=
\u5927\u
5C0F(&Z):
label.source
=
\u6765\u
6E90(&C):
label.status
=
\u
72B6
\u6001
:
label.username
=
\u7528\u6237\u
540D(U):
label.username.mnemonic
=
U
label.username
=
\u7528\u6237\u
540D(&U):
label.millimetres
=
(
\u
6BEB
\u
7C73)
label.inches
=
(
\u
82F1
\u
5BF8)
label.topmargin
=
\u
4E0A
\u
8FB9
\u
8DDD(T)
label.topmargin.mnemonic
=
T
label.bottommargin
=
\u
4E0B
\u
8FB9
\u
8DDD(B)
label.bottommargin.mnemonic
=
B
label.leftmargin
=
\u
5DE6
\u
8FB9
\u
8DDD(F)
label.leftmargin.mnemonic
=
F
label.rightmargin
=
\u
53F3
\u
8FB9
\u
8DDD(R)
label.rightmargin.mnemonic
=
R
label.topmargin
=
\u
4E0A
\u
8FB9
\u
8DDD(&T)
label.bottommargin
=
\u
4E0B
\u
8FB9
\u
8DDD(&B)
label.leftmargin
=
\u
5DE6
\u
8FB9
\u
8DDD(&F)
label.rightmargin
=
\u
53F3
\u
8FB9
\u
8DDD(&R)
#
radiobutton.color
=
\u
989C
\u8272
(C)
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
\u8349\u
56FE(F)
radiobutton.draftq.mnemonic
=
F
radiobutton.duplex
=
\u
53CC
\u9762\u6253\u5370
(D)
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
\u
9AD8(H)
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
\u
6A2A
\u5411
(L)
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
\u5355\u8272
(M)
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
\u
6B63
\u
5E38(N)
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
\u5355\u9762
(O)
radiobutton.oneside.mnemonic
=
O
radiobutton.portrait
=
\u
7EB5
\u5411
(P)
radiobutton.portrait.mnemonic
=
P
radiobutton.rangeall
=
\u5168\u
90E8(L)
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
\u9875\u7801\u8303\u
56F4(E)
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
\u
6A2A
\u5411\u
53CD
\u9762\u6253\u5370
(N)
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
\u
7EB5
\u5411\u
53CD
\u9762\u6253\u5370
(I)
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
\u
7FFB
\u
8F6C(T)
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
\u
989C
\u8272
(&C)
radiobutton.draftq
=
\u8349\u
56FE(&F)
radiobutton.duplex
=
\u
53CC
\u9762\u6253\u5370
(&D)
radiobutton.highq
=
\u
9AD8(&H)
radiobutton.landscape
=
\u
6A2A
\u5411
(&L)
radiobutton.monochrome
=
\u5355\u8272
(&M)
radiobutton.normalq
=
\u
6B63
\u
5E38(&N)
radiobutton.oneside
=
\u5355\u9762
(&O)
radiobutton.portrait
=
\u
7EB5
\u5411
(&P)
radiobutton.rangeall
=
\u5168\u
90E8(&L)
radiobutton.rangepages
=
\u9875\u7801\u8303\u
56F4(&E)
radiobutton.revlandscape
=
\u
6A2A
\u5411\u
53CD
\u9762\u6253\u5370
(&N)
radiobutton.revportrait
=
\u
7EB5
\u5411\u
53CD
\u9762\u6253\u5370
(&I)
radiobutton.tumble
=
\u
7FFB
\u
8F6C(&T)
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
\u5916\u
89C2(A)
tab.appearance.vkMnemonic
=
65
tab.general
=
\u
4E00
\u
822C
\u
4FE1
\u
606F(G)
tab.general.vkMnemonic
=
71
tab.pagesetup
=
\u9875\u9762\u
8BBE
\u
7F6E(S)
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
\u5916\u
89C2(&A)
tab.general
=
\u
4E00
\u
822C
\u
4FE1
\u
606F(&G)
tab.pagesetup
=
\u9875\u9762\u
8BBE
\u
7F6E(&S)
#
error.pagerange
=
\u
65E0
\u6548\u7684\u9875\u9762\u8303\u
56F4;
\u
8BF7
\u
91CD
\u
65B0
\u
8F93
\u5165\u6570\u
503C (
\u
4F8B
\u5982
1-3,5,7-10)
error.destination
=
\u
65E0
\u6548\u7684\u6587\u
4EF6
\u
540D;
\u
8BF7
\u
91CD
\u
8BD5
...
...
src/share/classes/sun/print/resources/serviceui_zh_TW.properties
浏览文件 @
f0fa3444
...
...
@@ -14,15 +14,11 @@ border.margins=\u908A\u8DDD
button.cancel
=
\u
53D6
\u
6D88
button.ok
=
\u
78BA
\u
5B9A
button.print
=
\u5217\u5370
button.properties
=
\u7279\u6027
(R)...
button.properties.mnemonic
=
R
button.properties
=
\u7279\u6027
(&R)...
#
checkbox.collate
=
\u7406\u
5E8F(C)
checkbox.collate.mnemonic
=
C
checkbox.jobsheets
=
\u
6A19
\u
984C
\u9801
(B)
checkbox.jobsheets.mnemonic
=
B
checkbox.printtofile
=
\u5217\u5370\u
81F3
\u
6A94
\u6848
(F)
checkbox.printtofile.mnemonic
=
F
checkbox.collate
=
\u7406\u
5E8F(&C)
checkbox.jobsheets
=
\u
6A19
\u
984C
\u9801
(&B)
checkbox.printtofile
=
\u5217\u5370\u
81F3
\u
6A94
\u6848
(&F)
#
dialog.printtitle
=
\u5217\u5370
dialog.pstitle
=
\u9801\u9762\u
8A2D
\u
5B9A
...
...
@@ -33,70 +29,42 @@ dialog.noprintermsg=\u627E\u4E0D\u5230\u5217\u5370\u670D\u52D9\u3002
dialog.writeerror
=
\u7121\u
6CD5
\u
5BEB
\u5165\u
81F3
\u
6A94
\u6848
:
#
label.info
=
\u
8CC7
\u
8A0A:
label.jobname
=
\u
5DE5
\u
4F5C
\u
540D
\u
7A31(J):
label.jobname.mnemonic
=
J
label.numcopies
=
\u5217\u5370\u
4EFD
\u6578
(O):
label.numcopies.mnemonic
=
O
label.priority
=
\u
512A
\u5148\u
6B0A(R):
label.priority.mnemonic
=
R
label.psname
=
\u
540D
\u
7A31(N):
label.psname.mnemonic
=
N
label.jobname
=
\u
5DE5
\u
4F5C
\u
540D
\u
7A31(&J):
label.numcopies
=
\u5217\u5370\u
4EFD
\u6578
(&O):
label.priority
=
\u
512A
\u5148\u
6B0A(&R):
label.psname
=
\u
540D
\u
7A31(&N):
label.pstype
=
\u
985E
\u
578B:
label.rangeto
=
\u
81F3
label.size
=
\u5927\u
5C0F(Z):
label.size.mnemonic
=
Z
label.source
=
\u
4F86
\u
6E90(C):
label.source.mnemonic
=
C
label.size
=
\u5927\u
5C0F(&Z):
label.source
=
\u
4F86
\u
6E90(&C):
label.status
=
\u
72C0
\u
614B:
label.username
=
\u
4F7F
\u7528\u8005\u
540D
\u
7A31(U):
label.username.mnemonic
=
U
label.username
=
\u
4F7F
\u7528\u8005\u
540D
\u
7A31(&U):
label.millimetres
=
(mm)
label.inches
=
(in)
label.topmargin
=
\u9802\u
7AEF
\u
908A
\u
8DDD(T)
label.topmargin.mnemonic
=
T
label.bottommargin
=
\u
5E95
\u
90E8
\u
908A
\u
8DDD(B)
label.bottommargin.mnemonic
=
B
label.leftmargin
=
\u
5DE6
\u
908A
\u
8DDD(F)
label.leftmargin.mnemonic
=
F
label.rightmargin
=
\u
53F3
\u
908A
\u
8DDD(R)
label.rightmargin.mnemonic
=
R
label.topmargin
=
\u9802\u
7AEF
\u
908A
\u
8DDD(&T)
label.bottommargin
=
\u
5E95
\u
90E8
\u
908A
\u
8DDD(&B)
label.leftmargin
=
\u
5DE6
\u
908A
\u
8DDD(&F)
label.rightmargin
=
\u
53F3
\u
908A
\u
8DDD(&R)
#
radiobutton.color
=
\u
984F
\u8272
(C)
radiobutton.color.mnemonic
=
C
radiobutton.draftq
=
\u8349\u
7A3F(F)
radiobutton.draftq.mnemonic
=
F
radiobutton.duplex
=
\u
96D9
\u9762\u5217\u5370
(D)
radiobutton.duplex.mnemonic
=
D
radiobutton.highq
=
\u
9AD8(H)
radiobutton.highq.mnemonic
=
H
radiobutton.landscape
=
\u
6A6B
\u5411
(L)
radiobutton.landscape.mnemonic
=
L
radiobutton.monochrome
=
\u
55AE
\u8272
(M)
radiobutton.monochrome.mnemonic
=
M
radiobutton.normalq
=
\u
6B63
\u
5E38(N)
radiobutton.normalq.mnemonic
=
N
radiobutton.oneside
=
\u
55AE
\u9762
(O)
radiobutton.oneside.mnemonic
=
O
radiobutton.portrait
=
\u
76F4
\u5411
(P)
radiobutton.portrait.mnemonic
=
P
radiobutton.rangeall
=
\u5168\u
90E8(L)
radiobutton.rangeall.mnemonic
=
L
radiobutton.rangepages
=
\u9801\u9762
(E)
radiobutton.rangepages.mnemonic
=
E
radiobutton.revlandscape
=
\u
53CD
\u5411\u
6A6B
\u5370
(N)
radiobutton.revlandscape.mnemonic
=
N
radiobutton.revportrait
=
\u
53CD
\u5411\u
76F4
\u5370
(I)
radiobutton.revportrait.mnemonic
=
I
radiobutton.tumble
=
\u
7FFB
\u
8F49(T)
radiobutton.tumble.mnemonic
=
T
radiobutton.color
=
\u
984F
\u8272
(&C)
radiobutton.draftq
=
\u8349\u
7A3F(&F)
radiobutton.duplex
=
\u
96D9
\u9762\u5217\u5370
(&D)
radiobutton.highq
=
\u
9AD8(&H)
radiobutton.landscape
=
\u
6A6B
\u5411
(&L)
radiobutton.monochrome
=
\u
55AE
\u8272
(&M)
radiobutton.normalq
=
\u
6B63
\u
5E38(&N)
radiobutton.oneside
=
\u
55AE
\u9762
(&O)
radiobutton.portrait
=
\u
76F4
\u5411
(&P)
radiobutton.rangeall
=
\u5168\u
90E8(&L)
radiobutton.rangepages
=
\u9801\u9762
(&E)
radiobutton.revlandscape
=
\u
53CD
\u5411\u
6A6B
\u5370
(&N)
radiobutton.revportrait
=
\u
53CD
\u5411\u
76F4
\u5370
(&I)
radiobutton.tumble
=
\u
7FFB
\u
8F49(&T)
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
# 65 = KeyEvent.VK_A
tab.appearance
=
\u5916\u
89C0(A)
tab.appearance.vkMnemonic
=
65
tab.general
=
\u
4E00
\u
822C(G)
tab.general.vkMnemonic
=
71
tab.pagesetup
=
\u9801\u9762\u
8A2D
\u
5B9A(S)
tab.pagesetup.vkMnemonic
=
83
tab.appearance
=
\u5916\u
89C0(&A)
tab.general
=
\u
4E00
\u
822C(&G)
tab.pagesetup
=
\u9801\u9762\u
8A2D
\u
5B9A(&S)
#
error.pagerange
=
\u7121\u6548\u7684\u9801\u9762\u
7BC4
\u
570D;
\u
8ACB
\u
91CD
\u
65B0
\u
8F38
\u5165\u6578\u
503C (
\u
4F8B
\u5982
1-3,5,7-10)
error.destination
=
\u7121\u6548\u7684\u
6A94
\u
540D;
\u
8ACB
\u
518D
\u
8A66
\u
4E00
\u
6B21
...
...
src/share/classes/sun/util/logging/PlatformLogger.java
浏览文件 @
f0fa3444
...
...
@@ -516,6 +516,9 @@ public class PlatformLogger {
}
void
doLog
(
int
level
,
String
msg
,
Object
...
params
)
{
if
(!
isLoggable
(
level
))
{
return
;
}
// only pass String objects to the j.u.l.Logger which may
// be created by untrusted code
int
len
=
(
params
!=
null
)
?
params
.
length
:
0
;
...
...
src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
浏览文件 @
f0fa3444
...
...
@@ -657,10 +657,13 @@ class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
}
// TODO : fix this duplicate code
class
XAWTCaret
extends
DefaultCaret
{
static
class
XAWTCaret
extends
DefaultCaret
{
public
void
focusGained
(
FocusEvent
e
)
{
super
.
focusGained
(
e
);
if
(
getComponent
().
isEnabled
()){
// Make sure the cursor is visible in case of non-editable TextArea
super
.
setVisible
(
true
);
}
getComponent
().
repaint
();
}
...
...
src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
浏览文件 @
f0fa3444
...
...
@@ -578,31 +578,7 @@ public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
}
protected
Caret
createCaret
()
{
return
new
XAWTCaret
();
}
}
class
XAWTCaret
extends
DefaultCaret
{
public
void
focusGained
(
FocusEvent
e
)
{
super
.
focusGained
(
e
);
getComponent
().
repaint
();
}
public
void
focusLost
(
FocusEvent
e
)
{
super
.
focusLost
(
e
);
getComponent
().
repaint
();
}
// Fix for 5100950: textarea.getSelectedText() returns the de-selected text, on XToolkit
// Restoring Motif behaviour
// If the text is unhighlighted then we should sets the selection range to zero
public
void
setSelectionVisible
(
boolean
vis
)
{
if
(
vis
){
super
.
setSelectionVisible
(
vis
);
}
else
{
// In order to de-select the selection
setDot
(
getDot
());
}
return
new
XTextAreaPeer
.
XAWTCaret
();
}
}
...
...
test/java/awt/Frame/FrameStateTest/FrameStateTest.html
0 → 100644
浏览文件 @
f0fa3444
<!--
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.
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.
@test
@bug 4157271
@summary Checks that when a Frame is created it honors the state it
was set to. The bug was that if setState(Frame.ICONIFIED) was
called before setVisible(true) the Frame would be shown in NORMAL
state instead of ICONIFIED.
@author JTG East Team: area=awt.Frame
@run applet/manual=yesno FrameStateTest.html
-->
<html>
<head>
<title>
FrameStateTest
</title>
</head>
<body>
<h1>
FrameStateTest
<br>
Bug ID: 4157271
</h1>
<p>
This test checks that when setState(Frame.ICONIFIED) is called before
setVisible(true) the Frame is shown in the proper iconified state.
The problem was that it did not honor the initial iconic state, but
instead was shown in the NORMAL state.
</p>
<p>
See the dialog box (usually in upper left corner) for instructions
</p>
<APPLET
CODE=
"FrameStateTest.class"
WIDTH=
600
HEIGHT=
200
></APPLET>
</body>
</html>
test/java/awt/Frame/FrameStateTest/FrameStateTest.java
0 → 100644
浏览文件 @
f0fa3444
/*
* 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.
*
* 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.
*/
/*
test
@bug 4157271
@summary Checks that when a Frame is created it honors the state it
was set to. The bug was that if setState(Frame.ICONIFIED) was
called before setVisible(true) the Frame would be shown in NORMAL
state instead of ICONIFIED.
@author JTG East Team: area=awt.Frame
@run applet/manual=yesno FrameStateTest.html
*/
/**
* FrameStateTest.java
*
* summary: Checks that when setState(Frame.ICONIFIED) is called before
* setVisible(true) the Frame is shown in the proper iconified state.
* The problem was that it did not honor the initial iconic state, but
* instead was shown in the NORMAL state.
*/
import
java.awt.event.*
;
import
java.awt.*
;
import
java.lang.*
;
import
java.applet.Applet
;
public
class
FrameStateTest
extends
Applet
implements
ActionListener
,
ItemListener
{
Button
btnCreate
=
new
Button
(
"Create Frame"
);
Button
btnDispose
=
new
Button
(
"Dispose Frame"
);
CheckboxGroup
cbgState
=
new
CheckboxGroup
();
CheckboxGroup
cbgResize
=
new
CheckboxGroup
();
Checkbox
cbIconState
=
new
Checkbox
(
"Frame state ICONIFIED"
,
cbgState
,
false
);
Checkbox
cbNormState
=
new
Checkbox
(
"Frame state NORMAL"
,
cbgState
,
true
);
Checkbox
cbNonResize
=
new
Checkbox
(
"Frame Nonresizable"
,
cbgResize
,
false
);
Checkbox
cbResize
=
new
Checkbox
(
"Frame Resizable"
,
cbgResize
,
true
);
int
iState
=
0
;
boolean
bResize
=
true
;
CreateFrame
icontst
;
public
void
init
()
{
this
.
setLayout
(
new
BorderLayout
());
String
[]
instructions
=
{
"Steps to try to reproduce this problem:"
,
"When this test is run an Applet Viewer window will display. In the"
,
"Applet Viewer window select the different options for the Frame (i.e."
,
"{Normal, Non-resizalbe}, {Normal, Resizable}, {Iconified, Resizable},"
,
"{Iconified, Non-resizalbe}). After chosing the Frame's state click the"
,
"Create Frame button. After the Frame (Frame State Test (Window2)) comes"
,
"up make sure the proper behavior occurred (Frame shown in proper state)."
,
"Click the Dispose button to close the Frame. Do the above steps for all"
,
"the different Frame state combinations available. If you observe the"
,
"proper behavior the test has passed, Press the Pass button. Otherwise"
,
"the test has failed, Press the Fail button."
,
"Note: In Frame State Test (Window2) you can also chose the different"
,
"buttons to see different Frame behavior. An example of a problem that"
,
"has been seen, With the Frame nonresizable you can not iconify the Frame."
};
Sysout
.
createDialogWithInstructions
(
instructions
);
btnDispose
.
setEnabled
(
false
);
add
(
btnCreate
,
BorderLayout
.
NORTH
);
add
(
btnDispose
,
BorderLayout
.
SOUTH
);
Panel
p
=
new
Panel
(
new
GridLayout
(
0
,
1
));
p
.
add
(
cbIconState
);
p
.
add
(
cbResize
);
add
(
p
,
BorderLayout
.
WEST
);
p
=
new
Panel
(
new
GridLayout
(
0
,
1
));
p
.
add
(
cbNormState
);
p
.
add
(
cbNonResize
);
add
(
p
,
BorderLayout
.
EAST
);
// Add Listeners
btnDispose
.
addActionListener
(
this
);
btnCreate
.
addActionListener
(
this
);
cbNormState
.
addItemListener
(
this
);
cbResize
.
addItemListener
(
this
);
cbIconState
.
addItemListener
(
this
);
cbNonResize
.
addItemListener
(
this
);
resize
(
600
,
200
);
}
//End init()
public
void
actionPerformed
(
ActionEvent
evt
)
{
if
(
evt
.
getSource
()
==
btnCreate
)
{
btnCreate
.
setEnabled
(
false
);
btnDispose
.
setEnabled
(
true
);
icontst
=
new
CreateFrame
(
iState
,
bResize
);
icontst
.
show
();
}
else
if
(
evt
.
getSource
()
==
btnDispose
)
{
btnCreate
.
setEnabled
(
true
);
btnDispose
.
setEnabled
(
false
);
icontst
.
dispose
();
}
}
public
void
itemStateChanged
(
ItemEvent
evt
)
{
if
(
cbNormState
.
getState
())
iState
=
0
;
if
(
cbIconState
.
getState
())
iState
=
1
;
if
(
cbResize
.
getState
())
bResize
=
true
;
if
(
cbNonResize
.
getState
())
bResize
=
false
;
}
}
// class FrameStateTest
class
CreateFrame
extends
Frame
implements
ActionListener
,
WindowListener
{
static
int
e
=
0
;
static
int
u
=
0
;
static
int
p
=
0
;
static
int
i
=
0
;
static
int
v
=
0
;
Button
b1
,
b2
,
b3
,
b4
,
b5
,
b6
,
b7
;
boolean
resizable
=
true
;
boolean
iconic
=
false
;
String
name
=
"Frame State Test"
;
CreateFrame
(
int
iFrameState
,
boolean
bFrameResizable
)
{
setTitle
(
"Frame State Test (Window 2)"
);
if
(
iFrameState
==
1
)
{
iconic
=
true
;
}
if
(!(
bFrameResizable
))
{
resizable
=
false
;
}
System
.
out
.
println
(
"CREATING FRAME - Initially "
+
((
iconic
)
?
"ICONIFIED"
:
"NORMAL (NON-ICONIFIED)"
)
+
" and "
+
((
resizable
)
?
"RESIZABLE"
:
"NON-RESIZABLE"
)
);
Sysout
.
println
(
"CREATING FRAME - Initially "
+
((
iconic
)
?
"ICONIFIED"
:
"NORMAL (NON-ICONIFIED)"
)
+
" and "
+
((
resizable
)
?
"RESIZABLE"
:
"NON-RESIZABLE"
)
);
setLayout
(
new
FlowLayout
()
);
b1
=
new
Button
(
"resizable"
);
add
(
b1
);
b2
=
new
Button
(
"resize"
);
add
(
b2
);
b3
=
new
Button
(
"iconify"
);
add
(
b3
);
b4
=
new
Button
(
"iconify and restore"
);
add
(
b4
);
b5
=
new
Button
(
"hide and show"
);
add
(
b5
);
b6
=
new
Button
(
"hide, iconify and show"
);
add
(
b6
);
b7
=
new
Button
(
"hide, iconify, show, and restore"
);
add
(
b7
);
b1
.
addActionListener
(
this
);
b2
.
addActionListener
(
this
);
b3
.
addActionListener
(
this
);
b4
.
addActionListener
(
this
);
b5
.
addActionListener
(
this
);
b6
.
addActionListener
(
this
);
b7
.
addActionListener
(
this
);
addWindowListener
(
this
);
setBounds
(
100
,
2
,
200
,
200
);
setState
(
iconic
?
Frame
.
ICONIFIED
:
Frame
.
NORMAL
);
setResizable
(
resizable
);
pack
();
setVisible
(
true
);
}
public
void
actionPerformed
(
ActionEvent
e
)
{
if
(
e
.
getSource
()
==
b2
)
{
Rectangle
r
=
this
.
getBounds
();
r
.
width
+=
10
;
System
.
out
.
println
(
" - button pressed - setting bounds on Frame to: "
+
r
);
setBounds
(
r
);
validate
();
}
else
if
(
e
.
getSource
()
==
b1
)
{
resizable
=
!
resizable
;
System
.
out
.
println
(
" - button pressed - setting Resizable to: "
+
resizable
);
((
Frame
)(
b1
.
getParent
())).
setResizable
(
resizable
);
}
else
if
(
e
.
getSource
()
==
b3
)
{
System
.
out
.
println
(
" - button pressed - setting Iconic: "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setState
(
Frame
.
ICONIFIED
);
dolog
();
}
else
if
(
e
.
getSource
()
==
b4
)
{
System
.
out
.
println
(
" - button pressed - setting Iconic: "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setState
(
Frame
.
ICONIFIED
);
dolog
();
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - now restoring: "
);
((
Frame
)(
b1
.
getParent
())).
setState
(
Frame
.
NORMAL
);
dolog
();
}
else
if
(
e
.
getSource
()
==
b5
)
{
System
.
out
.
println
(
" - button pressed - hiding : "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setVisible
(
false
);
dolog
();
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - now reshowing: "
);
((
Frame
)(
b1
.
getParent
())).
setVisible
(
true
);
dolog
();
}
else
if
(
e
.
getSource
()
==
b6
)
{
System
.
out
.
println
(
" - button pressed - hiding : "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setVisible
(
false
);
dolog
();
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - setting Iconic: "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setState
(
Frame
.
ICONIFIED
);
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - now reshowing: "
);
((
Frame
)(
b1
.
getParent
())).
setVisible
(
true
);
dolog
();
}
else
if
(
e
.
getSource
()
==
b7
)
{
System
.
out
.
println
(
" - button pressed - hiding : "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setVisible
(
false
);
dolog
();
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - setting Iconic: "
);
dolog
();
((
Frame
)(
b1
.
getParent
())).
setState
(
Frame
.
ICONIFIED
);
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - now reshowing: "
);
((
Frame
)(
b1
.
getParent
())).
setVisible
(
true
);
dolog
();
try
{
Thread
.
sleep
(
1000
);
}
catch
(
Exception
ex
)
{};
System
.
out
.
println
(
" - now restoring: "
);
((
Frame
)(
b1
.
getParent
())).
setState
(
Frame
.
NORMAL
);
dolog
();
}
}
public
void
windowActivated
(
WindowEvent
e
)
{
System
.
out
.
println
(
name
+
" Activated"
);
dolog
();
}
public
void
windowClosed
(
WindowEvent
e
)
{
System
.
out
.
println
(
name
+
" Closed"
);
dolog
();
}
public
void
windowClosing
(
WindowEvent
e
)
{
((
Window
)(
e
.
getSource
())).
dispose
();
System
.
out
.
println
(
name
+
" Closing"
);
dolog
();
}
public
void
windowDeactivated
(
WindowEvent
e
)
{
System
.
out
.
println
(
name
+
" Deactivated"
);
dolog
();
}
public
void
windowDeiconified
(
WindowEvent
e
)
{
System
.
out
.
println
(
name
+
" Deiconified"
);
dolog
();
}
public
void
windowIconified
(
WindowEvent
e
)
{
System
.
out
.
println
(
name
+
" Iconified"
);
dolog
();
}
public
void
windowOpened
(
WindowEvent
e
)
{
System
.
out
.
println
(
name
+
" Opened"
);
dolog
();
}
public
void
dolog
()
{
System
.
out
.
println
(
" getState returns: "
+
getState
());
}
}
// }// class FrameStateTest
/****************************************************
Standard Test Machinery
DO NOT modify anything below -- it's a standard
chunk of code whose purpose is to make user
interaction uniform, and thereby make it simpler
to read and understand someone else's test.
****************************************************/
/**
This is part of the standard test machinery.
It creates a dialog (with the instructions), and is the interface
for sending text messages to the user.
To print the instructions, send an array of strings to Sysout.createDialog
WithInstructions method. Put one line of instructions per array entry.
To display a message for the tester to see, simply call Sysout.println
with the string to be displayed.
This mimics System.out.println but works within the test harness as well
as standalone.
*/
class
Sysout
{
private
static
TestDialog
dialog
;
public
static
void
createDialogWithInstructions
(
String
[]
instructions
)
{
dialog
=
new
TestDialog
(
new
Frame
(),
"Instructions"
);
dialog
.
printInstructions
(
instructions
);
dialog
.
show
();
println
(
"Any messages for the tester will display here."
);
}
public
static
void
createDialog
(
)
{
dialog
=
new
TestDialog
(
new
Frame
(),
"Instructions"
);
String
[]
defInstr
=
{
"Instructions will appear here. "
,
""
}
;
dialog
.
printInstructions
(
defInstr
);
dialog
.
show
();
println
(
"Any messages for the tester will display here."
);
}
public
static
void
printInstructions
(
String
[]
instructions
)
{
dialog
.
printInstructions
(
instructions
);
}
public
static
void
println
(
String
messageIn
)
{
dialog
.
displayMessage
(
messageIn
);
}
}
// Sysout class
/**
This is part of the standard test machinery. It provides a place for the
test instructions to be displayed, and a place for interactive messages
to the user to be displayed.
To have the test instructions displayed, see Sysout.
To have a message to the user be displayed, see Sysout.
Do not call anything in this dialog directly.
*/
class
TestDialog
extends
Dialog
{
TextArea
instructionsText
;
TextArea
messageText
;
int
maxStringLength
=
80
;
//DO NOT call this directly, go through Sysout
public
TestDialog
(
Frame
frame
,
String
name
)
{
super
(
frame
,
name
);
int
scrollBoth
=
TextArea
.
SCROLLBARS_BOTH
;
int
scrollNone
=
TextArea
.
SCROLLBARS_NONE
;
instructionsText
=
new
TextArea
(
""
,
15
,
maxStringLength
,
scrollBoth
);
add
(
"North"
,
instructionsText
);
messageText
=
new
TextArea
(
""
,
10
,
maxStringLength
,
scrollBoth
);
add
(
"South"
,
messageText
);
pack
();
show
();
}
// TestDialog()
//DO NOT call this directly, go through Sysout
public
void
printInstructions
(
String
[]
instructions
)
{
//Clear out any current instructions
instructionsText
.
setText
(
""
);
//Go down array of instruction strings
String
printStr
,
remainingStr
;
for
(
int
i
=
0
;
i
<
instructions
.
length
;
i
++
)
{
//chop up each into pieces maxSringLength long
remainingStr
=
instructions
[
i
];
while
(
remainingStr
.
length
()
>
0
)
{
//if longer than max then chop off first max chars to print
if
(
remainingStr
.
length
()
>=
maxStringLength
)
{
//Try to chop on a word boundary
int
posOfSpace
=
remainingStr
.
lastIndexOf
(
' '
,
maxStringLength
-
1
);
if
(
posOfSpace
<=
0
)
posOfSpace
=
maxStringLength
-
1
;
printStr
=
remainingStr
.
substring
(
0
,
posOfSpace
+
1
);
remainingStr
=
remainingStr
.
substring
(
posOfSpace
+
1
);
}
//else just print
else
{
printStr
=
remainingStr
;
remainingStr
=
""
;
}
instructionsText
.
append
(
printStr
+
"\n"
);
}
// while
}
// for
}
//printInstructions()
//DO NOT call this directly, go through Sysout
public
void
displayMessage
(
String
messageIn
)
{
messageText
.
append
(
messageIn
+
"\n"
);
}
}
// TestDialog class
test/java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java
0 → 100644
浏览文件 @
f0fa3444
/*
* Copyright (c) 2005, 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.
*
* 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.
*/
/*
* @test
* @bug 7154048
* @summary Window created under a mouse does not receive mouse enter event.
* Mouse Entered/Exited events should be generated during dragging the window
* out of the frame and to the frame.
* @library ../../regtesthelpers
* @build Util
* @author alexandr.scherbatiy area=awt.event
* @run main DragWindowOutOfFrameTest
*/
import
java.awt.*
;
import
java.awt.event.*
;
import
javax.swing.*
;
import
java.util.concurrent.*
;
import
sun.awt.SunToolkit
;
import
test.java.awt.regtesthelpers.Util
;
public
class
DragWindowOutOfFrameTest
{
private
static
volatile
int
dragWindowMouseEnteredCount
=
0
;
private
static
volatile
int
dragWindowMouseExitedCount
=
0
;
private
static
volatile
int
dragWindowMouseReleasedCount
=
0
;
private
static
volatile
int
buttonMouseEnteredCount
=
0
;
private
static
volatile
int
buttonMouseExitedCount
=
0
;
private
static
volatile
int
labelMouseEnteredCount
=
0
;
private
static
volatile
int
labelMouseExitedCount
=
0
;
private
static
volatile
int
labelMouseReleasedCount
=
0
;
private
static
MyDragWindow
dragWindow
;
private
static
JLabel
label
;
private
static
JButton
button
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
Robot
robot
=
new
Robot
();
robot
.
setAutoDelay
(
50
);
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
createAndShowGUI
();
}
});
toolkit
.
realSync
();
Point
pointToClick
=
Util
.
invokeOnEDT
(
new
Callable
<
Point
>()
{
@Override
public
Point
call
()
throws
Exception
{
return
getCenterPoint
(
label
);
}
});
robot
.
mouseMove
(
pointToClick
.
x
,
pointToClick
.
y
);
robot
.
mousePress
(
InputEvent
.
BUTTON1_MASK
);
toolkit
.
realSync
();
if
(
dragWindowMouseEnteredCount
!=
1
&&
dragWindowMouseExitedCount
!=
0
)
{
throw
new
RuntimeException
(
"Wrong number mouse Entered/Exited events on Drag Window!"
);
}
Point
pointToDrag
=
Util
.
invokeOnEDT
(
new
Callable
<
Point
>()
{
@Override
public
Point
call
()
throws
Exception
{
label
.
addMouseListener
(
new
LabelMouseListener
());
button
.
addMouseListener
(
new
ButtonMouseListener
());
return
getCenterPoint
(
button
);
}
});
robot
.
mouseMove
(
450
,
pointToClick
.
y
);
toolkit
.
realSync
();
if
(
labelMouseEnteredCount
!=
0
&&
labelMouseExitedCount
!=
1
)
{
throw
new
RuntimeException
(
"Wrong number Mouse Entered/Exited events on label!"
);
}
robot
.
mouseMove
(
450
,
pointToDrag
.
y
);
toolkit
.
realSync
();
if
(
labelMouseEnteredCount
!=
0
&&
labelMouseExitedCount
!=
1
)
{
throw
new
RuntimeException
(
"Wrong number Mouse Entered/Exited events on label!"
);
}
if
(
buttonMouseEnteredCount
!=
0
&&
buttonMouseExitedCount
!=
0
)
{
throw
new
RuntimeException
(
"Wrong number Mouse Entered/Exited events on button!"
);
}
robot
.
mouseMove
(
pointToDrag
.
y
,
pointToDrag
.
y
);
toolkit
.
realSync
();
if
(
buttonMouseEnteredCount
!=
1
&&
buttonMouseExitedCount
!=
0
)
{
throw
new
RuntimeException
(
"Wrong number Mouse Entered/Exited events on button!"
);
}
robot
.
mouseRelease
(
InputEvent
.
BUTTON1_MASK
);
toolkit
.
realSync
();
if
(
labelMouseReleasedCount
!=
1
)
{
throw
new
RuntimeException
(
"No MouseReleased event on label!"
);
}
}
private
static
Point
getCenterPoint
(
Component
comp
)
{
Point
p
=
comp
.
getLocationOnScreen
();
Rectangle
rect
=
comp
.
getBounds
();
return
new
Point
(
p
.
x
+
rect
.
width
/
2
,
p
.
y
+
rect
.
height
/
2
);
}
private
static
void
createAndShowGUI
()
{
JFrame
frame
=
new
JFrame
(
"Main Frame"
);
frame
.
setLocation
(
100
,
100
);
frame
.
setSize
(
300
,
200
);
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
label
=
new
JLabel
(
"Label"
);
DragWindowCreationMouseListener
listener
=
new
DragWindowCreationMouseListener
(
frame
);
label
.
addMouseListener
(
listener
);
label
.
addMouseMotionListener
(
listener
);
button
=
new
JButton
(
"Button"
);
Panel
panel
=
new
Panel
(
new
BorderLayout
());
panel
.
add
(
label
,
BorderLayout
.
NORTH
);
panel
.
add
(
button
,
BorderLayout
.
CENTER
);
frame
.
getContentPane
().
add
(
panel
);
frame
.
setVisible
(
true
);
}
private
static
Point
getAbsoluteLocation
(
MouseEvent
e
)
{
return
new
Point
(
e
.
getXOnScreen
(),
e
.
getYOnScreen
());
}
static
class
MyDragWindow
extends
Window
{
public
MyDragWindow
(
Window
parent
,
Point
location
)
{
super
(
parent
);
setSize
(
500
,
300
);
setVisible
(
true
);
JPanel
panel
=
new
JPanel
();
add
(
panel
);
setLocation
(
location
.
x
-
250
,
location
.
y
-
150
);
addMouseListener
(
new
DragWindowMouseListener
());
}
void
dragTo
(
Point
point
)
{
setLocation
(
point
.
x
-
250
,
point
.
y
-
150
);
}
}
static
class
DragWindowCreationMouseListener
extends
MouseAdapter
{
Point
origin
;
Window
parent
;
public
DragWindowCreationMouseListener
(
Window
parent
)
{
this
.
parent
=
parent
;
}
@Override
public
void
mousePressed
(
MouseEvent
e
)
{
if
(
dragWindow
==
null
)
{
dragWindow
=
new
MyDragWindow
(
parent
,
getAbsoluteLocation
(
e
));
}
else
{
dragWindow
.
setVisible
(
true
);
dragWindow
.
dragTo
(
getAbsoluteLocation
(
e
));
}
}
@Override
public
void
mouseReleased
(
MouseEvent
e
)
{
labelMouseReleasedCount
++;
if
(
dragWindow
!=
null
)
{
dragWindow
.
setVisible
(
false
);
}
}
public
void
mouseDragged
(
MouseEvent
e
)
{
if
(
dragWindow
!=
null
)
{
dragWindow
.
dragTo
(
getAbsoluteLocation
(
e
));
}
}
}
static
class
DragWindowMouseListener
extends
MouseAdapter
{
@Override
public
void
mouseEntered
(
MouseEvent
e
)
{
dragWindowMouseEnteredCount
++;
}
@Override
public
void
mouseExited
(
MouseEvent
e
)
{
dragWindowMouseExitedCount
++;
}
@Override
public
void
mouseReleased
(
MouseEvent
e
)
{
dragWindowMouseReleasedCount
++;
}
}
static
class
LabelMouseListener
extends
MouseAdapter
{
@Override
public
void
mouseEntered
(
MouseEvent
e
)
{
labelMouseEnteredCount
++;
}
@Override
public
void
mouseExited
(
MouseEvent
e
)
{
labelMouseExitedCount
++;
}
}
static
class
ButtonMouseListener
extends
MouseAdapter
{
@Override
public
void
mouseEntered
(
MouseEvent
e
)
{
buttonMouseEnteredCount
++;
}
@Override
public
void
mouseExited
(
MouseEvent
e
)
{
buttonMouseExitedCount
++;
}
}
}
test/java/awt/Mouse/EnterExitEvents/DragWindowTest.java
0 → 100644
浏览文件 @
f0fa3444
/*
* Copyright (c) 2005, 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.
*
* 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.
*/
/*
* @test
* @bug 7154048
* @summary Window created under a mouse does not receive mouse enter event.
* Mouse Entered/Exited events are wrongly generated during dragging the window
* from one component to another
* @library ../../regtesthelpers
* @build Util
* @author alexandr.scherbatiy area=awt.event
* @run main DragWindowTest
*/
import
java.awt.*
;
import
java.awt.event.*
;
import
javax.swing.*
;
import
java.util.concurrent.*
;
import
sun.awt.SunToolkit
;
import
test.java.awt.regtesthelpers.Util
;
public
class
DragWindowTest
{
private
static
volatile
int
dragWindowMouseEnteredCount
=
0
;
private
static
volatile
int
dragWindowMouseReleasedCount
=
0
;
private
static
volatile
int
buttonMouseEnteredCount
=
0
;
private
static
volatile
int
labelMouseReleasedCount
=
0
;
private
static
MyDragWindow
dragWindow
;
private
static
JLabel
label
;
private
static
JButton
button
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
Robot
robot
=
new
Robot
();
robot
.
setAutoDelay
(
50
);
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
createAndShowGUI
();
}
});
toolkit
.
realSync
();
Point
pointToClick
=
Util
.
invokeOnEDT
(
new
Callable
<
Point
>()
{
@Override
public
Point
call
()
throws
Exception
{
return
getCenterPoint
(
label
);
}
});
robot
.
mouseMove
(
pointToClick
.
x
,
pointToClick
.
y
);
robot
.
mousePress
(
InputEvent
.
BUTTON1_MASK
);
toolkit
.
realSync
();
if
(
dragWindowMouseEnteredCount
!=
1
)
{
throw
new
RuntimeException
(
"No MouseEntered event on Drag Window!"
);
}
Point
pointToDrag
=
Util
.
invokeOnEDT
(
new
Callable
<
Point
>()
{
@Override
public
Point
call
()
throws
Exception
{
button
.
addMouseListener
(
new
ButtonMouseListener
());
return
getCenterPoint
(
button
);
}
});
robot
.
mouseMove
(
pointToDrag
.
x
,
pointToDrag
.
y
);
toolkit
.
realSync
();
if
(
buttonMouseEnteredCount
!=
0
)
{
throw
new
RuntimeException
(
"Extra MouseEntered event on button!"
);
}
robot
.
mouseRelease
(
InputEvent
.
BUTTON1_MASK
);
toolkit
.
realSync
();
if
(
labelMouseReleasedCount
!=
1
)
{
throw
new
RuntimeException
(
"No MouseReleased event on label!"
);
}
}
private
static
Point
getCenterPoint
(
Component
comp
)
{
Point
p
=
comp
.
getLocationOnScreen
();
Rectangle
rect
=
comp
.
getBounds
();
return
new
Point
(
p
.
x
+
rect
.
width
/
2
,
p
.
y
+
rect
.
height
/
2
);
}
private
static
void
createAndShowGUI
()
{
JFrame
frame
=
new
JFrame
(
"Main Frame"
);
frame
.
setSize
(
300
,
200
);
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
label
=
new
JLabel
(
"Label"
);
LabelMouseListener
listener
=
new
LabelMouseListener
(
frame
);
label
.
addMouseListener
(
listener
);
label
.
addMouseMotionListener
(
listener
);
button
=
new
JButton
(
"Button"
);
Panel
panel
=
new
Panel
(
new
BorderLayout
());
panel
.
add
(
label
,
BorderLayout
.
NORTH
);
panel
.
add
(
button
,
BorderLayout
.
CENTER
);
frame
.
getContentPane
().
add
(
panel
);
frame
.
setVisible
(
true
);
}
private
static
Point
getAbsoluteLocation
(
MouseEvent
e
)
{
return
new
Point
(
e
.
getXOnScreen
(),
e
.
getYOnScreen
());
}
static
class
MyDragWindow
extends
Window
{
static
int
d
=
30
;
public
MyDragWindow
(
Window
parent
,
Point
location
)
{
super
(
parent
);
setSize
(
150
,
150
);
setVisible
(
true
);
JPanel
panel
=
new
JPanel
();
add
(
panel
);
setLocation
(
location
.
x
-
d
,
location
.
y
-
d
);
addMouseListener
(
new
DragWindowMouseListener
());
}
void
dragTo
(
Point
point
)
{
setLocation
(
point
.
x
-
d
,
point
.
y
-
d
);
}
}
static
class
LabelMouseListener
extends
MouseAdapter
{
Point
origin
;
Window
parent
;
public
LabelMouseListener
(
Window
parent
)
{
this
.
parent
=
parent
;
}
@Override
public
void
mousePressed
(
MouseEvent
e
)
{
if
(
dragWindow
==
null
)
{
dragWindow
=
new
MyDragWindow
(
parent
,
getAbsoluteLocation
(
e
));
}
else
{
dragWindow
.
setVisible
(
true
);
dragWindow
.
dragTo
(
getAbsoluteLocation
(
e
));
}
}
@Override
public
void
mouseReleased
(
MouseEvent
e
)
{
labelMouseReleasedCount
++;
if
(
dragWindow
!=
null
)
{
dragWindow
.
setVisible
(
false
);
}
}
public
void
mouseDragged
(
MouseEvent
e
)
{
if
(
dragWindow
!=
null
)
{
dragWindow
.
dragTo
(
getAbsoluteLocation
(
e
));
}
}
}
static
class
DragWindowMouseListener
extends
MouseAdapter
{
@Override
public
void
mouseEntered
(
MouseEvent
e
)
{
dragWindowMouseEnteredCount
++;
}
@Override
public
void
mouseReleased
(
MouseEvent
e
)
{
dragWindowMouseReleasedCount
++;
}
}
static
class
ButtonMouseListener
extends
MouseAdapter
{
@Override
public
void
mouseEntered
(
MouseEvent
e
)
{
buttonMouseEnteredCount
++;
}
}
}
test/java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java
0 → 100644
浏览文件 @
f0fa3444
/*
* Copyright (c) 2005, 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.
*
* 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.
*/
/*
* @test
* @bug 7154048
* @summary Programmatically resized window does not receive mouse entered/exited events
* @author alexandr.scherbatiy area=awt.event
* @run main ResizingFrameTest
*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import
java.awt.*
;
import
java.awt.event.*
;
import
javax.swing.*
;
import
sun.awt.SunToolkit
;
public
class
ResizingFrameTest
{
private
static
volatile
int
mouseEnteredCount
=
0
;
private
static
volatile
int
mouseExitedCount
=
0
;
private
static
JFrame
frame
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
Robot
robot
=
new
Robot
();
robot
.
setAutoDelay
(
50
);
robot
.
mouseMove
(
100
,
100
);
// create a frame under the mouse cursor
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
createAndShowGUI
();
}
});
toolkit
.
realSync
();
if
(
mouseEnteredCount
!=
1
||
mouseExitedCount
!=
0
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// iconify frame
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setExtendedState
(
Frame
.
ICONIFIED
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
1
||
mouseExitedCount
!=
1
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// deiconify frame
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setExtendedState
(
Frame
.
NORMAL
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
2
||
mouseExitedCount
!=
1
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// move the mouse out of the frame
robot
.
mouseMove
(
500
,
500
);
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
2
||
mouseExitedCount
!=
2
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// maximize the frame
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setExtendedState
(
Frame
.
MAXIMIZED_BOTH
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
3
||
mouseExitedCount
!=
2
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// demaximize the frame
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setExtendedState
(
Frame
.
NORMAL
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
3
||
mouseExitedCount
!=
3
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// move the frame under the mouse
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setLocation
(
400
,
400
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
4
||
mouseExitedCount
!=
3
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// move the frame out of the mouse
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setLocation
(
100
,
100
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
400
);
if
(
mouseEnteredCount
!=
4
||
mouseExitedCount
!=
4
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// enlarge the frame bounds
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setBounds
(
100
,
100
,
800
,
800
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
200
);
if
(
mouseEnteredCount
!=
5
||
mouseExitedCount
!=
4
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
// make the frame bounds smaller
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
.
setBounds
(
100
,
100
,
200
,
300
);
}
});
toolkit
.
realSync
();
robot
.
delay
(
400
);
if
(
mouseEnteredCount
!=
5
||
mouseExitedCount
!=
5
)
{
throw
new
RuntimeException
(
"No Mouse Entered/Exited events!"
);
}
}
private
static
void
createAndShowGUI
()
{
frame
=
new
JFrame
(
"Main Frame"
);
frame
.
setSize
(
300
,
200
);
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
frame
.
addMouseListener
(
new
MouseAdapter
()
{
@Override
public
void
mouseEntered
(
MouseEvent
e
)
{
mouseEnteredCount
++;
}
@Override
public
void
mouseExited
(
MouseEvent
e
)
{
mouseExitedCount
++;
}
});
frame
.
setVisible
(
true
);
}
}
\ No newline at end of file
test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java
0 → 100644
浏览文件 @
f0fa3444
/*
* 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.
*
* 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.
*/
/*
* Portions Copyright (c) 2012 IBM Corporation
*/
/* @test
* @bug 7129742
* @summary Focus in non-editable TextArea is not shown on Linux.
* @author Sean Chou
*/
import
java.awt.FlowLayout
;
import
java.awt.TextArea
;
import
java.awt.Toolkit
;
import
java.lang.reflect.Field
;
import
javax.swing.JFrame
;
import
javax.swing.JTextArea
;
import
javax.swing.SwingUtilities
;
import
javax.swing.text.DefaultCaret
;
import
sun.awt.SunToolkit
;
public
class
bug7129742
{
public
static
DefaultCaret
caret
=
null
;
public
static
JFrame
frame
=
null
;
public
static
boolean
fastreturn
=
false
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
frame
=
new
JFrame
(
"Test"
);
TextArea
textArea
=
new
TextArea
(
"Non-editable textArea"
);
textArea
.
setEditable
(
false
);
frame
.
setLayout
(
new
FlowLayout
());
frame
.
add
(
textArea
);
frame
.
pack
();
frame
.
setVisible
(
true
);
try
{
Class
XTextAreaPeerClzz
=
textArea
.
getPeer
().
getClass
();
System
.
out
.
println
(
XTextAreaPeerClzz
.
getName
());
if
(!
XTextAreaPeerClzz
.
getName
().
equals
(
"sun.awt.X11.XTextAreaPeer"
))
{
fastreturn
=
true
;
return
;
}
Field
jtextField
=
XTextAreaPeerClzz
.
getDeclaredField
(
"jtext"
);
jtextField
.
setAccessible
(
true
);
JTextArea
jtext
=
(
JTextArea
)
jtextField
.
get
(
textArea
.
getPeer
());
caret
=
(
DefaultCaret
)
jtext
.
getCaret
();
textArea
.
requestFocusInWindow
();
}
catch
(
NoSuchFieldException
|
SecurityException
|
IllegalArgumentException
|
IllegalAccessException
e
)
{
/* These exceptions mean the implementation of XTextAreaPeer is
* changed, this testcase is not valid any more, fix it or remove.
*/
frame
.
dispose
();
throw
new
RuntimeException
(
"This testcase is not valid any more!"
);
}
}
});
toolkit
.
realSync
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
if
(
fastreturn
)
{
return
;
}
boolean
passed
=
caret
.
isActive
();
System
.
out
.
println
(
"is caret visible : "
+
passed
);
if
(!
passed
)
{
throw
new
RuntimeException
(
"The test for bug 71297422 failed"
);
}
}
finally
{
frame
.
dispose
();
}
}
});
}
}
test/java/awt/regtesthelpers/Util.java
浏览文件 @
f0fa3444
...
...
@@ -600,4 +600,34 @@ public final class Util {
time
,
printEvent
);
}
/**
* Invokes the <code>task</code> on the EDT thread.
*
* @return result of the <code>task</code>
*/
public
static
<
T
>
T
invokeOnEDT
(
final
java
.
util
.
concurrent
.
Callable
<
T
>
task
)
throws
Exception
{
final
java
.
util
.
List
<
T
>
result
=
new
java
.
util
.
ArrayList
<
T
>(
1
);
final
Exception
[]
exception
=
new
Exception
[
1
];
javax
.
swing
.
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
result
.
add
(
task
.
call
());
}
catch
(
Exception
e
)
{
exception
[
0
]
=
e
;
}
}
});
if
(
exception
[
0
]
!=
null
)
{
throw
exception
[
0
];
}
return
result
.
get
(
0
);
}
}
test/javax/swing/JComponent/7154030/bug7154030.java
0 → 100644
浏览文件 @
f0fa3444
/*
* 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.
*
* 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.
*/
/*
* Portions Copyright (c) 2012 IBM Corporation
*/
import
javax.swing.JButton
;
import
javax.swing.JDesktopPane
;
import
javax.swing.JFrame
;
import
javax.swing.SwingUtilities
;
import
sun.awt.SunToolkit
;
import
java.awt.AWTException
;
import
java.awt.AlphaComposite
;
import
java.awt.Color
;
import
java.awt.Graphics
;
import
java.awt.Graphics2D
;
import
java.awt.Rectangle
;
import
java.awt.Robot
;
import
java.awt.Toolkit
;
import
java.awt.image.BufferedImage
;
/* @test 1.1 2012/04/12
* @bug 7154030
* @summary Swing components fail to hide after calling hide()
* @author Jonathan Lu
* @library ../../regtesthelpers/
* @build Util
* @run main bug7154030
*/
public
class
bug7154030
{
private
static
JButton
button
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
BufferedImage
imageInit
=
null
;
BufferedImage
imageShow
=
null
;
BufferedImage
imageHide
=
null
;
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
Robot
robot
=
new
Robot
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
JDesktopPane
desktop
=
new
JDesktopPane
();
button
=
new
JButton
(
"button"
);
JFrame
frame
=
new
JFrame
();
button
.
setSize
(
200
,
200
);
button
.
setLocation
(
100
,
100
);
button
.
setForeground
(
Color
.
RED
);
button
.
setBackground
(
Color
.
RED
);
button
.
setOpaque
(
true
);
button
.
setVisible
(
false
);
desktop
.
add
(
button
);
frame
.
setContentPane
(
desktop
);
frame
.
setSize
(
300
,
300
);
frame
.
setLocation
(
0
,
0
);
frame
.
setVisible
(
true
);
frame
.
setDefaultCloseOperation
(
JFrame
.
DISPOSE_ON_CLOSE
);
}
});
toolkit
.
realSync
();
imageInit
=
robot
.
createScreenCapture
(
new
Rectangle
(
0
,
0
,
300
,
300
));
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
button
.
show
();
}
});
toolkit
.
realSync
();
imageShow
=
robot
.
createScreenCapture
(
new
Rectangle
(
0
,
0
,
300
,
300
));
if
(
Util
.
compareBufferedImages
(
imageInit
,
imageShow
))
{
throw
new
Exception
(
"Failed to show opaque button"
);
}
toolkit
.
realSync
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
button
.
hide
();
}
});
toolkit
.
realSync
();
imageHide
=
robot
.
createScreenCapture
(
new
Rectangle
(
0
,
0
,
300
,
300
));
if
(!
Util
.
compareBufferedImages
(
imageInit
,
imageHide
))
{
throw
new
Exception
(
"Failed to hide opaque button"
);
}
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
button
.
setOpaque
(
false
);
button
.
setBackground
(
new
Color
(
128
,
128
,
0
));
button
.
setVisible
(
false
);
}
});
toolkit
.
realSync
();
imageInit
=
robot
.
createScreenCapture
(
new
Rectangle
(
0
,
0
,
300
,
300
));
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
button
.
show
();
}
});
toolkit
.
realSync
();
imageShow
=
robot
.
createScreenCapture
(
new
Rectangle
(
0
,
0
,
300
,
300
));
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
@Override
public
void
run
()
{
button
.
hide
();
}
});
if
(
Util
.
compareBufferedImages
(
imageInit
,
imageShow
))
{
throw
new
Exception
(
"Failed to show non-opaque button"
);
}
toolkit
.
realSync
();
imageHide
=
robot
.
createScreenCapture
(
new
Rectangle
(
0
,
0
,
300
,
300
));
if
(!
Util
.
compareBufferedImages
(
imageInit
,
imageHide
))
{
throw
new
Exception
(
"Failed to hide non-opaque button"
);
}
}
}
test/javax/swing/JTable/7055065/bug7055065.java
0 → 100644
浏览文件 @
f0fa3444
/*
* 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.
*
* 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.
*/
/*
* Portions Copyright (c) 2012 IBM Corporation
*/
/* @test 1.1 2012/04/19
* @bug 7055065
* @summary NullPointerException when sorting JTable with empty cell
* @author Jonathan Lu
* @library ../../regtesthelpers/
* @build Util
* @run main bug7055065
*/
import
java.awt.Dimension
;
import
java.awt.Point
;
import
java.awt.Rectangle
;
import
java.awt.Robot
;
import
java.awt.Toolkit
;
import
java.awt.event.InputEvent
;
import
java.awt.event.KeyEvent
;
import
javax.swing.JFrame
;
import
javax.swing.JPanel
;
import
javax.swing.JScrollPane
;
import
javax.swing.JTable
;
import
javax.swing.SwingUtilities
;
import
javax.swing.table.AbstractTableModel
;
import
javax.swing.table.TableModel
;
import
javax.swing.table.TableRowSorter
;
import
sun.awt.SunToolkit
;
import
java.util.concurrent.Callable
;
public
class
bug7055065
{
private
static
JTable
table
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
Robot
robot
=
new
Robot
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
public
void
run
()
{
createAndShowUI
();
}
});
toolkit
.
realSync
();
clickCell
(
robot
,
1
,
1
);
Util
.
hitKeys
(
robot
,
KeyEvent
.
VK_BACK_SPACE
,
KeyEvent
.
VK_BACK_SPACE
,
KeyEvent
.
VK_BACK_SPACE
);
toolkit
.
realSync
();
clickColumnHeader
(
robot
,
1
);
toolkit
.
realSync
();
clickColumnHeader
(
robot
,
1
);
}
private
static
void
clickCell
(
Robot
robot
,
final
int
row
,
final
int
column
)
throws
Exception
{
Point
point
=
Util
.
invokeOnEDT
(
new
Callable
<
Point
>()
{
@Override
public
Point
call
()
throws
Exception
{
Rectangle
rect
=
table
.
getCellRect
(
row
,
column
,
false
);
Point
point
=
new
Point
(
rect
.
x
+
rect
.
width
/
2
,
rect
.
y
+
rect
.
height
/
2
);
SwingUtilities
.
convertPointToScreen
(
point
,
table
);
return
point
;
}
});
robot
.
mouseMove
(
point
.
x
,
point
.
y
);
robot
.
mousePress
(
InputEvent
.
BUTTON1_MASK
);
robot
.
mouseRelease
(
InputEvent
.
BUTTON1_MASK
);
}
private
static
void
clickColumnHeader
(
Robot
robot
,
final
int
column
)
throws
Exception
{
Point
point
=
Util
.
invokeOnEDT
(
new
Callable
<
Point
>()
{
@Override
public
Point
call
()
throws
Exception
{
Rectangle
rect
=
table
.
getCellRect
(
0
,
column
,
false
);
int
headerHeight
=
table
.
getTableHeader
().
getHeight
();
Point
point
=
new
Point
(
rect
.
x
+
rect
.
width
/
2
,
rect
.
y
-
headerHeight
/
2
);
SwingUtilities
.
convertPointToScreen
(
point
,
table
);
return
point
;
}
});
robot
.
mouseMove
(
point
.
x
,
point
.
y
);
robot
.
mousePress
(
InputEvent
.
BUTTON1_MASK
);
robot
.
mouseRelease
(
InputEvent
.
BUTTON1_MASK
);
}
private
static
void
createAndShowUI
()
{
JFrame
frame
=
new
JFrame
(
"SimpleTableDemo"
);
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
JPanel
newContentPane
=
new
JPanel
();
newContentPane
.
setOpaque
(
true
);
frame
.
setContentPane
(
newContentPane
);
final
String
[]
columnNames
=
{
"String"
,
"Number"
};
final
Object
[][]
data
=
{
{
"aaaa"
,
new
Integer
(
1
)
},
{
"bbbb"
,
new
Integer
(
3
)
},
{
"cccc"
,
new
Integer
(
2
)
},
{
"dddd"
,
new
Integer
(
4
)
},
{
"eeee"
,
new
Integer
(
5
)
}
};
table
=
new
JTable
(
data
,
columnNames
);
table
.
setPreferredScrollableViewportSize
(
new
Dimension
(
500
,
400
));
table
.
setFillsViewportHeight
(
true
);
TableModel
dataModel
=
new
AbstractTableModel
()
{
public
int
getColumnCount
()
{
return
columnNames
.
length
;
}
public
int
getRowCount
()
{
return
data
.
length
;
}
public
Object
getValueAt
(
int
row
,
int
col
)
{
return
data
[
row
][
col
];
}
public
String
getColumnName
(
int
column
)
{
return
columnNames
[
column
];
}
public
Class
<?>
getColumnClass
(
int
c
)
{
return
getValueAt
(
0
,
c
).
getClass
();
}
public
boolean
isCellEditable
(
int
row
,
int
col
)
{
return
col
!=
5
;
}
public
void
setValueAt
(
Object
aValue
,
int
row
,
int
column
)
{
data
[
row
][
column
]
=
aValue
;
}
};
table
.
setModel
(
dataModel
);
TableRowSorter
<
TableModel
>
sorter
=
new
TableRowSorter
<
TableModel
>(
dataModel
);
table
.
setRowSorter
(
sorter
);
JScrollPane
scrollPane
=
new
JScrollPane
(
table
);
newContentPane
.
add
(
scrollPane
);
frame
.
pack
();
frame
.
setLocation
(
0
,
0
);
frame
.
setVisible
(
true
);
}
}
test/javax/swing/JTree/4908142/bug4908142.java
0 → 100644
浏览文件 @
f0fa3444
/*
* Copyright (c) 2009, 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.
*
* 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.
*/
/*
* @test
* @bug 4908142
* @summary JList doesn't handle search function appropriately
* @author Andrey Pikalev
* @library ../../regtesthelpers
* @build Util
* @run main bug4908142
*/
import
javax.swing.*
;
import
javax.swing.tree.*
;
import
java.awt.*
;
import
java.awt.event.*
;
import
java.util.concurrent.Callable
;
import
sun.awt.SunToolkit
;
public
class
bug4908142
{
private
static
JTree
tree
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SunToolkit
toolkit
=
(
SunToolkit
)
Toolkit
.
getDefaultToolkit
();
Robot
robot
=
new
Robot
();
robot
.
setAutoDelay
(
50
);
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
public
void
run
()
{
createAndShowGUI
();
}
});
toolkit
.
realSync
();
SwingUtilities
.
invokeAndWait
(
new
Runnable
()
{
public
void
run
()
{
tree
.
requestFocus
();
tree
.
setSelectionRow
(
0
);
}
});
toolkit
.
realSync
();
robot
.
keyPress
(
KeyEvent
.
VK_A
);
robot
.
keyRelease
(
KeyEvent
.
VK_A
);
robot
.
keyPress
(
KeyEvent
.
VK_A
);
robot
.
keyRelease
(
KeyEvent
.
VK_A
);
robot
.
keyPress
(
KeyEvent
.
VK_D
);
robot
.
keyRelease
(
KeyEvent
.
VK_D
);
toolkit
.
realSync
();
String
sel
=
Util
.
invokeOnEDT
(
new
Callable
<
String
>()
{
@Override
public
String
call
()
throws
Exception
{
return
tree
.
getLastSelectedPathComponent
().
toString
();
}
});
if
(!
"aad"
.
equals
(
sel
))
{
throw
new
Error
(
"The selected index should be \"aad\", but not "
+
sel
);
}
}
private
static
void
createAndShowGUI
()
{
JFrame
fr
=
new
JFrame
(
"Test"
);
fr
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
String
[]
data
=
{
"aaa"
,
"aab"
,
"aac"
,
"aad"
,
"ade"
,
"bba"
};
final
DefaultMutableTreeNode
root
=
new
DefaultMutableTreeNode
(
data
[
0
]);
for
(
int
i
=
1
;
i
<
data
.
length
;
i
++)
{
DefaultMutableTreeNode
node
=
new
DefaultMutableTreeNode
(
data
[
i
]);
root
.
add
(
node
);
}
tree
=
new
JTree
(
root
);
JScrollPane
sp
=
new
JScrollPane
(
tree
);
fr
.
getContentPane
().
add
(
sp
);
fr
.
setSize
(
200
,
200
);
fr
.
setVisible
(
true
);
}
}
test/tools/launcher/EnvironmentVariables.java
0 → 100644
浏览文件 @
f0fa3444
/*
* 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.
*
* 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.
*/
/*
* see TestSpecialArgs.java
* bug 7131021
* summary Checks for environment variables set by the launcher
* author anthony.petrov@oracle.com: area=launcher
*/
public
class
EnvironmentVariables
{
public
static
void
main
(
String
[]
args
)
{
if
(
args
.
length
!=
2
)
{
throw
new
RuntimeException
(
"ERROR: two command line arguments expected"
);
}
String
name
=
args
[
0
];
String
expect
=
args
[
1
];
String
key
=
null
;
if
(!
name
.
endsWith
(
"*"
))
{
key
=
name
;
}
else
{
name
=
name
.
split
(
"\\*"
)[
0
];
for
(
String
s
:
System
.
getenv
().
keySet
())
{
if
(
s
.
startsWith
(
name
))
{
if
(
key
==
null
)
{
key
=
s
;
}
else
{
System
.
err
.
println
(
"WARNING: more variables match: "
+
s
);
}
}
}
if
(
key
==
null
)
{
throw
new
RuntimeException
(
"ERROR: unable to find a match for: "
+
name
);
}
}
System
.
err
.
println
(
"Will check the variable named: '"
+
key
+
"' expecting the value: '"
+
expect
+
"'"
);
if
(!
System
.
getenv
().
containsKey
(
key
))
{
throw
new
RuntimeException
(
"ERROR: the variable '"
+
key
+
"' is not present in the environment"
);
}
if
(!
expect
.
equals
(
System
.
getenv
().
get
(
key
)))
{
throw
new
RuntimeException
(
"ERROR: expected: '"
+
expect
+
"', got: '"
+
System
.
getenv
().
get
(
key
)
+
"'"
);
}
for
(
String
x
:
args
)
{
System
.
err
.
print
(
x
+
" "
);
}
System
.
err
.
println
(
"-----> Passed!"
);
}
}
test/tools/launcher/TestHelper.java
浏览文件 @
f0fa3444
...
...
@@ -23,6 +23,7 @@
import
java.io.StringWriter
;
import
java.io.PrintWriter
;
import
java.util.Set
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.FileFilter
;
...
...
@@ -319,19 +320,28 @@ public class TestHelper {
}
static
TestResult
doExec
(
String
...
cmds
)
{
return
doExec
(
null
,
cmds
);
return
doExec
(
null
,
null
,
cmds
);
}
static
TestResult
doExec
(
Map
<
String
,
String
>
envToSet
,
String
...
cmds
)
{
return
doExec
(
envToSet
,
null
,
cmds
);
}
/*
* A method which executes a java cmd and returns the results in a container
*/
static
TestResult
doExec
(
Map
<
String
,
String
>
envToSet
,
String
...
cmds
)
{
static
TestResult
doExec
(
Map
<
String
,
String
>
envToSet
,
Set
<
String
>
envToRemove
,
String
...
cmds
)
{
String
cmdStr
=
""
;
for
(
String
x
:
cmds
)
{
cmdStr
=
cmdStr
.
concat
(
x
+
" "
);
}
ProcessBuilder
pb
=
new
ProcessBuilder
(
cmds
);
Map
<
String
,
String
>
env
=
pb
.
environment
();
if
(
envToRemove
!=
null
)
{
for
(
String
key
:
envToRemove
)
{
env
.
remove
(
key
);
}
}
if
(
envToSet
!=
null
)
{
env
.
putAll
(
envToSet
);
}
...
...
test/tools/launcher/TestSpecialArgs.java
0 → 100644
浏览文件 @
f0fa3444
/*
* 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.
*
* 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.
*/
/*
* @test
* @bug 7124089 7131021
* @summary Checks for MacOSX specific flags are accepted or rejected, and
* MacOSX platforms specific environment is consistent.
* @compile -XDignore.symbol.file TestSpecialArgs.java EnvironmentVariables.java
* @run main TestSpecialArgs
*/
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Map
;
import
java.util.Set
;
public
class
TestSpecialArgs
extends
TestHelper
{
public
static
void
main
(
String
...
args
)
{
final
Map
<
String
,
String
>
envMap
=
new
HashMap
<>();
envMap
.
put
(
"_JAVA_LAUNCHER_DEBUG"
,
"true"
);
TestResult
tr
=
doExec
(
envMap
,
javaCmd
,
"-XstartOnFirstThread"
,
"-version"
);
if
(
isMacOSX
)
{
if
(!
tr
.
contains
(
"In same thread"
))
{
System
.
out
.
println
(
tr
);
throw
new
RuntimeException
(
"Error: not running in the same thread ?"
);
}
if
(!
tr
.
isOK
())
{
System
.
out
.
println
(
tr
);
throw
new
RuntimeException
(
"Error: arg was rejected ????"
);
}
}
else
{
if
(
tr
.
isOK
())
{
System
.
out
.
println
(
tr
);
throw
new
RuntimeException
(
"Error: argument was accepted ????"
);
}
}
tr
=
doExec
(
javaCmd
,
"-Xdock:/tmp/not-available"
,
"-version"
);
if
(
isMacOSX
)
{
if
(!
tr
.
isOK
())
{
System
.
out
.
println
(
tr
);
throw
new
RuntimeException
(
"Error: arg was rejected ????"
);
}
}
else
{
if
(
tr
.
isOK
())
{
System
.
out
.
println
(
tr
);
throw
new
RuntimeException
(
"Error: argument was accepted ????"
);
}
}
// MacOSX specific tests ensue......
if
(!
isMacOSX
)
return
;
Set
<
String
>
envToRemove
=
new
HashSet
<>();
Map
<
String
,
String
>
map
=
System
.
getenv
();
for
(
String
s
:
map
.
keySet
())
{
if
(
s
.
startsWith
(
"JAVA_MAIN_CLASS_"
)
||
s
.
startsWith
(
"APP_NAME_"
)
||
s
.
startsWith
(
"APP_ICON_"
))
{
envToRemove
.
add
(
s
);
}
}
runTest
(
envToRemove
,
javaCmd
,
"-cp"
,
TEST_CLASSES_DIR
.
getAbsolutePath
(),
"EnvironmentVariables"
,
"JAVA_MAIN_CLASS_*"
,
"EnvironmentVariables"
);
runTest
(
envToRemove
,
javaCmd
,
"-cp"
,
TEST_CLASSES_DIR
.
getAbsolutePath
(),
"-Xdock:name=TestAppName"
,
"EnvironmentVariables"
,
"APP_NAME_*"
,
"TestAppName"
);
runTest
(
envToRemove
,
javaCmd
,
"-cp"
,
TEST_CLASSES_DIR
.
getAbsolutePath
(),
"-Xdock:icon=TestAppIcon"
,
"EnvironmentVariables"
,
"APP_ICON_*"
,
"TestAppIcon"
);
}
static
void
runTest
(
Set
<
String
>
envToRemove
,
String
...
args
)
{
TestResult
tr
=
doExec
(
null
,
envToRemove
,
args
);
if
(!
tr
.
isOK
())
{
System
.
err
.
println
(
tr
.
toString
());
throw
new
RuntimeException
(
"Test Fails"
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录