Examples of CycleButtonInfo


Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    assertEquals(true, ReflectionUtils.invokeMethod(button.getObject(), "isRendered()"));
    // prepare item
    CheckItemInfo item;
    {
      List<CheckItemInfo> items = button.getCheckItems();
      assertThat(items).hasSize(1);
      item = items.get(0);
    }
    // item should be rendered, default values for properties fetched
    assertEquals(true, ReflectionUtils.invokeMethod(item.getObject(), "isRendered()"));
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    List<CheckItemInfo> items = button.getCheckItems();
    assertThat(items).hasSize(2);
    {
      CheckItemInfo item_1 = items.get(0);
      assertThat(item_1.getPropertyByTitle("checked").getValue()).isEqualTo(false);
      assertThat(item_1.isChecked()).isTrue();
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    List<CheckItemInfo> items = button.getCheckItems();
    assertThat(items).hasSize(2);
    {
      CheckItemInfo item_1 = items.get(0);
      assertThat(item_1.getPropertyByTitle("checked").getValue()).isEqualTo(true);
      assertThat(item_1.isChecked()).isTrue();
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    RootPanel rootPanel = RootPanel.get();",
            "  }",
            "}");
    frame.refresh();
    // create CycleButton
    CycleButtonInfo button =
        (CycleButtonInfo) createWidget("com.gwtext.client.widgets.CycleButton");
    assertThat(button.getCheckItems()).isEmpty();
    // add CycleButton on RootPanel
    frame.command_CREATE2(button, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
        "      CycleButton cycleButton = new CycleButton();",
        "      cycleButton.setShowText(true);",
        "      {",
        "        CheckItem checkItem = new CheckItem('Default', true);",
        "        cycleButton.addItem(checkItem);",
        "      }",
        "      rootPanel.add(cycleButton);",
        "    }",
        "  }",
        "}");
    // CycleButton already contains one CheckItem
    assertThat(button.getCheckItems()).hasSize(1);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    List<CheckItemInfo> items = button.getCheckItems();
    assertThat(items).hasSize(2);
    // remove all items
    CheckItemInfo item_1 = items.get(0);
    CheckItemInfo item_2 = items.get(1);
    // delete "item_1", so "item_2" should be checked
    item_1.delete();
    assertThat(button.getCheckItems()).hasSize(1);
    assertEditor(
        "import com.gwtext.client.widgets.CycleButton;",
        "import com.gwtext.client.widgets.menu.CheckItem;",
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
        "      CycleButton button = new CycleButton();",
        "      {",
        "        CheckItem checkItem2 = new CheckItem('check 2', true);",
        "        button.addItem(checkItem2);",
        "      }",
        "      rootPanel.add(button);",
        "    }",
        "  }",
        "}");
    // delete "item_2", default item should be added
    item_2.delete();
    assertThat(button.getCheckItems()).hasSize(1);
    assertEditor(
        "import com.gwtext.client.widgets.CycleButton;",
        "import com.gwtext.client.widgets.menu.CheckItem;",
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    assertThat(button.getCheckItems()).hasSize(1);
    // add new item
    CheckItemInfo newItem =
        (CheckItemInfo) createWidget("com.gwtext.client.widgets.menu.CheckItem");
    do_CREATE(button, newItem, null);
    assertEditor(
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    assertThat(button.getCheckItems()).hasSize(1);
    CheckItemInfo existingItem = button.getCheckItems().get(0);
    // add new item
    CheckItemInfo newItem =
        (CheckItemInfo) createWidget("com.gwtext.client.widgets.menu.CheckItem");
    do_CREATE(button, newItem, existingItem);
    assertEditor(
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    assertThat(button.getCheckItems()).hasSize(2);
    // add new item
    CheckItemInfo newItem =
        (CheckItemInfo) createWidget("com.gwtext.client.widgets.menu.CheckItem");
    do_CREATE(button, newItem, null);
    assertThat(button.getCheckItems()).hasSize(3);
    assertEditor(
        "import com.gwtext.client.widgets.CycleButton;",
        "import com.gwtext.client.widgets.menu.CheckItem;",
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.CycleButtonInfo

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    CycleButtonInfo button = frame.getChildren(CycleButtonInfo.class).get(0);
    List<CheckItemInfo> items = button.getCheckItems();
    // add new item
    do_MOVE(button, items.get(0), null);
    assertEditor(
        "import com.gwtext.client.widgets.CycleButton;",
        "import com.gwtext.client.widgets.menu.CheckItem;",
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.