Porting Violet to Java

A forum for exporter development discussion.
User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Wed Jan 30, 2008 11:21 am

psor, stick with using jdk 1.5.0 / java 5.
you need to add the Swing Extensions library though.

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Wed Jan 30, 2008 11:47 am

revision 31 on linux, x64 (@home).
This worked fine, must be something wrong with my work PC.
Attachments
jV-linux2.jpg
jV-linux2.jpg (79.81 KiB) Viewed 8587 times

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Post by psor » Wed Jan 30, 2008 11:51 am

Just to let you know, it runs fine on my xubuntu with sun-java5-jre
and sun-java6-jre! :D ;)

... but with icedtea-java7-jre I get errors.

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException
        at jViolet.jVioletMainView.<init>(jVioletMainView.java:30)
        at jViolet.jVioletMainView$6.run(jVioletMainView.java:285)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:227)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:603)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.ImageFormatException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:221)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:209)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:324)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:269)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:337)
        ... 10 more


take care
psor
"The sleeper must awaken"

User avatar
ViennaLinux
Posts: 191
Joined: Thu Jul 26, 2007 9:26 am
Location: Vienna/Austria
Contact:

Post by ViennaLinux » Wed Jan 30, 2008 1:17 pm

on the old beryl/compiz there was a problem showing java guis when using java version 6. (also jre6)

So if your gui is empty showing up or seems frozen its maybe a problem of beryl (dont know if this is still so). Try falling back to metacity or kwin or another windowmanager that is not using 3d stuff.

Tell me if that is fixed now in beryl/compiz or what it is called now *g* - compiz fusion?
Core2duo e6600 @ 3.1GHz watercooled at default VCore ^^

User avatar
eman7613
Posts: 597
Joined: Sat Sep 16, 2006 2:52 pm

Post by eman7613 » Wed Jan 30, 2008 2:39 pm

vienna hit what i thought might be the problem.
MOST problems with comiz & java have been fixed, with the ONE exception of the netbeans installer :P very weird.

@psor, iceadtea 1.7 is alpha and incomplenet, and dosent even have all the swing code last time i checked, dont use it please or report bugs with it.
Yes i know, my spelling sucks

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Post by psor » Wed Jan 30, 2008 3:15 pm

Alright eman, thanx for letting me know! I'll use java 6 then. ;o))


take care
psor
"The sleeper must awaken"

User avatar
eman7613
Posts: 597
Joined: Sat Sep 16, 2006 2:52 pm

Post by eman7613 » Thu Jan 31, 2008 9:54 am

REVISION 32
Fixed ImagePanel, scroll bars will now show up and work properly.
OutputArea now captures System.out statments, and displays them
Changed my alias to my name
Yes i know, my spelling sucks

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Fri Feb 01, 2008 6:44 am

eman:
Can we not have the text output saved to a file please? I just don't think it's necessary. In fact I think the OutputArea could be removed altogether, make more space for the important controls.

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Post by psor » Fri Feb 01, 2008 6:59 am

Maybe you could put the info into a status bar at the bottom too? :D ;)


take care
psor
"The sleeper must awaken"

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Fri Feb 01, 2008 7:31 am

additionally, every line is being added twice

Code: Select all

Header loadedHeader loaded
	Width: 600	Width: 600
	Height: 450	Height: 450
	Supersample Factor: 1	Supersample Factor: 1
	Num samples: 299670000	Num samples: 299670000
Starting data read...Starting data read...
pixelData size: 3240000pixelData size: 3240000
...data read finished...data read finished
Display Image allocatedDisplay Image allocated
Starting ImageThread 1/1ImageThread 1 startedStarting ImageThread 1/1
ImageThread 1 started
Full processing necessaryFull processing necessary
Thread #1 calculating final luminanceThread #1 calculating final luminance
No supersample collapse necessaryNo supersample collapse necessary
ImageThread 1 completeImageThread 1 complete
Updating display image part 1/1...Updating display image part 1/1...
... update done... update done
EDIT: i've removed the OutputArea, so don't worry about doing it.
Last edited by dougal2 on Fri Feb 01, 2008 7:35 am, edited 1 time in total.

User avatar
eman7613
Posts: 597
Joined: Sat Sep 16, 2006 2:52 pm

Post by eman7613 » Fri Feb 01, 2008 7:34 am

wups, i think i know whats going on there, ill fix that tonight.

Ill redo the main UI layout & add an option to turn it on & off.
Yes i know, my spelling sucks

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Fri Feb 01, 2008 7:39 am

ok, cool.

Have you an idea how we can access an instance of ImageThreadParams from the GUI?
Sorry if this seems a silly question, but I'm sure there's a good way to do it and several bad ways to do it, and I don't really have a clue.

The way I see it working is that when the user changes a parameter on the GUI the ImageThreadParams object is updated too, then when an ImageThread is started, the params are passed to it.

How is best to set this up?

Also, ignore the edit on my last post. I'll do a fresh checkout after your updates.

User avatar
eman7613
Posts: 597
Joined: Sat Sep 16, 2006 2:52 pm

Post by eman7613 » Fri Feb 01, 2008 9:33 am

i just finished fixing the things i said i would, but not commiting. what i think would be a good way to do it is create a model classes for the GUI comonents.

OR the other way you can do this, which reqires you pay attention to what your calling wear, is the pass the GUI as an argument.

new ImageThread(this);

im going to look at writing modles for the GUI comonents as i like the first way later tonight / tomarow.

ALSO, the other way you can do all this, is to get the values from teh GUI and create a new thread object to do a specific task every time the user clicks "apply"

Revsion 33
fixed all that stuff you mentiond, no longer rights to a file
added an a option to hide/display the output
minor rework of the MainGUI
Yes i know, my spelling sucks

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Fri Feb 01, 2008 12:31 pm

Thanks eman.
Hopefully this weekend I'll have some time to go through and start linking stuff up.

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Tue Feb 05, 2008 5:30 am

REVISION 34

I've started to hook up the GUI, but I'm not convinced that I'm doing it in the best way, so I thought I'd do only 1 set of parameters (the reinhard parameters) and get your opinions on the implementation.

I have a feeling that the way the parameters are handled needs to be somewhat refactored away from the C++ style of code to make it more Java-like, but I don't really know how.

At the minute we have an ImageThreadParams class that contains other classes and values which are used by the ImageThread for processing.
Until now, the only instance of ImageThreadParameters was in ImageThread itself.
I have move the instanciation up to jVioletApp, so that the GUI components can call back to it via

Code: Select all

org.jdesktop.application.Application.getInstance(jViolet.jVioletApp.class).{instance of ImageThreadParams}
jVioletMainView also contains a reference to this instance and passes it to ImageThread when the threads are launched.

To me, this code looks and feels a little clunky, despite the fact that it works.

How would you do it?

Post Reply
137 posts

Who is online

Users browsing this forum: No registered users and 2 guests