Package de.lessvoid.nifty.tools

Examples of de.lessvoid.nifty.tools.Color


      id("special-hint#hint-text");
      base("base-font");
      alignLeft();
      valignCenter();
      textHAlignLeft();
      color(new Color("#000f"));
    }}.build(nifty);
  }
View Full Code Here


    } catch (NumberFormatException e) {
    }
  }

  private void changeColor() {
    color.getRenderer(PanelRenderer.class).setBackgroundColor(new Color(red / 255.f, green / 255.f, blue / 255.f, alpha / 255.f));
    getLabel("redLabel").setText(String.valueOf((int)red));
    getLabel("greenLabel").setText(String.valueOf((int)green));
    getLabel("blueLabel").setText(String.valueOf((int)blue));
    getLabel("alphaLabel").setText(String.valueOf((int)alpha));
  }
View Full Code Here

  public void init(final Properties parameter, final Attributes controlDefinitionAttributes) {
    passwordCharTextField.setText("*");
    maxLengthTextField.setText("5");
    textChangedLabel.setText("---");
    keyEventLabel.setText("---");
    keyEventLabel.setColor(new Color("#ff0f"));
    setPasswordCharTextFieldEnableState();
    setMaxLengthFieldEnableState();
  }
View Full Code Here

    renderDevice.renderQuad(x + getX(), y + getY(), width, height, color);
  }

  public void renderQuad(final int x, final int y, final int width, final int height, final Color topLeft, final Color topRight, final Color bottomRight, final Color bottomLeft) {
    if (isColorAlphaChanged()) {
      Color a = new Color(topLeft, color.getAlpha());
      Color b = new Color(topRight, color.getAlpha());
      Color c = new Color(bottomRight, color.getAlpha());
      Color d = new Color(bottomLeft, color.getAlpha());
      renderDevice.renderQuad(x + getX(), y + getY(), width, height, a, b, c, d);
    } else {
      renderDevice.renderQuad(x + getX(), y + getY(), width, height, topLeft, topRight, bottomRight, bottomLeft);
    }
  }
View Full Code Here

  public void renderImage(final NiftyImage image, final int x, final int y, final int width, final int height) {
    float alpha = 1.0f;
    if (color != null) {
      alpha = color.getAlpha();
    }
    image.render(x + getX(), y + getY(), width, height, new Color(1.0f, 1.0f, 1.0f, alpha), imageScale);
  }
View Full Code Here

  /**
   * @see de.lessvoid.nifty.render.NiftyRenderEngine#setColor(de.lessvoid.nifty.tools.Color)
   * @param colorParam color
   */
  public void setColor(final Color colorParam) {
    color = new Color(colorParam);
    colorChanged = true;
    colorAlphaChanged = true;
  }
View Full Code Here

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    entries.clear();
    for (Attributes entry : parameter.getEffectValues().getValues()) {
      SizeValue offset = new SizeValue(entry.get("offset"));
      Color color = entry.getAsColor("color");
      entries.add(new Entry(offset, color));
    }
    horizontal = "horizontal".equals(parameter.getProperty("direction", "vertical"));
  }
View Full Code Here

  private Color tempColor = new Color("#000f");
  private Color startColor;
  private Color endColor;

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

  private Color startColor;
  private Color endColor;
  private SizeValue width;

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    startColor = new Color(parameter.getProperty("startColor", "#0000"));
    endColor = new Color(parameter.getProperty("endColor", "#ffff"));
    width = new SizeValue(parameter.getProperty("width"));
  }
View Full Code Here

  private Pulsator pulsator;
  private boolean changeColorOnly = false;
  private boolean activated = false;

  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"));
    width = new SizeValue(parameter.getProperty("width"));
    changeColorOnly = new Boolean(parameter.getProperty("changeColorOnly", "false"));
    pulsator = new Pulsator(parameter, new TimeProvider());
  }
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.