Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
30e5b7fd
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看板
提交
30e5b7fd
编写于
2月 05, 2013
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
c45a4f29
170a60e1
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
96 addition
and
92 deletion
+96
-92
src/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
...cosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
+15
-30
src/macosx/native/sun/awt/AWTWindow.m
src/macosx/native/sun/awt/AWTWindow.m
+3
-3
src/macosx/native/sun/awt/CDragSource.m
src/macosx/native/sun/awt/CDragSource.m
+5
-9
src/share/classes/java/awt/Component.java
src/share/classes/java/awt/Component.java
+16
-8
src/share/classes/java/awt/Container.java
src/share/classes/java/awt/Container.java
+23
-1
src/share/classes/javax/swing/JComponent.java
src/share/classes/javax/swing/JComponent.java
+18
-25
test/javax/swing/JSlider/4252173/bug4252173.java
test/javax/swing/JSlider/4252173/bug4252173.java
+6
-6
test/javax/swing/JSpinner/6532833/bug6532833.java
test/javax/swing/JSpinner/6532833/bug6532833.java
+6
-5
test/javax/swing/plaf/metal/MetalSliderUI/Test6657026.java
test/javax/swing/plaf/metal/MetalSliderUI/Test6657026.java
+4
-5
未找到文件。
src/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
浏览文件 @
30e5b7fd
...
@@ -88,40 +88,25 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
...
@@ -88,40 +88,25 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
DragGestureEvent
trigger
=
getTrigger
();
DragGestureEvent
trigger
=
getTrigger
();
InputEvent
triggerEvent
=
trigger
.
getTriggerEvent
();
InputEvent
triggerEvent
=
trigger
.
getTriggerEvent
();
Point
dragOrigin
=
trigger
.
getDragOrigin
(
);
Point
dragOrigin
=
new
Point
(
trigger
.
getDragOrigin
()
);
int
extModifiers
=
(
triggerEvent
.
getModifiers
()
|
triggerEvent
.
getModifiersEx
());
int
extModifiers
=
(
triggerEvent
.
getModifiers
()
|
triggerEvent
.
getModifiersEx
());
long
timestamp
=
triggerEvent
.
getWhen
();
long
timestamp
=
triggerEvent
.
getWhen
();
int
clickCount
=
((
triggerEvent
instanceof
MouseEvent
)
?
(((
MouseEvent
)
triggerEvent
).
getClickCount
())
:
1
);
int
clickCount
=
((
triggerEvent
instanceof
MouseEvent
)
?
(((
MouseEvent
)
triggerEvent
).
getClickCount
())
:
1
);
// Get drag source component and its peer:
Component
component
=
trigger
.
getComponent
();
Component
component
=
trigger
.
getComponent
();
Point
componentOffset
=
new
Point
();
// For a lightweight component traverse up the hierarchy to the root
ComponentPeer
peer
=
component
.
getPeer
();
Point
loc
=
component
.
getLocation
();
Component
rootComponent
=
component
;
// For a lightweight component traverse up the hierarchy to the first heavyweight
while
(!(
rootComponent
instanceof
Window
))
{
// which will be used as the ComponentModel for the native drag source.
dragOrigin
.
translate
(
loc
.
x
,
loc
.
y
);
if
(
component
.
isLightweight
())
{
rootComponent
=
rootComponent
.
getParent
();
Point
loc
=
component
.
getLocation
();
loc
=
rootComponent
.
getLocation
();
componentOffset
.
translate
(
loc
.
x
,
loc
.
y
);
for
(
Component
parent
=
component
.
getParent
();
parent
!=
null
;
parent
=
parent
.
getParent
())
{
if
(
parent
.
isLightweight
()
==
false
)
{
peer
=
parent
.
getPeer
();
break
;
}
loc
=
parent
.
getLocation
();
componentOffset
.
translate
(
loc
.
x
,
loc
.
y
);
}
}
}
// Make sure the drop target is a ComponentModel:
//It sure will be LWComponentPeer instance as rootComponent is a Window
if
(!(
peer
instanceof
LWComponentPeer
))
LWComponentPeer
peer
=
(
LWComponentPeer
)
rootComponent
.
getPeer
();
throw
new
IllegalArgumentException
(
"DragSource's peer must be a ComponentModel."
);
//Get a pointer to a native window
CPlatformWindow
platformWindow
=
(
CPlatformWindow
)
peer
.
getPlatformWindow
();
// Get model pointer (CButton.m and such) and its native peer:
LWComponentPeer
model
=
(
LWComponentPeer
)
peer
;
CPlatformWindow
platformWindow
=
(
CPlatformWindow
)
model
.
getPlatformWindow
();
long
nativeWindowPtr
=
platformWindow
.
getNSWindowPtr
();
long
nativeWindowPtr
=
platformWindow
.
getNSWindowPtr
();
// Get drag cursor:
// Get drag cursor:
...
@@ -155,7 +140,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
...
@@ -155,7 +140,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
try
{
try
{
// Create native dragging source:
// Create native dragging source:
final
long
nativeDragSource
=
createNativeDragSource
(
component
,
peer
,
nativeWindowPtr
,
transferable
,
triggerEvent
,
final
long
nativeDragSource
=
createNativeDragSource
(
component
,
peer
,
nativeWindowPtr
,
transferable
,
triggerEvent
,
(
int
)
(
dragOrigin
.
getX
()
+
componentOffset
.
x
),
(
int
)
(
dragOrigin
.
getY
()
+
componentOffset
.
y
),
extModifiers
,
(
int
)
(
dragOrigin
.
getX
()
),
(
int
)
(
dragOrigin
.
getY
()
),
extModifiers
,
clickCount
,
timestamp
,
cursor
,
fDragCImage
,
dragImageOffset
.
x
,
dragImageOffset
.
y
,
clickCount
,
timestamp
,
cursor
,
fDragCImage
,
dragImageOffset
.
x
,
dragImageOffset
.
y
,
getDragSourceContext
().
getSourceActions
(),
formats
,
formatMap
);
getDragSourceContext
().
getSourceActions
(),
formats
,
formatMap
);
...
@@ -165,8 +150,8 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
...
@@ -165,8 +150,8 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
setNativeContext
(
nativeDragSource
);
setNativeContext
(
nativeDragSource
);
CCursorManager
.
getInstance
().
startDrag
(
CCursorManager
.
getInstance
().
startDrag
(
(
int
)
(
dragOrigin
.
getX
()
+
componentOffset
.
x
),
(
int
)
(
dragOrigin
.
getX
()),
(
int
)
(
dragOrigin
.
getY
()
+
componentOffset
.
y
));
(
int
)
(
dragOrigin
.
getY
()));
}
}
catch
(
Exception
e
)
{
catch
(
Exception
e
)
{
...
...
src/macosx/native/sun/awt/AWTWindow.m
浏览文件 @
30e5b7fd
...
@@ -813,9 +813,9 @@ JNF_COCOA_ENTER(env);
...
@@ -813,9 +813,9 @@ JNF_COCOA_ENTER(env);
if
([
nsWindow
isKeyWindow
])
[
window
.
javaMenuBar
deactivate
];
if
([
nsWindow
isKeyWindow
])
[
window
.
javaMenuBar
deactivate
];
window
.
javaMenuBar
=
menuBar
;
window
.
javaMenuBar
=
menuBar
;
// if ([self
isKeyWindow]) {
if
([
nsWindow
isKeyWindow
])
{
[
CMenuBar
activate
:
window
.
javaMenuBar
modallyDisabled
:
NO
];
[
CMenuBar
activate
:
window
.
javaMenuBar
modallyDisabled
:
NO
];
//
}
}
}];
}];
JNF_COCOA_EXIT
(
env
);
JNF_COCOA_EXIT
(
env
);
...
...
src/macosx/native/sun/awt/CDragSource.m
浏览文件 @
30e5b7fd
...
@@ -443,9 +443,9 @@ static BOOL sNeedsEnter;
...
@@ -443,9 +443,9 @@ static BOOL sNeedsEnter;
NSGraphicsContext
*
graphicsContext
=
[
NSGraphicsContext
graphicsContextWithWindow
:
window
];
NSGraphicsContext
*
graphicsContext
=
[
NSGraphicsContext
graphicsContextWithWindow
:
window
];
// Convert mouse coordinates to NS:
// Convert mouse coordinates to NS:
NSPoint
location
=
NSMakePoint
(
fDragPos
.
x
,
fDragPos
.
y
)
;
NSPoint
eventLocation
=
[
fView
convertPoint
:
NSMakePoint
(
fDragPos
.
x
,
fDragPos
.
y
)
toView
:
nil
]
;
NSPoint
eventLocation
=
[
fView
convertPoint
:
location
toView
:
nil
]
;
eventLocation
.
y
=
[[
fView
window
]
frame
].
size
.
height
-
eventLocation
.
y
;
// Convert fTriggerEventTimeStamp to NS - AWTEvent.h defines UTC(nsEvent) as ((jlong)[event timestamp] * 1000):
// Convert fTriggerEventTimeStamp to NS - AWTEvent.h defines UTC(nsEvent) as ((jlong)[event timestamp] * 1000):
NSTimeInterval
timeStamp
=
fTriggerEventTimeStamp
/
1000
;
NSTimeInterval
timeStamp
=
fTriggerEventTimeStamp
/
1000
;
...
@@ -497,12 +497,9 @@ static BOOL sNeedsEnter;
...
@@ -497,12 +497,9 @@ static BOOL sNeedsEnter;
NSImage
*
dragImage
=
fDragImage
;
NSImage
*
dragImage
=
fDragImage
;
// Get drag origin and offset:
// Get drag origin and offset:
NSPoint
dragOrigin
;
NSPoint
dragOrigin
=
[
dragEvent
locationInWindow
];
dragOrigin
.
x
=
fDragPos
.
x
;
dragOrigin
.
y
=
fDragPos
.
y
;
dragOrigin
=
[
view
convertPoint
:[
dragEvent
locationInWindow
]
fromView
:
nil
];
dragOrigin
.
x
+=
fDragImageOffset
.
x
;
dragOrigin
.
x
+=
fDragImageOffset
.
x
;
dragOrigin
.
y
+=
[
dragImage
size
].
height
+
fDragImageOffset
.
y
;
dragOrigin
.
y
-=
fDragImageOffset
.
y
+
[
dragImage
size
].
height
;
// Drag offset values don't seem to matter:
// Drag offset values don't seem to matter:
NSSize
dragOffset
=
NSMakeSize
(
0
,
0
);
NSSize
dragOffset
=
NSMakeSize
(
0
,
0
);
...
@@ -516,7 +513,6 @@ static BOOL sNeedsEnter;
...
@@ -516,7 +513,6 @@ static BOOL sNeedsEnter;
DLog5
(
@" - drag image: %f, %f (%f x %f)"
,
fDragImageOffset
.
x
,
fDragImageOffset
.
y
,
[
dragImage
size
].
width
,
[
dragImage
size
].
height
);
DLog5
(
@" - drag image: %f, %f (%f x %f)"
,
fDragImageOffset
.
x
,
fDragImageOffset
.
y
,
[
dragImage
size
].
width
,
[
dragImage
size
].
height
);
DLog3
(
@" - event point (window) %f, %f"
,
[
dragEvent
locationInWindow
].
x
,
[
dragEvent
locationInWindow
].
y
);
DLog3
(
@" - event point (window) %f, %f"
,
[
dragEvent
locationInWindow
].
x
,
[
dragEvent
locationInWindow
].
y
);
DLog3
(
@" - drag point (view) %f, %f"
,
dragOrigin
.
x
,
dragOrigin
.
y
);
DLog3
(
@" - drag point (view) %f, %f"
,
dragOrigin
.
x
,
dragOrigin
.
y
);
// Set up the fDragKeyModifier, so we know if the operation has changed
// Set up the fDragKeyModifier, so we know if the operation has changed
// Set up the fDragMouseModifier, so we can |= it later (since CoreDrag doesn't tell us mouse states during a drag)
// Set up the fDragMouseModifier, so we can |= it later (since CoreDrag doesn't tell us mouse states during a drag)
fDragKeyModifiers
=
[
DnDUtilities
extractJavaExtKeyModifiersFromJavaExtModifiers
:
fModifiers
];
fDragKeyModifiers
=
[
DnDUtilities
extractJavaExtKeyModifiersFromJavaExtModifiers
:
fModifiers
];
...
...
src/share/classes/java/awt/Component.java
浏览文件 @
30e5b7fd
/*
/*
* Copyright (c) 1995, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -8994,7 +8994,10 @@ public abstract class Component implements ImageObserver, MenuContainer,
...
@@ -8994,7 +8994,10 @@ public abstract class Component implements ImageObserver, MenuContainer,
* to the individual objects which extend Component.
* to the individual objects which extend Component.
*/
*/
AccessibleContext
accessibleContext
=
null
;
/**
* The {@code AccessibleContext} associated with this {@code Component}.
*/
protected
AccessibleContext
accessibleContext
=
null
;
/**
/**
* Gets the <code>AccessibleContext</code> associated
* Gets the <code>AccessibleContext</code> associated
...
@@ -9034,6 +9037,13 @@ public abstract class Component implements ImageObserver, MenuContainer,
...
@@ -9034,6 +9037,13 @@ public abstract class Component implements ImageObserver, MenuContainer,
protected
AccessibleAWTComponent
()
{
protected
AccessibleAWTComponent
()
{
}
}
/**
* Number of PropertyChangeListener objects registered. It's used
* to add/remove ComponentListener and FocusListener to track
* target Component's state.
*/
private
volatile
transient
int
propertyListenersCount
=
0
;
protected
ComponentListener
accessibleAWTComponentHandler
=
null
;
protected
ComponentListener
accessibleAWTComponentHandler
=
null
;
protected
FocusListener
accessibleAWTFocusHandler
=
null
;
protected
FocusListener
accessibleAWTFocusHandler
=
null
;
...
@@ -9098,10 +9108,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
...
@@ -9098,10 +9108,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
public
void
addPropertyChangeListener
(
PropertyChangeListener
listener
)
{
public
void
addPropertyChangeListener
(
PropertyChangeListener
listener
)
{
if
(
accessibleAWTComponentHandler
==
null
)
{
if
(
accessibleAWTComponentHandler
==
null
)
{
accessibleAWTComponentHandler
=
new
AccessibleAWTComponentHandler
();
accessibleAWTComponentHandler
=
new
AccessibleAWTComponentHandler
();
Component
.
this
.
addComponentListener
(
accessibleAWTComponentHandler
);
}
}
if
(
accessibleAWTFocusHandler
==
null
)
{
if
(
accessibleAWTFocusHandler
==
null
)
{
accessibleAWTFocusHandler
=
new
AccessibleAWTFocusHandler
();
accessibleAWTFocusHandler
=
new
AccessibleAWTFocusHandler
();
}
if
(
propertyListenersCount
++
==
0
)
{
Component
.
this
.
addComponentListener
(
accessibleAWTComponentHandler
);
Component
.
this
.
addFocusListener
(
accessibleAWTFocusHandler
);
Component
.
this
.
addFocusListener
(
accessibleAWTFocusHandler
);
}
}
super
.
addPropertyChangeListener
(
listener
);
super
.
addPropertyChangeListener
(
listener
);
...
@@ -9115,13 +9127,9 @@ public abstract class Component implements ImageObserver, MenuContainer,
...
@@ -9115,13 +9127,9 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @param listener The PropertyChangeListener to be removed
* @param listener The PropertyChangeListener to be removed
*/
*/
public
void
removePropertyChangeListener
(
PropertyChangeListener
listener
)
{
public
void
removePropertyChangeListener
(
PropertyChangeListener
listener
)
{
if
(
accessibleAWTComponentHandler
!=
null
)
{
if
(
--
propertyListenersCount
==
0
)
{
Component
.
this
.
removeComponentListener
(
accessibleAWTComponentHandler
);
Component
.
this
.
removeComponentListener
(
accessibleAWTComponentHandler
);
accessibleAWTComponentHandler
=
null
;
}
if
(
accessibleAWTFocusHandler
!=
null
)
{
Component
.
this
.
removeFocusListener
(
accessibleAWTFocusHandler
);
Component
.
this
.
removeFocusListener
(
accessibleAWTFocusHandler
);
accessibleAWTFocusHandler
=
null
;
}
}
super
.
removePropertyChangeListener
(
listener
);
super
.
removePropertyChangeListener
(
listener
);
}
}
...
...
src/share/classes/java/awt/Container.java
浏览文件 @
30e5b7fd
/*
/*
* Copyright (c) 1995, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -3824,6 +3824,12 @@ public class Container extends Component {
...
@@ -3824,6 +3824,12 @@ public class Container extends Component {
return
Container
.
this
.
getAccessibleAt
(
p
);
return
Container
.
this
.
getAccessibleAt
(
p
);
}
}
/**
* Number of PropertyChangeListener objects registered. It's used
* to add/remove ContainerListener to track target Container's state.
*/
private
volatile
transient
int
propertyListenersCount
=
0
;
protected
ContainerListener
accessibleContainerHandler
=
null
;
protected
ContainerListener
accessibleContainerHandler
=
null
;
/**
/**
...
@@ -3859,11 +3865,27 @@ public class Container extends Component {
...
@@ -3859,11 +3865,27 @@ public class Container extends Component {
public
void
addPropertyChangeListener
(
PropertyChangeListener
listener
)
{
public
void
addPropertyChangeListener
(
PropertyChangeListener
listener
)
{
if
(
accessibleContainerHandler
==
null
)
{
if
(
accessibleContainerHandler
==
null
)
{
accessibleContainerHandler
=
new
AccessibleContainerHandler
();
accessibleContainerHandler
=
new
AccessibleContainerHandler
();
}
if
(
propertyListenersCount
++
==
0
)
{
Container
.
this
.
addContainerListener
(
accessibleContainerHandler
);
Container
.
this
.
addContainerListener
(
accessibleContainerHandler
);
}
}
super
.
addPropertyChangeListener
(
listener
);
super
.
addPropertyChangeListener
(
listener
);
}
}
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
* for all properties.
*
* @param listener the PropertyChangeListener to be removed
*/
public
void
removePropertyChangeListener
(
PropertyChangeListener
listener
)
{
if
(--
propertyListenersCount
==
0
)
{
Container
.
this
.
removeContainerListener
(
accessibleContainerHandler
);
}
super
.
removePropertyChangeListener
(
listener
);
}
}
// inner class AccessibleAWTContainer
}
// inner class AccessibleAWTContainer
/**
/**
...
...
src/share/classes/javax/swing/JComponent.java
浏览文件 @
30e5b7fd
/*
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -3643,26 +3643,6 @@ public abstract class JComponent extends Container implements Serializable,
...
@@ -3643,26 +3643,6 @@ public abstract class JComponent extends Container implements Serializable,
}
}
}
}
/**
* The <code>AccessibleContext</code> associated with this
* <code>JComponent</code>.
*/
protected
AccessibleContext
accessibleContext
=
null
;
/**
* Returns the <code>AccessibleContext</code> associated with this
* <code>JComponent</code>. The method implemented by this base
* class returns null. Classes that extend <code>JComponent</code>
* should implement this method to return the
* <code>AccessibleContext</code> associated with the subclass.
*
* @return the <code>AccessibleContext</code> of this
* <code>JComponent</code>
*/
public
AccessibleContext
getAccessibleContext
()
{
return
accessibleContext
;
}
/**
/**
* Inner class of JComponent used to provide default support for
* Inner class of JComponent used to provide default support for
* accessibility. This class is not meant to be used directly by
* accessibility. This class is not meant to be used directly by
...
@@ -3689,7 +3669,18 @@ public abstract class JComponent extends Container implements Serializable,
...
@@ -3689,7 +3669,18 @@ public abstract class JComponent extends Container implements Serializable,
super
();
super
();
}
}
protected
ContainerListener
accessibleContainerHandler
=
null
;
/**
* Number of PropertyChangeListener objects registered. It's used
* to add/remove ContainerListener and FocusListener to track
* target JComponent's state
*/
private
volatile
transient
int
propertyListenersCount
=
0
;
/**
* This field duplicates the one in java.awt.Component.AccessibleAWTComponent,
* so it has been deprecated.
*/
@Deprecated
protected
FocusListener
accessibleFocusHandler
=
null
;
protected
FocusListener
accessibleFocusHandler
=
null
;
/**
/**
...
@@ -3747,10 +3738,12 @@ public abstract class JComponent extends Container implements Serializable,
...
@@ -3747,10 +3738,12 @@ public abstract class JComponent extends Container implements Serializable,
public
void
addPropertyChangeListener
(
PropertyChangeListener
listener
)
{
public
void
addPropertyChangeListener
(
PropertyChangeListener
listener
)
{
if
(
accessibleFocusHandler
==
null
)
{
if
(
accessibleFocusHandler
==
null
)
{
accessibleFocusHandler
=
new
AccessibleFocusHandler
();
accessibleFocusHandler
=
new
AccessibleFocusHandler
();
JComponent
.
this
.
addFocusListener
(
accessibleFocusHandler
);
}
}
if
(
accessibleContainerHandler
==
null
)
{
if
(
accessibleContainerHandler
==
null
)
{
accessibleContainerHandler
=
new
AccessibleContainerHandler
();
accessibleContainerHandler
=
new
AccessibleContainerHandler
();
}
if
(
propertyListenersCount
++
==
0
)
{
JComponent
.
this
.
addFocusListener
(
accessibleFocusHandler
);
JComponent
.
this
.
addContainerListener
(
accessibleContainerHandler
);
JComponent
.
this
.
addContainerListener
(
accessibleContainerHandler
);
}
}
super
.
addPropertyChangeListener
(
listener
);
super
.
addPropertyChangeListener
(
listener
);
...
@@ -3764,9 +3757,9 @@ public abstract class JComponent extends Container implements Serializable,
...
@@ -3764,9 +3757,9 @@ public abstract class JComponent extends Container implements Serializable,
* @param listener the PropertyChangeListener to be removed
* @param listener the PropertyChangeListener to be removed
*/
*/
public
void
removePropertyChangeListener
(
PropertyChangeListener
listener
)
{
public
void
removePropertyChangeListener
(
PropertyChangeListener
listener
)
{
if
(
accessibleFocusHandler
!=
null
)
{
if
(
--
propertyListenersCount
==
0
)
{
JComponent
.
this
.
removeFocusListener
(
accessibleFocusHandler
);
JComponent
.
this
.
removeFocusListener
(
accessibleFocusHandler
);
accessibleFocusHandler
=
null
;
JComponent
.
this
.
removeContainerListener
(
accessibleContainerHandler
)
;
}
}
super
.
removePropertyChangeListener
(
listener
);
super
.
removePropertyChangeListener
(
listener
);
}
}
...
...
test/javax/swing/JSlider/4252173/bug4252173.java
浏览文件 @
30e5b7fd
/*
/*
* Copyright (c) 2007, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
*/
*/
/* @test
/* @test
@bug 4252173
* @bug 4252173 7077259
@summary Inability to reuse the HorizontalSliderThumbIcon
*
@summary Inability to reuse the HorizontalSliderThumbIcon
@author Pavel Porvatov
*
@author Pavel Porvatov
@run main
bug4252173
* @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
bug4252173
*/
*/
import
javax.swing.*
;
import
javax.swing.*
;
import
javax.swing.plaf.metal.DefaultMetalTheme
;
import
javax.swing.plaf.metal.DefaultMetalTheme
;
...
...
test/javax/swing/JSpinner/6532833/bug6532833.java
浏览文件 @
30e5b7fd
/*
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010,
2013,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -22,10 +22,11 @@
...
@@ -22,10 +22,11 @@
*/
*/
/* @test
/* @test
@bug 6532833
* @bug 6532833 7077259
@summary PIT: Metal LAF - The right side border is not shown for the Spinner after the removing the buttons
* @summary PIT: Metal LAF - The right side border is not shown for the Spinner after the removing the buttons
@author Pavel Porvatov
* @author Pavel Porvatov
*/
* @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel bug6532833
*/
import
javax.swing.*
;
import
javax.swing.*
;
import
java.awt.*
;
import
java.awt.*
;
...
...
test/javax/swing/plaf/metal/MetalSliderUI/Test6657026.java
浏览文件 @
30e5b7fd
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2013,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,22 +23,21 @@
...
@@ -23,22 +23,21 @@
/*
/*
* @test
* @test
* @bug 6657026
* @bug 6657026
7077259
* @summary Tests shared MetalSliderUI in different application contexts
* @summary Tests shared MetalSliderUI in different application contexts
* @author Sergey Malenkov
* @author Sergey Malenkov
* @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel Test6657026
*/
*/
import
sun.awt.SunToolkit
;
import
javax.swing.JSlider
;
import
javax.swing.JSlider
;
import
javax.swing.UIManager
;
import
javax.swing.UIManager
;
import
javax.swing.plaf.metal.MetalLookAndFeel
;
import
javax.swing.plaf.metal.MetalLookAndFeel
;
import
javax.swing.plaf.metal.MetalSliderUI
;
import
javax.swing.plaf.metal.MetalSliderUI
;
import
sun.awt.SunToolkit
;
public
class
Test6657026
extends
MetalSliderUI
implements
Runnable
{
public
class
Test6657026
extends
MetalSliderUI
implements
Runnable
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
UIManager
.
setLookAndFeel
(
new
MetalLookAndFeel
());
JSlider
slider
=
new
JSlider
();
JSlider
slider
=
new
JSlider
();
test
(
slider
);
test
(
slider
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录