Examples of addItemAt()


Examples of com.vaadin.data.util.IndexedContainer.addItemAt()

        HorizontalLayout hl = new HorizontalLayout();
        hl.addComponent(new Button("Add first", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                Item item = container.addItemAt(0, new Object());
                item.getItemProperty("column1").setValue("0");
            }
        }));
        hl.addComponent(new Button("Add at position 50",
                new Button.ClickListener() {
View Full Code Here

Examples of com.vaadin.data.util.IndexedContainer.addItemAt()

        }));
        hl.addComponent(new Button("Add at position 50",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        Item item = container.addItemAt(50, new Object());
                        item.getItemProperty("column1").setValue("50");
                    }
                }));
        hl.addComponent(new Button("Add at position 100",
                new Button.ClickListener() {
View Full Code Here

Examples of com.vaadin.data.util.IndexedContainer.addItemAt()

                }));
        hl.addComponent(new Button("Add at position 100",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        Item item = container.addItemAt(100, new Object());
                        item.getItemProperty("column1").setValue("100");
                    }
                }));

        getLayout().addComponent(table);
View Full Code Here

Examples of com.vaadin.data.util.IndexedContainer.addItemAt()

        @SuppressWarnings("unchecked")
        public void addNewRow() {
            IndexedContainer idc = (IndexedContainer) getContainerDataSource();
            int size = idc.size();
            Object itemId = idc.addItemAt(size - 1);
            Item newItem = idc.getItem(itemId);
            TextField tf = new TextField();
            if (inputPrompt != null && inputPrompt.length() > 0) {
                tf.setInputPrompt(inputPrompt);
            }
View Full Code Here

Examples of com.vaadin.data.util.IndexedContainer.addItemAt()

            newItem.getItemProperty("id").setValue(nextItemIndex);
            nextItemIndex++;
            newItem.getItemProperty("text").setValue(tf);
            setValue(itemId);
            itemId = idc.addItemAt(size);
            newItem = idc.getItem(itemId);

            tf = new TextField();
            if (inputPromptChild != null && inputPromptChild.length() > 0) {
                tf.setInputPrompt(inputPromptChild);
View Full Code Here

Examples of org.jboss.soa.esb.message.Attachment.addItemAt()

    Attachment at = msg.getAttachment();

    assertEquals((msg != null), true);

    at.addItem(new ExampleObject(0)); // un-named
    at.addItemAt(0, new ExampleObject(0)); // un-named;

    try
    {
      at.addItem(new Object());
View Full Code Here

Examples of org.jboss.soa.esb.message.Attachment.addItemAt()

    Attachment at = msg.getAttachment();

    assertEquals((msg != null), true);

    at.addItem(new ExampleObject(0)); // un-named
    at.addItemAt(0, new ExampleObject(0)); // un-named;

    try
    {
      at.addItem(new Object());
View Full Code Here

Examples of org.olat.ims.cp.objects.CPItem.addItemAt()

    if (parentElement instanceof CPItem) {
      // parent is a <item>
      if (newElement instanceof CPItem) {
        // only CPItems can be added to CPItems
        CPItem item = (CPItem) parentElement;
        item.addItemAt((CPItem) newElement, position);
        return true;
      } else {
        throw new OLATRuntimeException(CPOrganizations.class, "you can only add <item>  elements to an <item>-element", new Exception());
      }
View Full Code Here

Examples of org.olat.ims.cp.objects.CPItem.addItemAt()

      DefaultElement parent = beforeItem.getParentElement();
      if (!(newElement instanceof CPItem)) { throw new OLATRuntimeException(CPOrganizations.class, "only <item> element allowed",
          new Exception()); }
      if (parent instanceof CPItem) {
        CPItem p = (CPItem) parent;
        p.addItemAt((CPItem) newElement, beforeItem.getPosition() + 1);
      } else if (parent instanceof CPOrganization) {
        CPOrganization o = (CPOrganization) parent;
        o.addItemAt((CPItem) newElement, beforeItem.getPosition() + 1);
      } else {
        throw new OLATRuntimeException(CPOrganizations.class, "you cannot add an <item> element to a " + parent.getName() + " element",
View Full Code Here

Examples of org.olat.ims.cp.objects.CPOrganization.addItemAt()

    } else if (parentElement instanceof CPOrganization) {
      // parent is a <organization>
      if (newElement instanceof CPItem) {
        // add a new item to organization element
        CPOrganization org = (CPOrganization) parentElement;
        org.addItemAt((CPItem) newElement, position);
        return true;
      } else {
        throw new OLATRuntimeException(CPOrganizations.class, "you can only add <item>  elements to an <organization>-element",
            new Exception());
      }
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.