You have two custom UI classes. I suggest that you should combine these into a single class.
Well I did that in my first try, see the code
here
Within this class, choose which type of panel should be built.
I have no idea how to do that so that you see different panel titles.
For a user it is more conveniant if he sees two panels, one which can be selected if an image is displayed and another for a folder thumbnail. He should see only one panel title at the time.
That is an example of a non-compiled UI and people convinced me that I should use a compiled GUI.
My folder panel is very simple:
class FancyBoxFolderCustomUI extends JCustomPanel {
JSmartTextField moreInfoURL = new JSmartTextField();
public FancyBoxFolderCustomUI(JAlbumContext context) {
super(context);
new StateMonitor() {
public void onChange() {
saveUI();
}
}.add(moreInfoURL);
setBackground(SystemColor.text);
setOpaque(true);
init();
}
public void setAlbumObject(AlbumObject ao) {
removeAll();
if (ao != null) {
super.setAlbumObject(ao);
boolean isFolder = currentAO.getCategory() == Category.folder;
add(new JLabelFor("URL for 'More info' button:", moreInfoURL));
add("br hfill", moreInfoURL);
moreInfoURL.setEnabled(isFolder);
}
}
}
I came to this solution after looking into the
Pluto skin code and it seems to work well.
But I like to see this panel only if the current edited item is a folder and the Panorama panel should disappear in the same way as the Location, Camera and Description panels do disappear for a folder.