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


Permlink Replies: 12 - Pages: 1 - Last Post: 03-Jun-2019 23:15 Last Post By: RobM Threads: [ Previous | Next ]
RobM

Posts: 3,169
Registered: 4-Aug-2006
Beta Skin: Journal
Posted: 29-May-2019 00:26
 
  Click to reply to this thread Reply
Attachment Journal Skin.zip (2.2 MB)
Attachment Journal.jaskin (97.3 KB)
I have a beta version of a new skin called Journal, see attached. There is a sample album here for anyone interested in viewing it.

The sample album is also a user manual for the skin. The above link is the journal's landing page, click on 'Click to open' to goto the journal's 'Index' page. From there you can select a 'chapter' of the journal to read.

As the skin is somewhat unconventional I recommend, for anyone interested in it, using the project created for the sample album, attached as a zip file, to try out the skin. You could use jAlbum's Sample Portfolio or any other project but any page templates, such as About, will not be included in the navigation links.

As the skin is designed for a specific job, journaling, it may be of very limited interest to other users. If there is enough interest in it I will add it to the skins page.

Anyone interested in it can post questions/feedback here.
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: Beta Skin: Journal
Posted: 29-May-2019 10:15   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thank you for such a creative contribution!
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 29-May-2019 11:52   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Thank you for such a creative contribution!
Thanks, it has been a while since I coded a skin and wanted to make sure I still can, but I also wanted to, as usual for me, do something different. I’m thinking of looking at the API for ChainedObjects to get the previous/next object rather than using my own code.
jGromit

Posts: 7,546
Registered: 31-Jan-2006
Re: Beta Skin: Journal
Posted: 29-May-2019 12:09   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Just remember what someone once said about writing editorials - substitute "developing jAlbum skins" for "writing editorials:"

Writing editorials is like wetting yourself in a seersucker suit. It gives you a warm feeling, but no one notices.
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 29-May-2019 13:06   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Just remember what someone once said about writing editorials - substitute "developing jAlbum skins" for "writing editorials:"

Writing editorials is like wetting yourself in a seersucker suit. It gives you a warm feeling, but no one notices.
I remember that someone once said the average webpage gets one visitor ;) I’m happy to code for the fun of it, if someone uses it that’s their fault. ;)
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 29-May-2019 23:44   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I have now got the code to get the previous/next folder's title, to replace 'previous page'/'next page'.
if(navLinkTitle) {
  if(engine.getChainedObjects().getPrevious(currentFolder) != void && engine.getChainedObjects().getPrevious(currentFolder) != null) 
    prevObj = engine.getChainedObjects().getPrevious(currentFolder, true).getVars().get("title");
  if(engine.getChainedObjects().getNext(currentFolder) != void && engine.getChainedObjects().getNext(currentFolder) != null) 
    nextObj = engine.getChainedObjects().getNext(currentFolder, true).getVars().get("title");
}


What I am struggling with is disabling a skin setting if chained directories is not selected. In Netbeans I get an error saying 'Illegal start of type identifier expected, package engine does not exist.' What am I doing wrong?

The code I tried is
ControlPanel ui;
ui = new ControlPanel() {
ControlPanel titlesPanel = new ControlPanel() {
  ControlPanel aa = new ControlPanel() {
    ControlPanel pagesPanel = new ControlPanel() {
      {
         add("br", navLinkTitle);
      }
    };
    {
      add("vfill", pagesPanel);
    }
   };
   {
    add(aa);
    window.addJAlbumListener(
     new JAlbumAdapter() {
        if(engine.isChainDirectories()) {
          navLinkTitle.setEnabled(true);
         }
         else {
          navLinkTitle.setEnabled(false);
          }
        }
      );
    }
...
jGromit

Posts: 7,546
Registered: 31-Jan-2006
Re: Beta Skin: Journal
Posted: 29-May-2019 23:59   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I don't have the energy to piece it all together at the moment, but pull up my Mercury skin, head for the sources/src subdirectory, and open Mercury.java. Search for linkOrig, which I use to detect a jAlbum engine setting and then enable/disable some skin stuff. You should be able to adapt that.

Don't ignore the need to check it on project loading, since it's dependent upon an engine setting - you'll see that towards the tail end of the Mercury code.
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 30-May-2019 00:55   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
I don't have the energy to piece it all together at the moment, but pull up my Mercury skin, head for the sources/src subdirectory, and open Mercury.java. Search for linkOrig, which I use to detect a jAlbum engine setting and then enable/disable some skin stuff. You should be able to adapt that.

Don't ignore the need to check it on project loading, since it's dependent upon an engine setting - you'll see that towards the tail end of the Mercury code.

Thanks, I'll look at your code tomorrow as it is midnight here.
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 30-May-2019 01:16   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Belay that, got it working, now going to bed!
Thanks. :)
jGromit

Posts: 7,546
Registered: 31-Jan-2006
Re: Beta Skin: Journal
Posted: 30-May-2019 13:42   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Good. I figured that was close enough to what you're trying to do, so you'd be able to pick up the scheme. It's one of those things that I struggled to work out long ago, and would have trouble recreating today if faced with a blank .java file.

This is why I keep multiple redundant backups of everything - I could never write the stuff from scratch. If I lost all of it, I'd have to quit jAlbum and take up something more productive, like breeding ferrets. ;)
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 30-May-2019 15:33   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Good. I figured that was close enough to what you're trying to do, so you'd be able to pick up the scheme. It's one of those things that I struggled to work out long ago, and would have trouble recreating today if faced with a blank .java file.

This is why I keep multiple redundant backups of everything - I could never write the stuff from scratch. If I lost all of it, I'd have to quit jAlbum and take up something more productive, like breeding ferrets. ;)

A good place to back up that code would be in your compiling skins with NetBeans tutorial :)

My first go was based on a code snippet for AlbumBean, jAlbumListener, event, engine, JAlbumAdapter , onload, UI…
jGromit

Posts: 7,546
Registered: 31-Jan-2006
Re: Beta Skin: Journal
Posted: 30-May-2019 15:49   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
In case anyone has missed it, since late August 2016, I've include all of the source code for each of my skins in the skin directory, even though it's not required to make the skin work. That includes the Java for the compiled UI, and the un-minified Javascript.

Of course, anyone who steals my code will get a strongly-worded letter from my attorneys.

https://www.youtube.com/watch?v=_2LqmcjIeMU
RobM

Posts: 3,169
Registered: 4-Aug-2006
Re: Beta Skin: Journal
Posted: 03-Jun-2019 23:15   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Released version 1.
Legend
Forum admins
Helpful Answer
Correct Answer

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