Package com.vaadin.data.util

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


    SimpleDateFormat formatter = new SimpleDateFormat("EEE, MMM d, ''yy");
   
    while(cal.getTime().before(today))
    {
      //create a point in time
      Item item = container.addItem(cal.getTime());
     
      //set the time stamp property
      item.getItemProperty(Timeline.PropertyId.TIMESTAMP).setValue(cal.getTime());
     
      //set the caption property
View Full Code Here


    while (cal.getTime().before(today))
    {
      if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY)
      {
        //create a point in time
        Item item = container.addItem(cal.getTime());
       
        //set the time stamp property
        item.getItemProperty(Timeline.PropertyId.TIMESTAMP).setValue(cal.getTime());
       
        //set the caption property
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        container.addContainerProperty(SHORT, String.class, null);
        container.addContainerProperty(FLAG, Resource.class, null);
        for (int i = 0; i < iso3166.length; i++) {
            String name = iso3166[i++];
            String id = iso3166[i];
            Item item = container.addItem(id);
            item.getItemProperty(NAME).setValue(name);
            item.getItemProperty(SHORT).setValue(id);
            item.getItemProperty(FLAG)
                    .setValue(
                            new ThemeResource("img/flags/" + id.toLowerCase()
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        Container container = new IndexedContainer();
        for (int i = 0; i < PROPS; ++i) {
            container.addContainerProperty("prop" + i, String.class, null);
        }
        for (int i = 0; i < ROWS; ++i) {
            Item item = container.addItem(i);
            for (int p = 0; p < PROPS; ++p) {
                item.getItemProperty("prop" + p).setValue(
                        "property value 1234567890");
            }
        }
View Full Code Here

        IndexedContainer container = new IndexedContainer();
        container.addContainerProperty(COL_A, TextField.class, null);
        container.addContainerProperty(COL_B, String.class, "");

        Item it = container.addItem("a");
        final ObjectProperty<String> valA = new ObjectProperty<String>("orgVal");
        final TextField fieldA = new TextField(valA) {
            @Override
            public void setPropertyDataSource(Property newDataSource) {
                super.setPropertyDataSource(newDataSource);
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator<?> i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
View Full Code Here

        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (options != null) {
            for (final Iterator i = options.iterator(); i.hasNext();) {
                c.addItem(i.next());
            }
        }

        setCaption(caption);
        setContainerDataSource(c);
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.