Migration guide for version 4.1 (Lima)

The version 4.1 (code-named Key Largo) introduces minor binary incompatibilities with the previous versions. This document describes these incompatibilities and outlines the migration process for the client applications.

Background

During the development of version 4.1, two published Substance painter interfaces have been changed to better accomodate the new functionality.

SubstanceTitlePainter

The paintTitleBackground of org.jvnet.substance.title.SubstanceTitlePainter has been changed to the following signature:

  public void paintTitleBackground(Graphics2D graphics, Component comp,
      int width, int height, int leftTitleX, int rightTitleX,
      SubstanceTheme theme, float borderAlpha);

The change is in the last parameter. Prior to version 4.1, it has been a boolean. The value true signified that the painter should paint the border, and the value false signified that no border should be painted. The last parameter in the new signature specifies the alpha channel for border painting.

What does this mean to applications? There are two cases:

SubstanceBorderPainter

The paintBorder of org.jvnet.substance.border.SubstanceBorderPainter has been changed to the following signature:

  public void paintBorder(Graphics g, Component c, int width, int height,
      Shape contour, Shape innerContour, ColorScheme colorScheme1,
      ColorScheme colorScheme2, float cyclePos,
      boolean useCyclePosAsInterpolation);

The change is the new innerContour parameter. One of the new features added in this release are border painters that paint lighter inner borders.

What does this mean to applications? There are two cases: