Show next image by clicking images in NextGEN Gallery with shutter effect

Here‘s the same for NextGEN + Thickbox!

Last year I posted an article about modifying NextGEN Gallery (with Thickbox) to show the next image when you click on the current one. This behaviour is well known from Facebook an co. To go to the next picture, just click on the current one. To close the slideshow, just click beside the picture. Easy. You can find the article here.

Since I used the Thickbox effect in my modification, a lot of people asked me if it is possbile with the Shutter effect, too. Of course it is!

Here’s what you have to do to modify NextGEN Gallery with the Shutter effect to display the next image by clicking on the current one. I tested it with WordPress 3.7.1 und NextGen 2.0.33.

1 – Open the file wp-content/plugins/nextgen_gallery/products/photocrati_nextgen/modules/lightbox/static/shutter/shutter.js

2 – Arround line number 143 there should be a line like this:

You have to replace this line with the following one:

3 – Now you have to add a new function just before

Here’s the function you have to add:

Now the file should look like this:


That’s it! I hope it works for everyone.

Best regards,

TechTrends Presentation

Next Friday (July 26th 2013) the final presentation of TechTrends will take place at our university. The presentation will take about 60 min and will cover topics like architecture, crawling, data storage and front end design. Everybody interested is welcome (please send me an email before). Here’s the whole schedule for next week:

09.00h-10.10h Tech Trends (by Brand, Uhrig, Pernpeintner)
10.15h-11.25h Newsline (by Förder, Golpashin, Wetzel, Keller)
11.45h-12.35h Intellligent Filters for Image Search (by Landmesser, Mussin)
12.40h-13.50h Nao Face Recognition (by Sandrock, Schneider, Müller)
13.55h-14.35h GPU-driven deep CNN (by Schröder)

The presentations will take place in room 056 (Aquarium). I will upload the presentation to my speakerdeck account at the end of next week.

Best regards,
Thomas Uhrig

Paper about XForms and XFormsMM

I have currently finished a paper about XForms (and XFormsMM) for an univerity course called Adaptive User Interfaces. The paper gives a general introduction to XForms as well as to XFormsMM. XFormsMM is a (quite theoretical) approach how multi-modal forms can be build on top of XForms. It’s based on a paper of Mikko Honkala and Mikko Pohja and on the idea of extending XForms with modality-dependent style-sheets.

You can download the paper here. My own presentation about XForms can be found here.

I have used the following resources, which are also a good starting point to get some information about XForms:

To get started and to get an idea of what XForms is, I’ve made a small example using the FormFaces library:

The code is quite simple. First of all, you have to declare some namespaces for XForms itself and for the XML events XForms is using:

After that, you have to include the FormFaces JavaScript library to your code:

Now you can declare an XML data-model to be modified with the form, e.g. from an XML file:

The corresponding XML file looks like this:

Now, you can write XForms controls to operate on this data-model. A simple control can look like this:

So, all together:

Best regards, Thomas Uhrig.

Automated UI testing with Swing & FEST

Testing an application is hard, but testing an user interface (UI) is even harder. FEST addresses this issue for Java Swing applications. It enables you to write easy and readable functional tests for your UI. Working together with JUnit, it lets your functional UI tests feel like common unit tests within your test suite.

FEST is a context-sensitive testing-framework, which means that the position of your UI components, their size or color isn’t important for the test (of course you can tests this criteria if you want). FEST identifies all UI components by an unique ID – their name. Therefore, your UI layout can change, but the tests will still work.

By the way: Because all components in your UI must have a unique name, it’s a good idea to use a Factory to create your components and to make sure that they all have an unique name.

To start with FEST is really simple:

  1. Download FEST from their Google Code repository and put fest-swing-x.x.jar as well as all JARs in the lib folder of the ZIP-file to your classpath.
  2. Make a Swing UI, perhaps something like this:

  3. Now, go ahead and write a (JUnit) test:
  4. Let your test run and see how FEST is interacting live with your UI.

FEST uses the java.awt.Robot class to interact with your UI. Robot is part of the JDK since version 1.3 and provides a low-level API to simulate user interaction for AWT or Swing application. FEST encapsulate this class into an abstract and easy to use API.

The difference between common JUnit tests and functional tests using FEST is the level of test-execution. JUnit tests are working on isolated classes and methods whereas functional tests (with FEST) are working on the real UI shown to the user. This real UI can be composed of many single objects that should be tested altogether. Also, functional test doesn’t work on a method-level – they are working on the same level as the human user simulating “clicks”, “selects” and “keys”.


Best regards, Thomas Uhrig.

Presentation about XForms

I have currently finished a presentation about XForms and how you can use XForms to create multimodal applications (according to a paper of Mikko Honkala and Mikko Pohja). Here is the Google Doc and here is the PDF file.

I will post my own paper about the topic in a couple of days (or at the end of the term if I’m lazy…).

Best regards, Thomas Uhrig.