A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Swing / AWT / SWT
Author
icePDF: command next and previous page with key
paul beppe
Ranch Hand
Joined: Aug 09, 2012
Posts: 51
posted
Oct 30, 2012 02:10:03
0
hi everybody...
i'm using icepdf litle time....
i want add 2 comand with key in icepdf: "next page" and "previous page"
for open file
pdf
i have write:
SwingController controller = new SwingController(); SwingViewBuilder factory = new SwingViewBuilder(controller); viewerComponentPanel = factory.buildViewerPanel(); // add interactive mouse link annotation support via callback controller.getDocumentViewController().setAnnotationCallback( new org.icepdf.ri.common.MyAnnotationCallback( controller.getDocumentViewController())); framePDF = new JFrame(); framePDF.setLocation(400, 100); framePDF.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); framePDF.getContentPane().add(viewerComponentPanel); // Now that the GUI is all in place, we can try openning a PDF controller.openDocument(filePath); // show the component framePDF.pack(); framePDF.setVisible(true);
it's ok here....i want add 2 camand with key example:
if (event.getKeyCode() == KeyEvent.VK_SHIFT) {
...nextPage
}
if (event.getKeyCode() == KeyEvent.VK_BACK_SPACE) {
...previous Page
}
how to do...???
help me please!!!
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
3
I like...
posted
Oct 30, 2012 04:05:08
0
Don't use a
KeyListener
. Swing was designed to use
Key Bindings
.
edit Are you sure you want to use theShift key for navigation? I'd find that very non-standard. Why not use the arrow keys with Ctrl/Command pressed?
luck, db
There are no new questions, but there may be new answers.
paul beppe
Ranch Hand
Joined: Aug 09, 2012
Posts: 51
posted
Oct 30, 2012 04:13:20
0
hi!!!
my problem is not the choice of command... but how to run next and previous....
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
Oct 30, 2012 13:55:58
0
have you tried the community forum at the icepdf site?
(more likely to get icepdf users there)
paul beppe
Ranch Hand
Joined: Aug 09, 2012
Posts: 51
posted
Oct 31, 2012 02:02:17
0
yes!!! no answer...
I agree. Here's the link:
http://aspose.com/file-tools
subject: icePDF: command next and previous page with key
Similar Threads
Remove Java Loader in jsp page
A Pagination Technique Using Spring 3
Creation of icepdf-core.jar and icepdf-viewer.jar from ICEPDF.
Problem with event dispatching
Converting SVG to PDF
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter