Examples of SizeValue


Examples of de.lessvoid.nifty.tools.SizeValue

    return new SizeValue(value);
  }

  public SizeValue paddingSizeValue(final String value) {
    if (value == null) {
      return new SizeValue(DEFAULT_PADDING);
    }
    return new SizeValue(value);
  }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

    return new SizeValue(value);
  }

  public SizeValue paddingSizeValue(final String value, final String defaultValue) {
    if (value == null) {
      return new SizeValue(defaultValue);
    }
    return new SizeValue(value);
  }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

  public int insetSizeValue(final String value, final int imageHeight) {
    if (value == null) {
      return 0;
    }
    SizeValue sizeValue = new SizeValue(value);
    return sizeValue.getValueAsInt(imageHeight);
  }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

      return elementBackground.getWidth() - elementPosition.getWidth();
    }

    @Override
    public void update(final int position) {
      elementPosition.setConstraintX(new SizeValue(position + "px"));
      elementBackground.layoutElements();
    }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

      return elementBackground.getHeight() - elementPosition.getHeight();
    }

    @Override
    public void update(final int position) {
      elementPosition.setConstraintY(new SizeValue(position + "px"));
      elementBackground.layoutElements();
    }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

    if (applyWidthConstraintsLastWidth  == width) {
      return;
    }

    applyWidthConstraintsLastWidth = width;
    SizeValue newWidthSizeValue = new SizeValue(width + "px");
    for (Element element : labelElements) {
      if (element != null) {
        element.setConstraintWidth(newWidthSizeValue);
      }
    }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

      if (vertical != null) {
        nifty.removeElement(screen, vertical);
      }
    }

    childRootElement.setConstraintX(new SizeValue("0px"));
    childRootElement.setConstraintY(new SizeValue("0px"));

    updateBottomRightElement();
    nifty.executeEndOfFrameElementActions();
    screen.layoutLayers();
  }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

      }
    }
  }

  private void initializeScrollElementHeight() {
    scrollElement.setConstraintHeight(new SizeValue(displayItems * labelTemplateHeight + "px"));
  }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

      verticalScrollbar = ScrollbarMode.off;
    }
  }

  private void setElementHeight() {
    getElement().setConstraintHeight(new SizeValue(displayItems * labelTemplateHeight + findHorizontalScrollbarHeight() + "px"));
    screen.layoutLayers();
  }
View Full Code Here

Examples of de.lessvoid.nifty.tools.SizeValue

    String substring = text.substring(0, cursorPos);
    int textWidth = textRenderer.getFont().getWidth(substring);
    int cursorPixelPos = textWidth - d;

    cursorElement.setConstraintX(new SizeValue(cursorPixelPos + "px"));
    cursorElement.setConstraintY(new SizeValue((getElement().getHeight() - cursorElement.getHeight()) / 2 + CURSOR_Y + "px"));
    cursorElement.startEffect(EffectEventId.onActive, null);
    if (screen != null) {
      screen.layoutLayers();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.