문제

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().

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top