Package de.lessvoid.nifty.loaderv2.types

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


    return parent.findNiftyControl(attributes.get("id"), ListBox.class);
  }

  @Override
  public ElementType createType() {
    return new ControlType(attributes);
  }
View Full Code Here


    return parent.findNiftyControl(attributes.get("id"), RadioButton.class);
  }

  @Override
  public ElementType createType() {
    return new ControlType(attributes);
  }
View Full Code Here

    return parent.findNiftyControl(attributes.get("id"), RadioButtonGroup.class);
  }

  @Override
  public ElementType createType() {
    return new ControlType(attributes);
  }
View Full Code Here

  public void addEffectValues(final EffectValueType value) {
    effectValues.add(value);
  }

  public EffectType create() {
    EffectType effectType = new EffectType();
    effectType.initFromAttributes(attributes);
    for (int i=0; i<effectValues.size(); i++) {
      effectType.addValue(effectValues.get(i));
    }
    return effectType;
  }
View Full Code Here

  public void setControlHoverAttributes(final ControlHoverAttributes controlHoverAttributesParam) {
    controlHoverAttributes = controlHoverAttributesParam;
  }

  public EffectTypeOnHover create() {
    EffectTypeOnHover effectTypeOnHover = new EffectTypeOnHover();
    effectTypeOnHover.initFromAttributes(attributes);
    for (int i=0; i<effectValues.size(); i++) {
      effectTypeOnHover.addValue(effectValues.get(i));
    }
    if (controlHoverAttributes != null) {
      effectTypeOnHover.setHover(controlHoverAttributes.create());
    }
    return effectTypeOnHover;
  }
View Full Code Here

  public EffectBuilder effectValue(final String ... values) {
    if (values == null || values.length % 2 != 0) {
      logger.warning("effect values must be given in pairs, example: effectValue(\"color\", \"#f00f\")");
      return this;
    }
    EffectValueType effectValue = new EffectValueType();
    for (int i=0; i<values.length/2; i++) {
      String key = values[i*2+0];
      String value = values[i*2+1];
      effectValue.getAttributes().set(key, value);
    }
    attributes.addEffectValues(effectValue);
    return this;
  }
View Full Code Here

  public HoverEffectBuilder effectValue(final String ... values) {
    if (values == null || values.length % 2 != 0) {
      logger.warning("effect values must be given in pairs, example: effectValue(\"color\", \"#f00f\")");
      return this;
    }
    EffectValueType effectValue = new EffectValueType();
    for (int i=0; i<values.length/2; i++) {
      String key = values[i*2+0];
      String value = values[i*2+1];
      effectValue.getAttributes().set(key, value);
    }
    attributes.addEffectValues(effectValue);
    return this;
  }
View Full Code Here

  public void addOnCustom(final ControlEffectAttributes effectParam) {
    onCustom.add(effectParam);
  }

  public EffectsType create() {
    EffectsType effectsType = new EffectsType();
    effectsType.initFromAttributes(attributes);
    addOnStartScreen(effectsType, onStartScreen);
    addOnEndScreen(effectsType, onEndScreen);
    addOnHover(effectsType, onHover);
    addOnStartHover(effectsType, onStartHover);
    addOnEndHover(effectsType, onEndHover);
View Full Code Here

    }
    return createElementFromTypeInternal(screen, parent, type, new LayoutPart());
  }

  private Element createElementFromTypeInternal(final Screen screen, final Element parent, final ElementType type, final LayoutPart layoutPart) {
    ElementType elementType = type.copy();
    elementType.prepare(this, screen, screen.getRootElement().getElementType());
    elementType.connectParentControls(parent);
    Element element = elementType.create(parent, this, screen, layoutPart);
    if (screen.isBound()) {
      screen.layoutLayers();
      element.bindControls(screen);
      element.initControls();
      element.startEffect(EffectEventId.onStartScreen);
View Full Code Here

      final Nifty nifty,
      final Screen screen,
      final TimeProvider time) {
    Element layer = new Element(
        nifty,
        new ElementType(),
        id,
        null,
        createRootLayerLayoutPart(nifty),
        screen.getFocusHandler(),
        false,
View Full Code Here

TOP

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

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.