Examples of LayoutPart


Examples of de.lessvoid.nifty.layout.LayoutPart

    int rootBoxWidth = getRootBoxWidth(rootElement);
    int rootBoxHeight = getRootBoxHeight(rootElement);

    // now do the layout
    for (int i = 0; i < elements.size(); i++) {
      LayoutPart p = elements.get(i);
      Box box = p.getBox();
      BoxConstraints cons = p.getBoxConstraints();

      // makes only sense with constraints given
      if (cons != null) {
        if (cons.getX() != null) {
          box.setX(rootBoxX + cons.getX().getValueAsInt(rootBoxWidth));
View Full Code Here

Examples of de.lessvoid.nifty.layout.LayoutPart

   */
  public SizeValue calculateConstraintWidth(final LayoutPart root, final List < LayoutPart > children) {
    if (children.isEmpty()) {
      return null;
    }
    LayoutPart firstChild = children.get(0);
    if (firstChild == null) {
      return null;
    }
    BoxConstraints constraint = firstChild.getBoxConstraints();
    if (constraint == null) {
      return null;
    }
    return
      new SizeValue(
View Full Code Here

Examples of de.lessvoid.nifty.layout.LayoutPart

   */
  public SizeValue calculateConstraintHeight(final LayoutPart root, final List < LayoutPart > children) {
    if (children.isEmpty()) {
      return null;
    }
    LayoutPart firstChild = children.get(0);
    if (firstChild == null) {
      return null;
    }
    BoxConstraints constraint = firstChild.getBoxConstraints();
    if (constraint == null) {
      return null;
    }
    return
      new SizeValue(
View Full Code Here

Examples of de.lessvoid.nifty.layout.LayoutPart

    int rootBoxWidth = getRootBoxWidth(root);
    int rootBoxHeight = getRootBoxHeight(root);

    int x = rootBoxX;
    for (int i = 0; i < children.size(); i++) {
      LayoutPart current = children.get(i);
      Box box = current.getBox();
      BoxConstraints boxConstraints = current.getBoxConstraints();

      int elementWidth;
      if (boxConstraints.getWidth() != null && boxConstraints.getWidth().hasHeightSuffix()) {
        int elementHeight = processHeightConstraint(rootBoxHeight, box, boxConstraints, 0);
        box.setHeight(elementHeight);
View Full Code Here

Examples of de.lessvoid.nifty.layout.LayoutPart

      final int parentWidth
      ) {
    int maxFixedWidth = 0;
    int fixedCount = 0;
    for (int i = 0; i < elements.size(); i++) {
      LayoutPart p = elements.get(i);
      BoxConstraints original = p.getBoxConstraints();

      if (original.getWidth() != null) {
        if (original.getWidth().isPercentOrPixel()) {
          maxFixedWidth += original.getWidth().getValue(parentWidth);
          fixedCount++;
View Full Code Here

Examples of de.lessvoid.nifty.layout.LayoutPart

  private int getMaxNonFixedHeight(final List < LayoutPart > elements, final int parentHeight) {
    int maxFixedHeight = 0;
    int fixedCount = 0;

    for (int i = 0; i < elements.size(); i++) {
      LayoutPart p = elements.get(i);
      BoxConstraints original = p.getBoxConstraints();
      if (hasHeightConstraint(original)) {
        if (original.getHeight().isPercentOrPixel()) {
          maxFixedHeight += original.getHeight().getValue(parentHeight);
          fixedCount++;
        }
View Full Code Here

Examples of de.lessvoid.nifty.layout.LayoutPart

    // get the root box
    Box rootBox = rootElement.getBox();

    // now do the layout
    for (int i = 0; i < elements.size(); i++) {
      LayoutPart p = elements.get(i);
      Box box = p.getBox();
      box.setX(rootBox.getX());
      box.setY(rootBox.getY());
      box.setWidth(rootBox.getWidth());
      box.setHeight(rootBox.getHeight());
    }
View Full Code Here

Examples of org.eclipse.ui.internal.LayoutPart

     */
    private void splitEditorArea() {
        IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IWorkbenchPart part = workbenchPage.getActivePart();
        PartPane partPane = ((PartSite) part.getSite()).getPane();
        LayoutPart layoutPart = partPane.getPart();

        IEditorReference[] editorReferences = workbenchPage.getEditorReferences();
        // Do it only if we have more that one editor
        if (editorReferences.length > 1) {
            // Get PartPane that correspond to the active editor
            PartPane currentEditorPartPane = ((PartSite) workbenchPage.getActiveEditor().getSite()).getPane();
            EditorSashContainer editorSashContainer = null;
            ILayoutContainer rootLayoutContainer = layoutPart.getContainer();
            if (rootLayoutContainer instanceof LayoutPart) {
                ILayoutContainer editorSashLayoutContainer = ((LayoutPart) rootLayoutContainer).getContainer();
                if (editorSashLayoutContainer instanceof EditorSashContainer) {
                    editorSashContainer = ((EditorSashContainer) editorSashLayoutContainer);
                }
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.