Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
42910ea5
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看板
提交
42910ea5
编写于
6月 02, 2011
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
e3272aa7
109b62f9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
43 addition
and
13 deletion
+43
-13
src/share/classes/java/awt/Toolkit.java
src/share/classes/java/awt/Toolkit.java
+5
-5
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
+27
-5
src/windows/native/sun/windows/awt_Component.cpp
src/windows/native/sun/windows/awt_Component.cpp
+4
-1
src/windows/native/sun/windows/awt_Object.cpp
src/windows/native/sun/windows/awt_Object.cpp
+4
-1
src/windows/native/sun/windows/awt_Toolkit.cpp
src/windows/native/sun/windows/awt_Toolkit.cpp
+3
-1
未找到文件。
src/share/classes/java/awt/Toolkit.java
浏览文件 @
42910ea5
...
...
@@ -1857,7 +1857,7 @@ public abstract class Toolkit {
/**
* Adds the specified property change listener for the named desktop
* property. When a {@link PropertyChangeListenerProxy} object is added,
* property. When a {@link
java.beans.
PropertyChangeListenerProxy} object is added,
* its property name is ignored, and the wrapped listener is added.
* If {@code name} is {@code null} or {@code pcl} is {@code null},
* no exception is thrown and no action is performed.
...
...
@@ -1874,7 +1874,7 @@ public abstract class Toolkit {
/**
* Removes the specified property change listener for the named
* desktop property. When a {@link PropertyChangeListenerProxy} object
* desktop property. When a {@link
java.beans.
PropertyChangeListenerProxy} object
* is removed, its property name is ignored, and
* the wrapped listener is removed.
* If {@code name} is {@code null} or {@code pcl} is {@code null},
...
...
@@ -1893,11 +1893,11 @@ public abstract class Toolkit {
/**
* Returns an array of all the property change listeners
* registered on this toolkit. The returned array
* contains {@
code
PropertyChangeListenerProxy} objects
* contains {@
link java.beans.
PropertyChangeListenerProxy} objects
* that associate listeners with the names of desktop properties.
*
* @return all of this toolkit's {@
code
PropertyChangeListener}
* objects wrapped in {@code PropertyChangeListenerProxy} objects
* @return all of this toolkit's {@
link
PropertyChangeListener}
* objects wrapped in {@code
java.beans.
PropertyChangeListenerProxy} objects
* or an empty array if no listeners are added
*
* @see PropertyChangeSupport#getPropertyChangeListeners()
...
...
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
浏览文件 @
42910ea5
...
...
@@ -29,8 +29,6 @@ import java.awt.FileDialog;
import
java.awt.peer.FileDialogPeer
;
import
java.io.File
;
import
java.io.FilenameFilter
;
import
javax.swing.SwingUtilities
;
import
javax.swing.SwingWorker
;
import
sun.awt.AWTAccessor
;
/**
...
...
@@ -107,9 +105,7 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
if
(
b
)
{
Thread
t
=
new
Thread
()
{
public
void
run
()
{
GtkFileDialogPeer
.
this
.
run
(
fd
.
getTitle
(),
fd
.
getMode
(),
fd
.
getDirectory
(),
fd
.
getFile
(),
fd
.
getFilenameFilter
(),
fd
.
isMultipleMode
(),
fd
.
getX
(),
fd
.
getY
());
showNativeDialog
();
fd
.
setVisible
(
false
);
}
};
...
...
@@ -146,4 +142,30 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
// We do not implement this method because we
// have delegated to FileDialog#setFilenameFilter
}
private
void
showNativeDialog
()
{
String
dirname
=
fd
.
getDirectory
();
// File path has a priority against directory path.
String
filename
=
fd
.
getFile
();
if
(
filename
!=
null
)
{
final
File
file
=
new
File
(
filename
);
if
(
fd
.
getMode
()
==
FileDialog
.
LOAD
&&
dirname
!=
null
&&
file
.
getParent
()
==
null
)
{
// File path for gtk_file_chooser_set_filename.
filename
=
dirname
+
(
dirname
.
endsWith
(
File
.
separator
)
?
""
:
File
.
separator
)
+
filename
;
}
if
(
fd
.
getMode
()
==
FileDialog
.
SAVE
&&
file
.
getParent
()
!=
null
)
{
// Filename for gtk_file_chooser_set_current_name.
filename
=
file
.
getName
();
// Directory path for gtk_file_chooser_set_current_folder.
dirname
=
file
.
getParent
();
}
}
GtkFileDialogPeer
.
this
.
run
(
fd
.
getTitle
(),
fd
.
getMode
(),
dirname
,
filename
,
fd
.
getFilenameFilter
(),
fd
.
isMultipleMode
(),
fd
.
getX
(),
fd
.
getY
());
}
}
src/windows/native/sun/windows/awt_Component.cpp
浏览文件 @
42910ea5
...
...
@@ -3715,7 +3715,10 @@ void AwtComponent::OpenCandidateWindow(int x, int y)
SetCandidateWindow
(
iCandType
,
x
-
rc
.
left
,
y
-
rc
.
top
);
}
if
(
m_bitsCandType
!=
0
)
{
::
DefWindowProc
(
GetHWnd
(),
WM_IME_NOTIFY
,
IMN_OPENCANDIDATE
,
m_bitsCandType
);
HWND
proxy
=
GetProxyFocusOwner
();
// REMIND: is there any chance GetProxyFocusOwner() returns NULL here?
::
DefWindowProc
((
proxy
!=
NULL
)
?
proxy
:
GetHWnd
(),
WM_IME_NOTIFY
,
IMN_OPENCANDIDATE
,
m_bitsCandType
);
}
}
...
...
src/windows/native/sun/windows/awt_Object.cpp
浏览文件 @
42910ea5
...
...
@@ -69,9 +69,12 @@ void AwtObject::_Dispose(jobject self)
CriticalSection
::
Lock
l
(
AwtToolkit
::
GetInstance
().
GetSyncCS
());
JNIEnv
*
env
=
(
JNIEnv
*
)
JNU_GetEnv
(
jvm
,
JNI_VERSION_1_2
);
jobject
selfGlobalRef
=
env
->
NewGlobalRef
(
self
);
// value 0 of lParam means that we should not attempt to enter the
// SyncCall critical section, as it was entered someshere earlier
AwtToolkit
::
GetInstance
().
SendMessage
(
WM_AWT_DISPOSE
,
(
WPARAM
)
self
,
(
LPARAM
)
0
);
AwtToolkit
::
GetInstance
().
SendMessage
(
WM_AWT_DISPOSE
,
(
WPARAM
)
self
GlobalRef
,
(
LPARAM
)
0
);
CATCH_BAD_ALLOC
;
}
...
...
src/windows/native/sun/windows/awt_Toolkit.cpp
浏览文件 @
42910ea5
...
...
@@ -741,7 +741,9 @@ LRESULT CALLBACK AwtToolkit::WndProc(HWND hWnd, UINT message,
}
if
(
canDispose
)
{
if
(
wParam
!=
NULL
)
{
AwtObject
*
o
=
(
AwtObject
*
)
JNI_GET_PDATA
((
jobject
)
wParam
);
jobject
self
=
(
jobject
)
wParam
;
AwtObject
*
o
=
(
AwtObject
*
)
JNI_GET_PDATA
(
self
);
env
->
DeleteGlobalRef
(
self
);
if
(
o
!=
NULL
&&
theAwtObjectList
.
Remove
(
o
))
{
o
->
Dispose
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录