Class MilkTheme

java.lang.Object
wiiuu.ui.MilkTheme

public final class MilkTheme extends Object
Choccy Milk's own look: Cocoa (dark) and Milk (light), following the computer unless chosen (choccy.theme = auto, cocoa or milk; T switches). A chocolate band with drips across the top, the glass of chocolate milk as its logo (also the window icon), rounded type when the computer has some.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Color
     
    final Color
    the chocolate band at the top, and the drips off it
    final Color
    the chocolate band at the top, and the drips off it
    final Color
    the page: a gradient from top to bottom
    final Color
    the page: a gradient from top to bottom
    final Color
    the chocolate in the glass
    final Color
    the chocolate in the glass
    static final MilkTheme
     
    final boolean
     
    final Color
     
    final Color
     
    static final MilkTheme
     
    final String
     
    final Color
    lists sit on panels
    final Color
    lists sit on panels
    final Color
    the chosen row: a chocolate pill, lighter at the top
    final Color
    the chosen row while the other column has the focus
    final Color
    the chosen row: a chocolate pill, lighter at the top
    final Color
    the chosen row: a chocolate pill, lighter at the top
    final Color
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Color
    alpha(Color c, float a)
     
    static Shape
    drips(int w, float bandH, float u, float grow)
    The band with drips hanging off its bottom edge; grow 0..1 lets the drips run down.
    static String
    A rounded, friendly face when the computer has one; the standard sans otherwise.
    static Font
    font(int style, float size)
     
    static void
    glass(Graphics2D g, float x, float y, float w, float h, float fill, float mix, float straw, float slosh, double phase, Color edge, Color milk, Color choc, Color chocLight)
    The logo: a glass at (x, y), w wide and h tall.
    icon(int size)
    The app icon at one size: the glass on a rounded chocolate square.
    Icons for the window (each size drawn on its own, so small ones stay crisp).
    static Color
    mix(Color a, Color b, float k)
     
    void
    paintPage(Graphics2D g, int w, int h, float bandH, float u, long now)
    The background, and the chocolate band at the top (bandH tall, drips below it).
    void
    pick(Graphics2D g, float x, float y, float w, float h, float u, boolean focused)
    The chosen row's pill.
    static MilkTheme
    pick(String setting, boolean systemDark)
    The look to use: choccy.theme, or the computer's dark / light mode.
    void
    shadow(Graphics2D g, float x, float y, float w, float h, float r, float u)
    A soft shadow under a rounded panel.
    static Shape
    wave(float x, float y, float w, float amp, float waves, double phase)
    A gentle wave from (x, y) across w.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      public final String name
    • dark

      public final boolean dark
    • bgTop

      public final Color bgTop
      the page: a gradient from top to bottom
    • bgBottom

      public final Color bgBottom
      the page: a gradient from top to bottom
    • band

      public final Color band
      the chocolate band at the top, and the drips off it
    • bandShade

      public final Color bandShade
      the chocolate band at the top, and the drips off it
    • panel

      public final Color panel
      lists sit on panels
    • panelEdge

      public final Color panelEdge
      lists sit on panels
    • pickTop

      public final Color pickTop
      the chosen row: a chocolate pill, lighter at the top
    • pickBottom

      public final Color pickBottom
      the chosen row: a chocolate pill, lighter at the top
    • pickText

      public final Color pickText
      the chosen row: a chocolate pill, lighter at the top
    • pickIdle

      public final Color pickIdle
      the chosen row while the other column has the focus
    • text

      public final Color text
    • dim

      public final Color dim
    • accent

      public final Color accent
    • milk

      public final Color milk
    • choc

      public final Color choc
      the chocolate in the glass
    • chocLight

      public final Color chocLight
      the chocolate in the glass
    • COCOA

      public static final MilkTheme COCOA
    • MILK

      public static final MilkTheme MILK
  • Method Details

    • pick

      public static MilkTheme pick(String setting, boolean systemDark)
      The look to use: choccy.theme, or the computer's dark / light mode.
    • family

      public static String family()
      A rounded, friendly face when the computer has one; the standard sans otherwise.
    • font

      public static Font font(int style, float size)
    • paintPage

      public void paintPage(Graphics2D g, int w, int h, float bandH, float u, long now)
      The background, and the chocolate band at the top (bandH tall, drips below it).
    • drips

      public static Shape drips(int w, float bandH, float u, float grow)
      The band with drips hanging off its bottom edge; grow 0..1 lets the drips run down.
    • wave

      public static Shape wave(float x, float y, float w, float amp, float waves, double phase)
      A gentle wave from (x, y) across w.
    • shadow

      public void shadow(Graphics2D g, float x, float y, float w, float h, float r, float u)
      A soft shadow under a rounded panel.
    • pick

      public void pick(Graphics2D g, float x, float y, float w, float h, float u, boolean focused)
      The chosen row's pill.
    • glass

      public static void glass(Graphics2D g, float x, float y, float w, float h, float fill, float mix, float straw, float slosh, double phase, Color edge, Color milk, Color choc, Color chocLight)
      The logo: a glass at (x, y), w wide and h tall. fill 0..1 is how full it is, mix 0..1 how much chocolate is stirred in (0: plain milk), straw 0..1 how far the straw is in (0: none), slosh a little wave on the top, phase moves it.
    • mix

      public static Color mix(Color a, Color b, float k)
    • alpha

      public static Color alpha(Color c, float a)
    • icon

      public static BufferedImage icon(int size)
      The app icon at one size: the glass on a rounded chocolate square.
    • icons

      public static List<BufferedImage> icons()
      Icons for the window (each size drawn on its own, so small ones stay crisp).