Package com.github.tadukoo.view.paint
Class NoPaintUIResource
java.lang.Object
com.github.tadukoo.view.paint.NoPaint
com.github.tadukoo.view.paint.NoPaintUIResource
- All Implemented Interfaces:
PaintUIResource
,SizablePaint
,UIResource
No Paint UIResource is a
PaintUIResource
version of NoPaint
- where it's used when you need a
non-null PaintUIResource
but don't want an actual paint.- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
In some cases, we need to return a ColorUIResource to support the Look & Feel properly.Metal Look and Feel has a trash way of handling gradients.Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.tadukoo.view.paint.SizablePaint
getPaint
-
Constructor Details
-
NoPaintUIResource
public NoPaintUIResource()
-
-
Method Details
-
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.- Specified by:
getColorUIResource
in interfacePaintUIResource
- Returns:
- A ColorUIResource
-
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.- Specified by:
getMetalGradientList
in interfacePaintUIResource
- Returns:
- The garbage List that Metal Look and Feel expects for gradients that matches best to the one defined here
-
equals
-