Package de.lessvoid.nifty.tools

Examples of de.lessvoid.nifty.tools.Color


      borderRight = new SizeValue(parser.getRight());
      borderTop = new SizeValue(parser.getTop());
      borderBottom = new SizeValue(parser.getBottom());

      parser = new PaddingAttributeParser(parameter.getProperty("color", "#ffff"));
      colorLeft = new Color(parser.getLeft());
      colorRight = new Color(parser.getRight());
      colorTop = new Color(parser.getTop());
      colorBottom = new Color(parser.getBottom());

      parser = new PaddingAttributeParser(parameter.getProperty("inset", "0px"));
      insetLeft = new SizeValue(parser.getLeft());
      insetRight = new SizeValue(parser.getRight());
      insetTop = new SizeValue(parser.getTop());
View Full Code Here


  private SizeValue insetRight = new SizeValue("0px");
  private SizeValue insetTop = new SizeValue("0px");
  private SizeValue insetBottom = new SizeValue("0px");

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    color = new Color(parameter.getProperty("color", "#ffffffff"));
    width = new SizeValue(parameter.getProperty("width"));
    try {
      PaddingAttributeParser parser = new PaddingAttributeParser(parameter.getProperty("inset", "0px"));
      insetLeft = new SizeValue(parser.getLeft());
      insetRight = new SizeValue(parser.getRight());
View Full Code Here

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    // startColor and endColor (only alpha component used) are the old version of this
    // and are kept here only for backward compatibility. The current attributes are "start" and "end" alpha values.
    if (parameter.getProperty("startColor") != null) {
      start = new Alpha(new Color(parameter.getProperty("startColor", "#000000ff")).getAlpha());
    }
    if (parameter.getProperty("endColor") != null) {
      end = new Alpha(new Color(parameter.getProperty("endColor", "#ffffffff")).getAlpha());
    }
    if (parameter.getProperty("start") != null) {
      start = new Alpha(parameter.getProperty("start"));
    }
    if (parameter.getProperty("end") != null) {
View Full Code Here

  private Color endColor;
  private Pulsator pulsator;
  private Color currentColor = new Color("#000f");

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    startColor = new Color(parameter.getProperty("startColor", "#00000000"));
    endColor = new Color(parameter.getProperty("endColor", "#ffffffff"));
    pulsator = new Pulsator(parameter, new TimeProvider());
  }
View Full Code Here

  public Color getAsColor(final String name) {
    String value = get(name);
    if (value == null) {
      return null;
    }
    return new Color(value);
  }
View Full Code Here

  public Color color(final String value) {
    if (value == null) {
      return DEFAULT_COLOR;
    }
    return new Color(value);
  }
View Full Code Here

    public Result(final String value, final int endIdx) {
      nextIndex = -1;
      color = null;
      isColor = Color.check(value);
      if (isColor) {
        color = new Color(value);
        nextIndex = endIdx;
      }
    }
View Full Code Here

      int activeTextureIdx = -1;

      for (int i = 0; i < text.length(); i++) {
        Result result = colorValueParser.isColor(text, i);
        while (result.isColor()) {
          Color color = result.getColor();
          GL11.glColor4f(color.getRed(), color.getGreen(), color.getBlue(), alpha);
          i = result.getNextIndex();
          if (i >= text.length()) {
            break;
          }
          result = colorValueParser.isColor(text, i);
View Full Code Here

  }
 
  public void addDebugOutput(String s){addDebugOutput(s, DebugLogLevel.Info);}
  public void addDebugOutput(String s, DebugLogLevel l)
  {
    Color c = (l == DebugLogLevel.Error ? RED : (l == DebugLogLevel.Warning ? YELLOW : GREEN));
   
    debugEntries.addItem(new DebugEntry(timeFormat.format(System.currentTimeMillis()) + "> " +s, c));
    debugEntries.showItemByIndex(debugEntries.itemCount() - 1);
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.tools.Color

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.