Interface PaintUIResource

All Superinterfaces:
SizablePaint, UIResource
All Known Implementing Classes:
ColorPaintUIResource, GradientUIResource, NoPaintUIResource

public interface PaintUIResource extends SizablePaint, UIResource
PaintUIResource is a UIResource to be used for Paints for in Tadukoo Look & Feel (or other custom Look & Feels as desired). It provides methods to get the actual Paint or to get a single ColorUIResource or a List<Object> for use in supporting MetalLookAndFeel component UI classes.
Since:
Alpha v.0.2
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Method Details

    • getColorUIResource

      ColorUIResource getColorUIResource()
      In some cases, we need to return a ColorUIResource to support the Look & Feel properly. I don't like it, but it needs to be done for those Look & Feel pieces to work, and I'm trying to support all of them.
      Returns:
      A ColorUIResource
    • getMetalGradientList

      List<Object> getMetalGradientList()
      Metal Look and Feel has a trash way of handling gradients. Basically it takes 3 colors and 2 fractions, but with the 3 colors, it repeats color 1 and does 1, 2, 1, 3. The fractions represent the 2 middle points, but the 2nd point is calculated as mid1 * 2 + mid2.

      This method exists for the purpose of appeasing the Metal Look & Feel god who decided this disgusting way of code.
      Returns:
      The garbage List that Metal Look and Feel expects for gradients that matches best to the one defined here