Package de.lessvoid.nifty.tools

Examples of de.lessvoid.nifty.tools.TargetElementResolver


   * @param parameter Parameter
   */
  public void activate(final Nifty niftyParam, final Element element, final EffectProperties parameter) {
    this.nifty = niftyParam;

    TargetElementResolver resolver = new TargetElementResolver(nifty.getCurrentScreen(), element);
    targetElement = resolver.resolve(parameter.getProperty("targetElement"));

    String text = parameter.getProperty("hintText");
    if (text != null) {
      hintText = text;
    }
View Full Code Here


  private Element targetElement;
  private EffectEventId effectEventId;

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    TargetElementResolver resolver = new TargetElementResolver(nifty.getCurrentScreen(), element);
    targetElement = resolver.resolve(parameter.getProperty("targetElement"));
    if (targetElement != null) {
      effectEventId = (EffectEventId) parameter.get("effectEventId");
      targetElement.startEffect(effectEventId, null);
    }
  }
View Full Code Here

*/
public class Focus implements EffectImpl {
  private Element targetElement;

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    TargetElementResolver resolver = new TargetElementResolver(nifty.getCurrentScreen(), element);
    targetElement = resolver.resolve(parameter.getProperty("targetElement"));

    if (targetElement != null) {
      targetElement.setFocus();
    } else {
      element.setFocus();
View Full Code Here

public class Show implements EffectImpl {
  private Element targetElement;

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    TargetElementResolver resolver = new TargetElementResolver(nifty.getCurrentScreen(), element);
    targetElement = resolver.resolve(parameter.getProperty("targetElement"));
  }
View Full Code Here

public class Hide implements EffectImpl {
  private Element targetElement;

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    TargetElementResolver resolver = new TargetElementResolver(nifty.getCurrentScreen(), element);
    targetElement = resolver.resolve(parameter.getProperty("targetElement"));
  }
View Full Code Here

      offsetY = Integer.valueOf(parameter.getProperty("offsetY", "0"));
    }

    String target = parameter.getProperty("targetElement");
    if (target != null) {
      TargetElementResolver resolver = new TargetElementResolver(nifty.getCurrentScreen(), element);
      Element targetElement = resolver.resolve(target);
      if (targetElement == null) {
        log.warning("move effect for element [" + element.getId() + "] was unable to find target element [" + target + "] at screen [" + nifty.getCurrentScreen().getScreenId() + "]");
        return;
      }
View Full Code Here

TOP

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

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.