Package org.eclipse.wb.draw2d.geometry

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


            "  }",
            "}");
    assertHierarchy("{this: com.google.gwt.user.client.ui.CaptionPanel} {this} {}");
    panel.refresh();
    //
    Rectangle bounds = panel.getBounds();
    assertEquals(450, bounds.width);
    assertEquals(300, bounds.height);
  }
View Full Code Here


            "  }",
            "}");
    assertHierarchy("{new: com.google.gwt.user.client.ui.CaptionPanel} {local-unique: captionPanel} {/new CaptionPanel()/}");
    panel.refresh();
    //
    Rectangle bounds = panel.getBounds();
    assertEquals(450, bounds.width);
    assertEquals(300, bounds.height);
  }
View Full Code Here

            "  }",
            "}");
    panel.refresh();
    assertNoErrors(panel);
    // bounds
    Rectangle bounds = panel.getBounds();
    assertThat(bounds.width).isEqualTo(450);
    assertThat(bounds.height).isEqualTo(300);
  }
View Full Code Here

            "  }",
            "}");
    panel.refresh();
    assertNoErrors(panel);
    // bounds
    Rectangle bounds = panel.getBounds();
    assertThat(bounds.width).isEqualTo(450);
    assertThat(bounds.height).isEqualTo(300);
  }
View Full Code Here

            "    panel.add(new Button());",
            "  }",
            "}");
    panel.refresh();
    //
    Rectangle bounds = panel.getBounds();
    assertEquals(450, bounds.width);
    assertEquals(300, bounds.height);
  }
View Full Code Here

    for (int index = 0; index < widgets.size(); index++) {
      WidgetInfo widget = widgets.get(index);
      // use "1 +" because first TD is "gwt-TabBarFirst"
      Object tabElement = dom.getChild(tabBarRowElement, 1 + index);
      tabElement = dom.getChild(tabElement, 0);
      Rectangle tabBounds = state.getAbsoluteBounds(tabElement);
      absoluteToRelative(tabBounds);
      // remember tab and bounds
      m_widgetHandles.add(new WidgetHandle(widget));
      m_widgetToHandleBounds.put(widget, tabBounds);
    }
View Full Code Here

    private void fetchBounds() {
      Object element = getObject();
      // absolute bounds
      m_absoluteBounds = getState().getAbsoluteBounds(element);
      // model/parent bounds
      Rectangle bounds = m_absoluteBounds.getCopy();
      AbstractComponentInfo parent = (AbstractComponentInfo) getParent();
      bounds.translate(parent.getAbsoluteBounds().getLocation().getNegated());
      bounds.translate(parent.getClientAreaInsets().getNegated());
      setModelBounds(bounds);
    }
View Full Code Here

            "    }",
            "  }",
            "}");
    // drag header of "button_2"
    {
      Rectangle bounds = panel.getWidgetHandles().get(1).getBounds();
      canvas.moveTo(panel, bounds.x, bounds.y);
      canvas.beginDrag().dragTo(panel, 5, 10).endDrag();
    }
    assertEditor(
        "public class Test extends TabLayoutPanel {",
View Full Code Here

            "    }",
            "  }",
            "}");
    // drag header of "button_1"
    {
      Rectangle bounds = panel.getWidgetHandles().get(0).getBounds();
      canvas.moveTo(panel, bounds.x, bounds.y);
      canvas.beginDrag().dragTo(panel, -5, 10).endDrag();
    }
    assertEditor(
        "public class Test extends TabLayoutPanel {",
View Full Code Here

    // initially "button_1" is visible
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // double click handle of "button_1"
    {
      Rectangle bounds = panel.getWidgetHandles().get(1).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y).doubleClick();
    }
    // now "button_2" is visible
    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
View Full Code Here

TOP

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

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.