Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
1f0a6230
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看板
提交
1f0a6230
编写于
11月 21, 2012
作者:
S
serb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7193214: Consider simplifying CPlatformWindow.setResizable()
Reviewed-by: anthony, denis
上级
5a8ab9f5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
12 deletion
+8
-12
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
+3
-11
src/macosx/native/sun/awt/AWTWindow.m
src/macosx/native/sun/awt/AWTWindow.m
+5
-1
未找到文件。
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
浏览文件 @
1f0a6230
...
@@ -257,7 +257,7 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
...
@@ -257,7 +257,7 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
validateSurface
();
validateSurface
();
}
}
pr
otected
int
getInitialStyleBits
()
{
pr
ivate
int
getInitialStyleBits
()
{
// defaults style bits
// defaults style bits
int
styleBits
=
DECORATED
|
HAS_SHADOW
|
CLOSEABLE
|
MINIMIZABLE
|
ZOOMABLE
|
RESIZABLE
;
int
styleBits
=
DECORATED
|
HAS_SHADOW
|
CLOSEABLE
|
MINIMIZABLE
|
ZOOMABLE
|
RESIZABLE
;
...
@@ -284,7 +284,6 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
...
@@ -284,7 +284,6 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
final
boolean
resizable
=
isFrame
?
((
Frame
)
target
).
isResizable
()
:
(
isDialog
?
((
Dialog
)
target
).
isResizable
()
:
false
);
final
boolean
resizable
=
isFrame
?
((
Frame
)
target
).
isResizable
()
:
(
isDialog
?
((
Dialog
)
target
).
isResizable
()
:
false
);
styleBits
=
SET
(
styleBits
,
RESIZABLE
,
resizable
);
styleBits
=
SET
(
styleBits
,
RESIZABLE
,
resizable
);
if
(!
resizable
)
{
if
(!
resizable
)
{
styleBits
=
SET
(
styleBits
,
RESIZABLE
,
false
);
styleBits
=
SET
(
styleBits
,
ZOOMABLE
,
false
);
styleBits
=
SET
(
styleBits
,
ZOOMABLE
,
false
);
}
}
}
}
...
@@ -379,7 +378,7 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
...
@@ -379,7 +378,7 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
}
}
// this is the counter-point to -[CWindow _nativeSetStyleBit:]
// this is the counter-point to -[CWindow _nativeSetStyleBit:]
pr
otected
void
setStyleBits
(
final
int
mask
,
final
boolean
value
)
{
pr
ivate
void
setStyleBits
(
final
int
mask
,
final
boolean
value
)
{
nativeSetNSWindowStyleBits
(
getNSWindowPtr
(),
mask
,
value
?
mask
:
0
);
nativeSetNSWindowStyleBits
(
getNSWindowPtr
(),
mask
,
value
?
mask
:
0
);
}
}
...
@@ -656,15 +655,8 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
...
@@ -656,15 +655,8 @@ public final class CPlatformWindow extends CFRetainedResource implements Platfor
}
}
@Override
@Override
public
void
setResizable
(
boolean
resizable
)
{
public
void
setResizable
(
final
boolean
resizable
)
{
setStyleBits
(
RESIZABLE
,
resizable
);
setStyleBits
(
RESIZABLE
,
resizable
);
// Re-apply the size constraints and the size to ensure the space
// occupied by the grow box is counted properly
peer
.
updateMinimumSize
();
Rectangle
bounds
=
peer
.
getBounds
();
setBounds
(
bounds
.
x
,
bounds
.
y
,
bounds
.
width
,
bounds
.
height
);
}
}
@Override
@Override
...
...
src/macosx/native/sun/awt/AWTWindow.m
浏览文件 @
1f0a6230
...
@@ -160,6 +160,10 @@ AWT_NS_WINDOW_IMPLEMENTATION
...
@@ -160,6 +160,10 @@ AWT_NS_WINDOW_IMPLEMENTATION
BOOL
resizable
=
IS
(
bits
,
RESIZABLE
);
BOOL
resizable
=
IS
(
bits
,
RESIZABLE
);
[
self
updateMinMaxSize
:
resizable
];
[
self
updateMinMaxSize
:
resizable
];
[
self
.
nsWindow
setShowsResizeIndicator
:
resizable
];
[
self
.
nsWindow
setShowsResizeIndicator
:
resizable
];
// Zoom button should be disabled, if the window is not resizable,
// otherwise button should be restored to initial state.
BOOL
zoom
=
resizable
&&
IS
(
bits
,
ZOOMABLE
);
[[
self
.
nsWindow
standardWindowButton
:
NSWindowZoomButton
]
setEnabled
:
zoom
];
}
}
if
(
IS
(
mask
,
HAS_SHADOW
))
{
if
(
IS
(
mask
,
HAS_SHADOW
))
{
...
@@ -784,7 +788,7 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
...
@@ -784,7 +788,7 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
// calls methods on NSWindow to change other properties, based on the mask
// calls methods on NSWindow to change other properties, based on the mask
if
(
mask
&
MASK
(
_METHOD_PROP_BITMASK
))
{
if
(
mask
&
MASK
(
_METHOD_PROP_BITMASK
))
{
[
window
setPropertiesForStyleBits
:
b
its
mask
:
mask
];
[
window
setPropertiesForStyleBits
:
newB
its
mask
:
mask
];
}
}
window
.
styleBits
=
newBits
;
window
.
styleBits
=
newBits
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录