Package org.tomighty.ui.util

Examples of org.tomighty.ui.util.Canvas


      return cache.get(iconName);
    }

    Dimension size = tray.iconSize();
    Colors colors = look.colors();
    Canvas canvas = new Canvas(size);
    canvas.fontSize((float) size.height * 0.58f);
    canvas.paintGradient(colors.background());
    canvas.drawBorder(colors.background().darker().darker().darker());
    canvas.drawCentralizedText(time.shortestString());

    cache.store(canvas.image(), iconName);

    return canvas.image();
  }
View Full Code Here


    installedComponents.add(c);
  }

  @Override
  public void paint(Graphics g, JComponent component) {
    Canvas canvas = new Canvas(component.getSize());
    Theme theme = look.theme();
    theme.paint(canvas);
    canvas.drawBorder(look.colors().shadow());
    g.drawImage(canvas.image(), 0, 0, null);
  }
View Full Code Here

TOP

Related Classes of org.tomighty.ui.util.Canvas

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.