Book reader

By qless on Thursday 11 March 2010 18:58 - Comments (18)
Category: JavaFX, Views: 3.117

I've made a start with a book reader in javafx.

Currently, it can read most pdf, cbr and cbz files, next in line is epub.

Test: click here
(note: It asks for permission, it needs to be able to open your local stored books)

http://tweakers.net/ext/f/FYs8iRjrG9pH2eOesGJ9hOCn/full.jpg


To do:
- use the catalog as a library, complete with tags, different catagories andso on.


Keyboard shortcuts:
F: Fullscreen toggle
1...5: Rate the current book

Read mode:
X: quit
Page Down: next page
Page Up: prev page
Home: first page
End: last page
Arrow keys: scroll up/down/left/right
W: Fitwidth
H: Fitheight
+: Zoom in
-: Zoom out

Overview mode:
X: quit app
Arrow keys: Left/right in coverflow
Enter: open
Page down: scroll 10 to right
Page up: scroll 10 to left
Home: first
End: last

Anybody an idea on how to deploy a javafx program with an installer?

Volgende: Macbook with style 04-'10 Macbook with style
Volgende: VDSL2 modem data - 4 03-'10 VDSL2 modem data - 4

Comments


By Tweakers user Faust, Thursday 11 March 2010 20:16

*it crashed on OSX 10.6.2
If you want the crash log then I can DM it to you.

[Comment edited on Thursday 11 March 2010 20:22]


By Tweakers user himlims_, Thursday 11 March 2010 20:18

heb hier de eerste beste pdf van me desktop geprobeerd, maar wordt niet correct weergegeven. pagina valt groot 'n deels buiten beeld, afgezien van de 1st page wordt de rest niet getoont

kubuntu maar goed java is java (toch?)

[Comment edited on Thursday 11 March 2010 20:19]


By Tweakers user Faust, Thursday 11 March 2010 20:18

I tried to test this on OSX 10.6.2 but it keeps crashing, I gave permission and everything.
Tomorrow I can test it on Windows XP

By Tweakers user Icyzer, Thursday 11 March 2010 20:24

Could post #1 please edit :/ I hate scrolling
On Ubuntu when opening your link I can only open/save a file?

By Tweakers user Snowmiss, Thursday 11 March 2010 20:28

FF/Linux:

Error: Unexpected exception: java.lang.reflect.InvocationTargetException

By Tweakers user Savantas, Thursday 11 March 2010 21:12

Ziet er leuk uit! Heb hier wat geprobeerd, maar ebook pdf's lust ie niet (zonder drm, gutenberg bron). En ik heb met een pdf (vakblad van mijn werk) en met enkele cbr's het probleem dat ik wel de eerste pagina zie (bij de pdf overigens viel de echte cover buiten beeld), maar niets werkt behalve afsluiten (geen zoom, W, H oid). Oh, OSX 10.5.8 hier :)

[Comment edited on Thursday 11 March 2010 21:17]


By Rob, Thursday 11 March 2010 22:06

0.1 = kind of beta, alpha version maybe? Looking to these errors, I wait to give it a try..

By Tweakers user qless, Friday 12 March 2010 09:24

Hm I did the testing only with win 7 this time, could you mail / dm the crash logs?

By Tweakers user coyote1980, Friday 12 March 2010 10:18

Java Web Start 1.6.0_05
Using JRE version 1.6.0_05 Java HotSpot(TM) Client VM
User home directory = C:\Users\daniel
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: com.sun.javafx.runtime.location.Locations.makeBoundSelect(Lcom/sun/javafx/runtime/TypeInfo;Lcom/sun/javafx/runtime/location/ObjectLocation;I)Lcom/sun/javafx/runtime/location/ObjectLocation;
at bookview.OverView.applyDefaults$(OverView.fx:46)
at com.sun.javafx.runtime.FXBase.applyDefaults$(Unknown Source)
at bookview.OverView.initialize$(OverView.fx:33)
at bookview.OverView.<init>(OverView.fx:33)
at bookview.Main.<clinit>(Main.fx:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(Unknown Source)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

By Tweakers user sanderev66, Friday 12 March 2010 10:45

See, that's why I LOVE Java.

not.

By Tweakers user CodeCaster, Friday 12 March 2010 11:15

@sanderev66: the right to program utter crap isn't held exclusively by .NET programmers. You can't blame the language for that.

[Comment edited on Friday 12 March 2010 11:19]


By Tweakers user afvalzak, Friday 12 March 2010 12:05

ccnp -> spam? :?

Programma werkt hier goed op Ubuntu, maar ik had een pdfje geopend en die werd nogal extreem uitvergroot, waardoor het haast niet te lezen was. (Deze was overigens landscape, misschien dat dat uitmaakt.)

By Tweakers user qless, Friday 12 March 2010 12:35

sanderev66, crashes happen in every language. This is actually an javafx error....

afvalzak, leuke nick ;), standaard open ie in Fitwidth modus, dus dat zou ook goed moeten gaan, wat was het voor pdf?

By Tweakers user afvalzak, Friday 12 March 2010 13:13

@qless dankje :P

Het was een export vanuit phpmyadmin als PDF (als testje) normale ebooks aan een stuk beter:)

By Tweakers user sanderev66, Friday 12 March 2010 14:42

@qless: Java:
- Too many libraries that work just a bit different.
- Extreme exceptions that nobody can understand
- No good IDE.
- Slow.
- One language
+ Multiplatform

.Net
+ One framework (ofcourse you can add your own libs)
+ Best IDE ever. (I'm not a MS-fanboy, except when I talk about Visual Studio. It's the best IDE evar.)
+ Exception explained into the smallest detail, in human understandable language.
+ Fast. No wait for starting your apps, code is a bit faster than in Java.
+ Multilanguage (C#, VB, C++, F#, Boo, etc)
- No real multiplatform, well, there is Mono.

Ofcourse C/C++ is still better than both.

[Comment edited on Friday 12 March 2010 14:46]


By Tweakers user qless, Friday 12 March 2010 14:54

sanderev66 ->
Slow? Hm applets yes, but regular desktop apps or server apps aren't slow.
IDE? Yes VS is very good (I do C# programming too), but Netbeans and Eclipse aren't too bad. (don't start on JBuilder though ;))
Exceptions? no problem there, besides an end-user shouldn't see them. Ever.

Biggest advantage for Java is still the real multiplatform part.

By Tweakers user sanderev66, Friday 12 March 2010 15:01

NetBeans is okay for an IDE, never used Eclipse, but it's not as good as VS ;)

And one time I forgot a semicolon in a Java app (JSP), it resulted in an exception long enough to be used as toilet paper.

And I always referred the Java logo to what you should do when you see it: get a cup of coffee.

[Comment edited on Friday 12 March 2010 15:07]


By Tweakers user Zanthr, Friday 16 April 2010 19:38

Gonna give it a try!

Comment form
(required)
(required, but will not be displayed)
(optional)

Please enter the code from the image below: