This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 124 - Pages: 9 [ Previous | 1 ... 3 4 5 6 7 8 9 | Next ] - Last Post: 25 Jul 15, 21:51 Last Post By: ctwist Threads: [ Previous | Next ]
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 12 Jun 15, 14:05   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
I haven't run into this problem....

I take it back. Sometimes I do have problems getting jAlbum to reprocess the image. The first time I select image-specific bounds, they're honored by a Make Album. But subsequent changes tend to be ignored without doing some "tinkering." Oddly, the new image-specific variables have been "registered" - if I do a Make All, they're honored. But a regular Make Album doesn't see them unless I go into image-editing mode for that image again, and move from that image to the next image.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 12 Jun 15, 14:20   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
  • Make Changes tells jAlbum to make the album with whatever new settings you've chosen, but it will not reprocess any images, even if you've changed the image bounds. In other words, it's something to do a quick check of skin settings changes, like a different font size on the captions, or a different position for the titles, or a color change.
This confirms my impression that jAlbum is more intended for programmers instead of ordinary people who like to show their pictures. This 'Make Changes' is not understood by normal people and I think it is useless and should be removed.

Also items like 'User variables' and 'Image filters' are much to complicated for ordinary people and will hardly be used, because it is so user-unfriendly implemented.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 12 Jun 15, 14:26   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
Just curious, but does it work OK if you leave image-editing mode after making the selection, and return to Explore mode before you click Make Album?
Yes that works OK.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 13:12   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
I have a fix for this. I will provide it in 2 days.

I'm running into a related, but I think somewhat different problem. Tough to describe, but my sense of what's happening runs like this: you go into image editing mode and jAlbum reads in all the variables in the .info file. That may or may not include any "user variables" - there may be other stuff, like image-specific skin variables. Now the user wants to change the image bounds for that image, like for a pano. Your routine reads in the user variables, makes the appropriate changes, and saves them. But then jAlbum saves all of the .info stuff.

What I'm seeing are instances in which I make changes to the image variables, but if I go to the next image and immediately return to the first image, the changes have disappeared. It's as if there are two routines, each trying to save its version of the .info material, and it's a race.
ctwist

Posts: 474
Registered: 27-Sep-2003
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 16:31   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I can't reproduce your problems.

Here are some things that you can try:
1)
import java.awt.KeyboardFocusManager;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
Add this before "super.setAlbumObject(ao);"
// Make the current AlbumObject lose focus, to force validation.
if (ao != null)
{	Component vComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
	if (vComponent != null && this.equals(vComponent.getParent()))
	{	transferFocusBackward();
	}
}
2) Add this before "new StateMonitor()"
FocusListener fl = new FocusAdapter()
{	// Make sure changes are saved even if one doesn't move between images
	public void focusLost(FocusEvent e)
	{	saveUI();
	}
};
// Add a listener for each of the variables
SIVPanorama.addFocusListener(fl);


Edited by: ctwist on 14-Jun-2015 10:41

Added "addFocusListener".
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 16:39   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I have been following this thread, from the 'cheap seats' and, as interesting as it is, I must confess to have lost track of the current state of the code. Lots of bits of code, all very interesting but what is it you are now all talking about?

Perhaps an updated post of a (un)complete block of code could be posted?
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 16:48   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Attachment ss000448.png (163.8 KB)
I'm in danger of losing track, myself. But in a nutshell, I believe the question is how to set different image bounds for one particular image, as in the attached screenshot, without the user having to enter the variable names and values manually. In other words, have something on the custom panel for the skin that says, "insert pano-type image bounds for this image" or "use these values that I'm choosing from a JSpinner as the image bounds for this image."

But based on the kinds of "collision" problems I've run into, this may turn out to be fiendishly difficult. It appears that it's very easy to run into a situation in which you've got two routines both trying to save information to the same .info file, and neither routine knows about the other.

I've tried various tricks involving forced saveUI() calls, but the jAlbum core is doing its own saveUI() when focus is lost, whether it needs to or not. Normally, that's the safe thing to do, but in this case, I believe it's making trouble.
ctwist

Posts: 474
Registered: 27-Sep-2003
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 16:51   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I have been following this thread, from the 'cheap seats' and, as interesting as it is, I must confess to have lost track of the current state of the code. Lots of bits of code, all very interesting but what is it you are now all talking about?

Perhaps an updated post of a (un)complete block of code could be posted?

On 5 June I attached a compiled Java example. This is current. I re-posted it when we identified corrections. When we fix the outstanding problems, I will re-post an updated version; I will replace the attachment in the 5 June message.

