Page 8 of 10

Posted: Wed Jan 30, 2008 11:21 am
by dougal2
psor, stick with using jdk 1.5.0 / java 5.
you need to add the Swing Extensions library though.

Posted: Wed Jan 30, 2008 11:47 am
by dougal2
revision 31 on linux, x64 (@home).
This worked fine, must be something wrong with my work PC.

Posted: Wed Jan 30, 2008 11:51 am
by psor
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

Posted: Wed Jan 30, 2008 1:17 pm
by ViennaLinux
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?

Posted: Wed Jan 30, 2008 2:39 pm
by eman7613
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.

Posted: Wed Jan 30, 2008 3:15 pm
by psor
Alright eman, thanx for letting me know! I'll use java 6 then. ;o))


take care
psor

Posted: Thu Jan 31, 2008 9:54 am
by eman7613
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

Posted: Fri Feb 01, 2008 6:44 am
by dougal2
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.

Posted: Fri Feb 01, 2008 6:59 am
by psor
Maybe you could put the info into a status bar at the bottom too? :D ;)


take care
psor

Posted: Fri Feb 01, 2008 7:31 am
by dougal2
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.

Posted: Fri Feb 01, 2008 7:34 am
by eman7613
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.

Posted: Fri Feb 01, 2008 7:39 am
by dougal2
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.

Posted: Fri Feb 01, 2008 9:33 am
by eman7613
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

Posted: Fri Feb 01, 2008 12:31 pm
by dougal2
Thanks eman.
Hopefully this weekend I'll have some time to go through and start linking stuff up.

Posted: Tue Feb 05, 2008 5:30 am
by dougal2
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?