Package de.lessvoid.nifty.loaderv2.types

Examples of de.lessvoid.nifty.loaderv2.types.ElementType


  }

  protected void makeFlat() {
    super.makeFlat();
    setTagName("<image>");
    setElementRendererCreator(new ElementRendererCreator() {
      public ElementRenderer[] createElementRenderer(final Nifty nifty) {
        ElementRenderer[] renderer = new ElementRenderer[1];
        NiftyImage niftyImage = null;
//        String filename = getFilename();
//        if (filename != null) {
View Full Code Here


  }

  protected void makeFlat() {
    super.makeFlat();
    setTagName("<popup>");
    setElementRendererCreator(new ElementRendererCreator() {
      public ElementRenderer[] createElementRenderer(final Nifty nifty) {
        return nifty.getRootLayerFactory().createPanelRenderer();
      }
    });
  }
View Full Code Here

  }

  protected void makeFlat() {
    super.makeFlat();
    setTagName("<panel>");
    setElementRendererCreator(new ElementRendererCreator() {
      public ElementRenderer[] createElementRenderer(final Nifty nifty) {
        return nifty.getRootLayerFactory().createPanelRenderer();
      }
    });
  }
View Full Code Here

  }

  protected void makeFlat() {
    super.makeFlat();
    setTagName("<layer>");
    setElementRendererCreator(new ElementRendererCreator() {
      public ElementRenderer[] createElementRenderer(final Nifty nifty) {
        return nifty.getRootLayerFactory().createPanelRenderer();
      }
    });
  }
View Full Code Here

  }

  protected void makeFlat() {
    super.makeFlat();
    setTagName("<text>");
    setElementRendererCreator(new ElementRendererCreator() {
      public ElementRenderer[] createElementRenderer(final Nifty nifty) {
        TextRenderer textRenderer = new TextRenderer(nifty);
        ElementRenderer[] panelRenderer = nifty.getRootLayerFactory().createPanelRenderer();
        ElementRenderer[] renderer = new ElementRenderer[panelRenderer.length + 1];
        for (int i = 0; i < panelRenderer.length; i++) {
View Full Code Here

  }

  public void makeFlat() {
    super.makeFlat();
    setTagName("<controlDefinition>");
    setElementRendererCreator(new NullElementRendererCreator());
  }
View Full Code Here

  }

  protected void makeFlat() {
    super.makeFlat();
    setTagName("<control>");
    setElementRendererCreator(new NullElementRendererCreator());
  }
View Full Code Here

  private OnClickType getOnClickType(final String key) {
    String onClick = getAttributes().get(key);
    if (onClick == null) {
      return null;
    }
    return new OnClickType(onClick);
  }
View Full Code Here

    materializeMethods(nifty, element, element.getElementInteraction().getSecondary(),
        "onSecondaryClick", "onSecondaryClickRepeat", "onSecondaryRelease", "onSecondaryClickMouseMove", controller);
    materializeMethods(nifty, element, element.getElementInteraction().getTertiary(),
        "onTertiaryClick", "onTertiaryClickRepeat", "onTertiaryRelease", "onTertiaryClickMouseMove", controller);

    OnClickType onMouseOver = getOnClickType("onMouseOver");
    if (onMouseOver != null) {
      element.setOnMouseOverMethod(onMouseOver.getMethod(nifty, controller));
      element.setVisibleToMouseEvents(true);
    }
    OnClickType onMouseWheel = getOnClickType("onMouseWheel");
    if (onMouseWheel != null) {
      element.getElementInteraction().setOnMouseWheelMethod(onMouseWheel.getMethod(nifty, controller));
      element.setVisibleToMouseEvents(true);
    }
    String onClickAlternateKey = getAttributes().get("onClickAlternateKey");
    if (onClickAlternateKey != null) {
      element.setOnClickAlternateKey(onClickAlternateKey);
View Full Code Here

      final String onClickName,
      final String onClickRepeatName,
      final String onReleaseName,
      final String onClickMouseMoveName,
      final Object... controller) {
    OnClickType onClick = getOnClickType(onClickName);
    if (onClick != null) {
      handler.setOnClickMethod(onClick.getMethod(nifty, controller));
      handler.setOnClickRepeatEnabled(false);
      element.setVisibleToMouseEvents(true);
    }
    OnClickType onClickRepeat = getOnClickType(onClickRepeatName);
    if (onClickRepeat != null) {
      handler.setOnClickMethod(onClickRepeat.getMethod(nifty, controller));
      handler.setOnClickRepeatEnabled(true);
      element.setVisibleToMouseEvents(true);
    }
    OnClickType onClickMouseMove = getOnClickType(onClickMouseMoveName);
    if (onClickMouseMove != null) {
      handler.setOnClickMouseMoveMethod(onClickMouseMove.getMethod(nifty, controller));
      element.setVisibleToMouseEvents(true);
    }
    OnClickType onRelease = getOnClickType(onReleaseName);
    if (onRelease != null) {
      handler.setOnReleaseMethod(onRelease.getMethod(nifty, controller));
      element.setVisibleToMouseEvents(true);
    }
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.loaderv2.types.ElementType

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.