Package de.lessvoid.nifty.elements

Examples of de.lessvoid.nifty.elements.Element$LocalEndNotify


    if (focusHandler.getKeyboardFocusElement() != null) {
      return;
    }

    if (defaultFocusElementId != null) {
      Element defaultFocus = getFocusHandler().findElement(defaultFocusElementId);
      if (defaultFocus != null) {
        defaultFocus.setFocus();
        return;
      }
    }

    // fall back to first element
    Element firstFocus = getFocusHandler().getFirstFocusElement();
    if (firstFocus != null) {
      firstFocus.setFocus();
    }
  }
View Full Code Here


  /**
   * Start the onActive effect.
   */
  private void activeEffectStart() {
    for (int i=0; i<layerElements.size(); i++) {
      Element w = layerElements.get(i);
      w.startEffect(EffectEventId.onActive, null);

      // in case this element is disabled we will start the disabled effect right here.
      if (!w.isEnabled()) {
        w.startEffect(EffectEventId.onDisabled, null);
      }
    }
  }
View Full Code Here

   * render all layers.
   * @param renderDevice the renderDevice to use
   */
  public final void renderLayers(final NiftyRenderEngine renderDevice) {
    for (int i=0; i<layerElements.size(); i++) {
      Element layer = layerElements.get(i);
      layer.render(renderDevice);
    }
  }
View Full Code Here

    }
  }

  public void resetLayout() {
    for (int i=0; i<layerElements.size(); i++) {
      Element layer = layerElements.get(i);
      layer.resetLayout();
    }
  }
View Full Code Here

  private boolean forwardMouseEventToLayers(final List < Element > layerList, final NiftyMouseInputEvent inputEvent) {
    mouseOverHandler.reset();

    long eventTime = timeProvider.getMsTime();
    for (int i=0; i<layerList.size(); i++) {
      Element layer = layerList.get(i);
      layer.buildMouseOverElements(inputEvent, eventTime, mouseOverHandler);
    }

    if (log.isLoggable(Level.FINE)) {
      log.fine(mouseOverHandler.getInfoString());
    }
View Full Code Here

   * @param name the id to find
   * @return the element or null
   */
  public Element findElementByName(final String name) {
    for (int i=0; i<layerElements.size(); i++) {
      Element layer = layerElements.get(i);
      Element found = layer.findElementByName(name);
      if (found != null) {
        return found;
      }
    }
    return null;
View Full Code Here

    }
    return null;
  }

  public < T extends Controller > T findControl(final String elementName, final Class < T > requestedControlClass) {
    Element element = findElementByName(elementName);
    if (element == null) {
      return null;
    }
    return element.getControl(requestedControlClass);
  }
View Full Code Here

    }
    return element.getControl(requestedControlClass);
  }

  public < T extends NiftyControl > T findNiftyControl(final String elementName, final Class < T > requestedControlClass) {
    Element element = findElementByName(elementName);
    if (element == null) {
      log.warning("missing element/control with id [" + elementName + "] for requested control class [" + requestedControlClass.getName() + "]");
      return NullObjectFactory.createNull(requestedControlClass);
    }
    return element.getNiftyControl(requestedControlClass);
  }
View Full Code Here

   * set alternate key.
   * @param alternateKey alternate key to set
   */
  public void setAlternateKey(final String alternateKey) {
    for (int i=0; i<layerElements.size(); i++) {
      Element layer = layerElements.get(i);
      layer.setAlternateKey(alternateKey);
    }
  }
View Full Code Here

    return result.toString();
  }

  private void debugOutputLayerElements(final String regexpElement, final String regexpAttribute, StringBuffer result, ArrayList<Element> layers) {
    for (int i=0; i<layers.size(); i++) {
      Element layer = layers.get(i);
      String layerType = " +";
      if (!layer.isVisible()) {
        layerType = " -";
      }
      result.append(
          "\n" + layerType + getIdText(layer) +
          "\n" + StringHelper.whitespace(layerType.length()) + layer.getElementStateString(StringHelper.whitespace(layerType.length()), regexpAttribute));
      result.append(outputElement(layer, "   ", regexpElement, regexpAttribute));
    }
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.elements.Element$LocalEndNotify

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.