Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
ac6c5f9d
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看板
提交
ac6c5f9d
编写于
7月 26, 2013
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
67579c6e
142d97b3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
44 addition
and
3 deletion
+44
-3
src/share/classes/sun/print/PSPrinterJob.java
src/share/classes/sun/print/PSPrinterJob.java
+11
-2
src/solaris/classes/sun/print/IPPPrintService.java
src/solaris/classes/sun/print/IPPPrintService.java
+26
-0
src/solaris/classes/sun/print/UnixPrintJob.java
src/solaris/classes/sun/print/UnixPrintJob.java
+5
-0
test/javax/print/DialogMargins.java
test/javax/print/DialogMargins.java
+2
-1
未找到文件。
src/share/classes/sun/print/PSPrinterJob.java
浏览文件 @
ac6c5f9d
...
...
@@ -59,6 +59,8 @@ import javax.print.PrintService;
import
javax.print.StreamPrintService
;
import
javax.print.attribute.HashPrintRequestAttributeSet
;
import
javax.print.attribute.PrintRequestAttributeSet
;
import
javax.print.attribute.PrintServiceAttributeSet
;
import
javax.print.attribute.standard.PrinterName
;
import
javax.print.attribute.standard.Chromaticity
;
import
javax.print.attribute.standard.Copies
;
import
javax.print.attribute.standard.Destination
;
...
...
@@ -471,6 +473,9 @@ public class PSPrinterJob extends RasterPrinterJob {
PrintService
pServ
=
getPrintService
();
if
(
pServ
!=
null
)
{
mDestination
=
pServ
.
getName
();
if
(
UnixPrintServiceLookup
.
isMac
())
{
mDestination
=
((
IPPPrintService
)
pServ
).
getDest
();
}
}
}
}
...
...
@@ -766,8 +771,12 @@ public class PSPrinterJob extends RasterPrinterJob {
}
}
if
(
mDestType
==
RasterPrinterJob
.
PRINTER
)
{
if
(
getPrintService
()
!=
null
)
{
mDestination
=
getPrintService
().
getName
();
PrintService
pServ
=
getPrintService
();
if
(
pServ
!=
null
)
{
mDestination
=
pServ
.
getName
();
if
(
UnixPrintServiceLookup
.
isMac
())
{
mDestination
=
((
IPPPrintService
)
pServ
).
getDest
();
}
}
PrinterSpooler
spooler
=
new
PrinterSpooler
();
java
.
security
.
AccessController
.
doPrivileged
(
spooler
);
...
...
src/solaris/classes/sun/print/IPPPrintService.java
浏览文件 @
ac6c5f9d
...
...
@@ -1099,6 +1099,15 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
if
(
category
==
PrinterName
.
class
)
{
return
(
T
)(
new
PrinterName
(
printer
,
null
));
}
else
if
(
category
==
PrinterInfo
.
class
)
{
PrinterInfo
pInfo
=
new
PrinterInfo
(
printer
,
null
);
AttributeClass
ac
=
(
getAttMap
!=
null
)
?
(
AttributeClass
)
getAttMap
.
get
(
pInfo
.
getName
())
:
null
;
if
(
ac
!=
null
)
{
return
(
T
)(
new
PrinterInfo
(
ac
.
getStringValue
(),
null
));
}
return
(
T
)
pInfo
;
}
else
if
(
category
==
QueuedJobCount
.
class
)
{
QueuedJobCount
qjc
=
new
QueuedJobCount
(
0
);
AttributeClass
ac
=
(
getAttMap
!=
null
)
?
...
...
@@ -1566,7 +1575,24 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
}
}
String
getDest
()
{
return
printer
;
}
public
String
getName
()
{
/*
* Mac is using printer-info IPP attribute for its human-readable printer
* name and is also the identifier used in NSPrintInfo:setPrinter.
*/
if
(
UnixPrintServiceLookup
.
isMac
())
{
PrintServiceAttributeSet
psaSet
=
this
.
getAttributes
();
if
(
psaSet
!=
null
)
{
PrinterInfo
pName
=
(
PrinterInfo
)
psaSet
.
get
(
PrinterInfo
.
class
);
if
(
pName
!=
null
)
{
return
pName
.
toString
();
}
}
}
return
printer
;
}
...
...
src/solaris/classes/sun/print/UnixPrintJob.java
浏览文件 @
ac6c5f9d
...
...
@@ -65,6 +65,7 @@ import javax.print.attribute.PrintJobAttribute;
import
javax.print.attribute.PrintJobAttributeSet
;
import
javax.print.attribute.PrintRequestAttribute
;
import
javax.print.attribute.PrintRequestAttributeSet
;
import
javax.print.attribute.PrintServiceAttributeSet
;
import
javax.print.attribute.standard.Copies
;
import
javax.print.attribute.standard.Destination
;
import
javax.print.attribute.standard.DocumentName
;
...
...
@@ -76,6 +77,7 @@ import javax.print.attribute.standard.Media;
import
javax.print.attribute.standard.MediaSize
;
import
javax.print.attribute.standard.MediaSizeName
;
import
javax.print.attribute.standard.OrientationRequested
;
import
javax.print.attribute.standard.PrinterName
;
import
javax.print.attribute.standard.RequestingUserName
;
import
javax.print.attribute.standard.NumberUp
;
import
javax.print.attribute.standard.Sides
;
...
...
@@ -120,6 +122,9 @@ public class UnixPrintJob implements CancelablePrintJob {
UnixPrintJob
(
PrintService
service
)
{
this
.
service
=
service
;
mDestination
=
service
.
getName
();
if
(
UnixPrintServiceLookup
.
isMac
())
{
mDestination
=
((
IPPPrintService
)
service
).
getDest
();
}
mDestType
=
UnixPrintJob
.
DESTPRINTER
;
}
...
...
test/javax/print/DialogMargins.java
浏览文件 @
ac6c5f9d
...
...
@@ -25,11 +25,12 @@
/**
* @test
* @bug 4485755 6361370 6448717 5080051 6939417
* @bug 4485755 6361370 6448717 5080051 6939417
8016343
* @summary dialog doesn't have way to specify margins
* for 6361370, verify exception for offline printer in Windows
* for 6448717, faster display of print dialog
* for 6500903, verify status of printer if accepting jobs or not
* for 8016343, verify printing to non-default printer
* @author prr
* @run main/manual DialogMargins
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录