Hello Substance, my old friend

December 22nd, 2016

This might be a bit of a surprise, but after almost six years of self-imposed hiatus I’ve decided to come back to some of the open-source Swing projects that have been frozen in time since late 2010. Part of it was a mild curiosity to see how much things have changed in the meanwhile, and part of it was somewhat of a challenge to get back to a code base that I once knew like the back of my hand.

Before delving into the rest of this rather lengthy post, a fair warning. The images seen here are only meant to be viewed on high-resolution / retina / 2x-density screens. Otherwise what you’re seeing is a scaled down version of the original images that has little to do with the actual visuals seen on those screens.

Having said that, what is you see above is what I saw a couple of months ago on my 2013 MacBook Pro that has a Retina screen. Having spent the last four years looking at crisp visuals of pretty much all the native apps (except for Eclipse that is just now starting to get there, but then again calling Eclipse a native app is somewhat of a stretch), this was painful. There are obvious line artifacts, with the two most noticeable being the light outline along left/top edges of the main window and a darker horizontal line across the selected tab. But other that that, everything is just too blocky, pixelated and way too fat.

Two months later, I’m happy to report that Substance is a fully fledged citizen of the Retina universe. Given the amount of work that went into making that happen, the next release will have a version bump to 7.0 code-named Uruguay. The three big themes of this release will be as follows.

Hi DPI support

Searching the web for the initial pointers on Hi DPI support in Swing got me to this post from 2013 by Konstantin Bulenkov. Konstantin is the team lead at Jetbrains – the company behind the IntelliJ platform and all the apps built on top of that platform. Did you know that IntelliJ IDEA is a Swing app? If you didn’t, now you know.

Lucky for me, the code referenced in that post is part of the community edition of IDEA and is available under the quite permissive Apache license. And even though some part of that code is using reflection to query the underlying capabilities, if it’s working for IDEA with its hundreds of thousands of active users, it’s certainly good enough for me.

This code now powers pretty much all the pixels you see in Substance 7.0 – once again, the same warning about images that are meant to be viewed only on retina / high-res screens applies to all the images in this post.

Continue reading »

Over the past 6 years I’ve hosted a number of my open-source projects on Java.net. Over the last two-three years the site admins kept talking about moving the hosting forward, enhancing both the visual and the backend functionality of the site. I have no insight into the complexity of the existing infrastructure and the amount of resources available. It thus thus be foolish – and pointless – to speculate on the reasons for the glacial pace at which things are happening.

After a lot of promises, early November brought the rather hostile announcement (emphasis mine):

This is an opt-in migration – we have thousands of junk, test, and abandoned projects on the site and we intend to leave them behind.  Any project owner can request that we move their projects, and any community leader can request that we move specific projects in the community.  Any project that is not specifically requested by name via the opt-in form by November 30, 2010 will be purged when the CollabNet site goes dark.  We will be keeping tarballs of the CollabNet contents and will be able to distribute them after the site goes dark, however projects that request migration are our top priority.

Aptly named “Move it or loose it“, this is quite a threatening statement that makes not one, not two, but three direct references to the projects that will not opt-in to the migration. Even though i’ve put the development and maintenance of my projects on hold, i still want to have the sources, binaries, documentation and the source history available for interested developers. And so i promptly added all my projects to the opt-in form.

Fast forward three weeks after the deadline date. A couple of days ago a comment was left on my blog (thanks Eugene) – Substance look-and-feel is nowhere to be found. It’s no longer at substance.dev.java.net and certainly not on the new java.net/projects. Let’s look at my new profile page that lists some of the projects that i asked to migrate. Looks like java.net/projects/substance is the winner, except that it leads to an error page. Most of the project links on my profile page lead to errors, and some lead to the subset of the original content. Every page takes minutes to load, and i have no idea if the old forum postings and binaries will ever make it through. Top priority indeed.

So here’s the deal. Over the next few days i will upload all the sources, documentation and additional materials to my GitHub page. However, it will be up to you to build the binaries, run sample applications and browse the downloaded documentation. I simply don’t have time to untangle this horrible migration mess that was unilaterally forced on me and my users.

And yes, i know that Java.net was a free service, and that the same exact thing may happen to GitHub in five years. I’m not that naive.

I’ve just published the final releases for the following projects:

Flamingo 5.0 release contains:

  • New scroller panel component
  • New color selector popup
  • Full right-to-left (RTL) support
  • Toggle menu buttons
  • Dock icon for ribbon frame on Mac
  • Dynamic resize of ribbon components

Substance 6.1 release contains:

  • Platform specific keyboard shortcuts
  • New Mariner skin
  • New Office Black 2007 skin
  • Better visual integration in Substance Flamingo plugin for ribbon under all core Substance skins

Trident 1.3 is mainly maintenance release with a few minor API additions to the repaint timelines. Flamingo uses Trident for some of the animations, and you will need to add the latest Trident jar to the classpath. If you’re running your Flamingo-based application under Substance, add the latest Substance Flamingo plugin jar to the classpath for consistent visual appearance and animation effects.

Here are a few screenshots of these libraries in action. New Mariner skin in Substance:

New Office Black 2007 skin in Substance that is targeting the Flamingo ribbon component:

Scrolling support for Flamingo popup menus:

Color selector popup for Flamingo command buttons:

Full right-to-left support in Flamingo ribbon:

I’ve just published the release candidates for the following projects:

Flamingo 5.0 release candidate contains:

  • New scroller panel component
  • New color selector popup
  • Full right-to-left (RTL) support
  • Toggle menu buttons
  • Dock icon for ribbon frame on Mac
  • Dynamic resize of ribbon components

Substance 6.1 release candidate contains:

  • Platform specific keyboard shortcuts
  • New Mariner skin
  • New Office Black 2007 skin
  • Better visual integration in Substance Flamingo plugin for ribbon under all core Substance skins

Trident 1.3 is mainly maintenance release with a few minor API additions to the repaint timelines. Flamingo uses Trident for some of the animations, and you will need to add the latest Trident jar to the classpath. If you’re running your Flamingo-based application under Substance, add the latest Substance Flamingo plugin jar to the classpath for consistent visual appearance and animation effects.

The final releases for all the projects are scheduled for August 9. Only bugs will be fixed until that date.