Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Insets


    super.refresh_fetch();
    {
      Rectangle panelBounds = getAbsoluteBounds(getObject());
      Object body = ReflectionUtils.invokeMethod(getObject(), "getBody()");
      Rectangle bodyBounds = getAbsoluteBounds(body);
      setClientAreaInsets(new Insets(bodyBounds.y - panelBounds.y,
          bodyBounds.x - panelBounds.x,
          panelBounds.bottom() - bodyBounds.bottom(),
          panelBounds.right() - bodyBounds.right()));
    }
  }
View Full Code Here


    }

    public Rectangle getBounds() {
      // prepare information about parent
      ComponentInfo parentControl = (ComponentInfo) getParent();
      Insets parentInsets = parentControl.getClientAreaInsets();
      Rectangle parentArea = parentControl.getBounds().getCropped(parentInsets);
      // prepare size of "popup"
      int width;
      int height;
      {
View Full Code Here

    if (!isPlaceholder() && isRendered()) {
      Object panelEl = JavaInfoUtils.executeScript(this, "object.el()");
      Object bodyEl = JavaInfoUtils.executeScript(this, "object.getBody()");
      Rectangle panelBounds = GxtUtils.getAbsoluteBounds(panelEl);
      Rectangle bodyBounds = GxtUtils.getAbsoluteBounds(bodyEl);
      Insets insets =
          new Insets(bodyBounds.y - panelBounds.y,
              bodyBounds.x - panelBounds.x,
              panelBounds.bottom() - bodyBounds.bottom(),
              panelBounds.right() - bodyBounds.right());
      insets.add(m_margins);
      insets.add(GxtUtils.getBorders(bodyEl));
      setClientAreaInsets(insets);
    }
  }
View Full Code Here

  // Feedbacks
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void addFeedbacks() throws Exception {
    addFeedback(0, 0, 1, 0.25, new Insets(0, 0, 1, 0), "North", "north");
    addFeedback(0, 0.75, 1, 1, new Insets(1, 0, 0, 0), "South", "south");
    addFeedback(0, 0.25, 0.25, 0.75, new Insets(1, 0, 1, 1), "West", "west");
    addFeedback(0.75, 0.25, 1, 0.75, new Insets(1, 1, 1, 0), "East", "east");
    addFeedback(0.25, 0.25, 0.75, 0.75, new Insets(1, 1, 1, 1), "Center", "center");
  }
View Full Code Here

      public boolean isRTL() {
        return false;
      }

      public Insets getInsets() {
        return new Insets();
      }

      ////////////////////////////////////////////////////////////////////////////
      //
      // Virtual columns
View Full Code Here

      int bottom = panelBounds.bottom() - bodyBounds.bottom();
      int right = panelBounds.right() - bodyBounds.right();
      /*if (bottom < 0) {
        bottom *= -1;
      }*/
      setClientAreaInsets(new Insets(top, left, bottom, right));
    }
  }
View Full Code Here

        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 3 + 4) * 2;
 
View Full Code Here

        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 3 + 4) * 2;
 
View Full Code Here

        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 0 + 0) * 2;
 
View Full Code Here

        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 0 + 0) * 2;
 
View Full Code Here

TOP

Related Classes of org.eclipse.wb.draw2d.geometry.Insets

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.