Package com.google.gdt.eclipse.designer.model.widgets.panels

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.StackPanelInfo


            "    StackPanel panel = new StackPanel();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getBounds().width).isGreaterThan(140);
    assertThat(panel.getBounds().height).isGreaterThan(20);
  }
View Full Code Here


            "      panel.add(button, 'Some text');",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    //
    Property textProperty = button.getPropertyByTitle("StackText");
    assertNotNull(textProperty);
    assertTrue(textProperty.getCategory().isSystem());
    assertEquals("Some text", textProperty.getValue());
View Full Code Here

            "      panel.add(button);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    //
    Property textProperty = button.getPropertyByTitle("StackText");
    assertNull(textProperty);
  }
View Full Code Here

            "    StackPanel panel = new StackPanel();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    assertTrue(panel.getWidgetHandles().isEmpty());
  }
View Full Code Here

            "      panel.add(button_2, 'Second widget');",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(2);
    {
      WidgetHandle handle = handles.get(0);
      assertSame(button_1, handle.getWidget());
      assertThat(handle.getBounds().x).isEqualTo(0);
View Full Code Here

            "      panel.add(button_2);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    //
    panel.getWidgetHandles().get(1).show();
    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
  }
View Full Code Here

            "      panel.add(button_2);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    // by default "button_1" is displayed
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // show "button_2" (no source should be changed)
    {
      String expectedSource = m_lastEditor.getSource();
      panel.showWidget(button_2);
      assertEditor(expectedSource, m_lastEditor);
    }
    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
  }
View Full Code Here

            "      panel.add(button_3);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    WidgetInfo button_3 = panel.getChildrenWidgets().get(2);
    // show "button_3"
    panel.showWidget(button_3);
    assertFalse(isVisible(button_1));
    assertFalse(isVisible(button_2));
    assertTrue(isVisible(button_3));
    // delete "button_3", so "button_1" should be displayed
    button_3.delete();
View Full Code Here

            "      panel.add(button_3);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    WidgetInfo button_3 = getJavaInfoByName("button_3");
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    assertFalse(isVisible(button_3));
    // move "button_3"
    panel.command_MOVE2(button_3, button_2);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    StackPanel panel = new StackPanel();",
View Full Code Here

            "    }",
            "    panel.showWidget(0);",
            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // send "selecting" broadcast
    String expectedSource = m_lastEditor.getSource();
    {
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.StackPanelInfo

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.