开发者

ICEPDF Applet | Disable "Save-As" button from toolbar

开发者 https://www.devze.com 2023-02-11 15:09 出处:网络
I am using ICEPDF(open source java applet) Applet viewer for my pdf to view in my web without the use of adobe reader.

I am using ICEPDF(open source java applet) Applet viewer for my pdf to view in my web without the use of adobe reader. Now i want to disable "Save-As" button from the toolbar available at top. I have extracted jar files and dont know which file to customize. Could any1 help me on the file to be edited so as to hide the save-as option from my toolbar. Please..开发者_运维问答 Thanks - Haan


You can work on SwingViewBuilder. Personally, I did the customization by subclassing it and returning nulls for the things I wanted to disable.

EDIT:

SwingViewBuilder has many buildXYZ() methods. It is only required to make such a method return null for each button/menu item/toolbar that is not needed. The rest of the code is handling the nulls gracefully and skips over it.

Specifically, for the "Save-As" feature, you need to change/override buildSaveAsFileButton() and buildSaveAsFileMenuItem().

0

精彩评论

暂无评论...
验证码 换一张
取 消