Package org.tomighty.ui.theme

Examples of org.tomighty.ui.theme.Colors


    if (cache.contains(iconName)) {
      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


public class Gradient extends CachedTheme {
 
  @Override
  public void paint(Canvas canvas, Look look) {
    Colors colors = look.colors();
    Color background = colors.background();
    canvas.paintGradient(background);
  }
View Full Code Here

@FriendlyName("Brushed metal")
public class BrushedMetal extends CachedTheme {

  @Override
  public void paint(Canvas canvas, Look look) {
    Colors colors = look.colors();
    BrushedMetalFilter filter = new BrushedMetalFilter();
    filter.setColor(colors.background().getRGB());
    filter.setRadius(10);
    filter.setAmount(0.15f);
    filter.setMonochrome(true);
    filter.setShine(0.2f);
    canvas.applyFilter(filter);
View Full Code Here

public class Grainy extends CachedTheme {

  @Override
  public void paint(Canvas canvas, Look look) {
    Colors colors = look.colors();
    canvas.paintGradient(colors.background());
    NoiseFilter filter = new NoiseFilter();
    filter.setMonochrome(true);
    filter.setDensity(0.5f);
    filter.setAmount(13);
    canvas.applyFilter(filter);
View Full Code Here

public class Shiny extends CachedTheme {

  @Override
  public void paint(Canvas canvas, Look look) {
    Colors colors = look.colors();
    Color background = colors.background();
    Color bright = background.brighter().brighter();
    Color dark = background.darker();
    canvas.paintShinyBackground(bright, dark);
  }
View Full Code Here

    private boolean canRenderAllCharacters(Font font) {
      return false;
    }

    private void drawLines(WrappedLines lines, Graphics2D g) {
      Colors colors = look.colors();
      float y = originY(lines);
      for(TextLayout line : lines.list) {
        float x = xFor(line);
        y += line.getAscent() - line.getDescent();
        Color shadowColor = colors.shadow();
        g.setColor(shadowColor);
        line.draw(g, x-1, y-1);
        g.setColor(colors.text());
        line.draw(g, x, y);
        y += line.getDescent();
      }
    }
View Full Code Here

TOP

Related Classes of org.tomighty.ui.theme.Colors

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.