This thread also contains a discussion about file choosers. I did not participate in this.
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 17:29   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Thanks for clarifying that the file is current, I will download it and have a play. I must confess though that, given the free time, it is the File Chooser aspect I am more interested in. Having said that, there is much in this code that should help me in general. So, thanks to all so far!
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 17:57   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
...it is the File Chooser aspect I am more interested in.

Yeah, that has a wider impact. I've got the native choosers in the beta versions of my skins now, and they seem to be working fine. Solid code: http://jalbum.net/forum/thread.jspa?messageID=298205#298205. It's one area, however, where OSX falls short. Finder really is pretty awful if you're used to Windows Explorer.

Pano handling is a pretty limited area of interest, especially since most skins make no provision for displaying them differently. None of my Matrix users has ever complained about having to enter the image bounds manually.
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 18:11   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
It's one area, however, where OSX falls short. Finder really is pretty awful if you're used to Windows Explorer.

Ah, the nub of user interface wars! I was using Apple computers well before Windows was released. I was very used to the GUI way of working at home, then, at work, we had PCs 'forced' on us, for me it was a horror. I was constantly battling with the PC as it didn't behave as I was used to. Windows is much better than it was, but it is not the operating system for me.

Have you tried Default Folder X, by Saint Clare Software? It is Finder on steroids.

With the 'clash' in saving the settings, would using the custom GUI values to write the custom variables avoid that's?
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 19:28   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
With the 'clash' in saving the settings, would using the custom GUI values to write the custom variables avoid that's?

Not sure I follow you. In order to be effective, the new maxImageWidth and maxImageHeight have to be saved as "user variables," just as if they'd been entered in the Variables panel in image editing mode. At the same time, the skin needs to keep track of the fact that the user has chosen unique bounds, so it's also trying to save one (or more) of its own variables, like showAsPano. Therein lies the problem. You end up with multiple listeners all trying to store information in one .info file. I can pack all of my stuff into one listener, but the jAlbum core has, in effect, its own listener that's also saving that information, but it seems that it's not saving the same version of the information.

I almost need a whiteboard to draw some diagrams of what I think is happening, and why it blows up.

Sure, I could save my own panoWidth and panoHeight variables, but then the skin would have to take over the job of scaling the images and saving them. With jAlbum doing its multi-threaded thing, that could be tricky. The skin might produce a new slide image, only to have the jAlbum core subsequently produce a different slide image and overwrite it. The skin would, in effect, have to produce something unique, like mydog_pano.jpg, and make sure that the page linking points to it. Feasible, but that would then ripple down through all sorts of routines that count on knowing what the "next" image is. At the end of the day, not worth doing, I suspect.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 19:35   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I was using Apple computers well before Windows was released.

So was I - Mac II's in the late 80's, when the PC world had little other than IBM PC's running DOS. Pretty stark contrast. And we were using the Mac's to run Quark XPress, an almost phenomenally capable piece of word processing/publishing software. It could do stuff you still can't really pull off in, say, MS Word.

But by Windows 7, I think, Windows pulled out ahead of OSX when it comes to usability. Windows 8 was probably a step back. I'll take the free upgrade to Windows 10 next month, and let you know how that works out!
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 20:45   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
RobM wrote:
Not sure I follow you. In order to be effective, the new maxImageWidth and maxImageHeight have to be saved as "user variables," just as if they'd been entered in the Variables panel in image editing mode.
That was what I was not sure if you were doing or not, and what I meant. I did something similar with a page template, creating all of the user variables needed - for my page of the day template.
Then an update meant I could do away with using user variables!

From a personal point, I like things neat and tidy, so would rather keep things like pano images together, not mixed in with other items - like keeping images in folders, not a folder with images and folders.

Replacing pano images with QuickTime VR, maybe...
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to set maxImageWidth and maxImageHeight in a Custom panel?
Posted: 14 Jun 15, 21:38   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
My suspicion is that the handful of Matrix users who are using it to shows pano's are probably creating albums that contain nothing but pano's, and that's the easy case. The skin has a project-level checkbox for "treat everything as a pano," and the user can just choose regular jAlbum image bounds to make that work, like 10000x500.

Don't know if you remember, but I had a skin called MatrixPano which, instead of calling the Highslide image expander, tapped into the DevalVR pano viewer. Worked well, especially for true spherical pano's. I dropped it because it was a bear to maintain, and seemed to have only one or two users, one of whom had moved on to other projects. The plugin was also "Windows-only" - not good. It has since been renamed (Videopanoramas Player), but it's still Windows only.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums