Migration guide for version 5.1 (Panama)

The version 5.1 (code-named Panama) 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 5.1, two published Substance interfaces have been changed to better accomodate the new functionality.

SubstanceButtonShaper

The getButtonOutline APIs of org.jvnet.substance.shaper.SubstanceButtonShaper now return Shape instead of GeneralPath.

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

SubstanceHighlightPainter

The paintHighlight of org.jvnet.substance.painter.highlight.SubstanceHighlightPainter has been changed to the following signature:

  /**
   * Paints the highlight.
   
   @param graphics
   *            Graphics context.
   @param comp
   *            Component.
   @param width
   *            Width.
   @param height
   *            Height.
   @param borderAlpha
   *            Border alpha factor.
   @param openSides
   *            The sides specified in this set will not be painted. Can be
   *            <code>null</code> or empty.
   @param colorScheme1
   *            The first color scheme.
   @param colorScheme2
   *            The second color scheme.
   @param borderColorScheme1
   *            The first border color scheme.
   @param borderColorScheme2
   *            The second border color scheme.
   @param cyclePos
   *            Cycle position. Is used for rollover and selection animations.
   *            Must be in 0..1 range.
   */
  public void paintHighlight(Graphics2D graphics, Component comp, int width,
      int height, float borderAlpha, Set<Side> openSides,
      SubstanceColorScheme colorScheme1,
      SubstanceColorScheme colorScheme2,
      SubstanceColorScheme borderColorScheme1,
      SubstanceColorScheme borderColorScheme2, float cyclePos)

The changes are the new borderColorScheme1 and borderColorScheme2 parameters.

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