Package com.vaadin.data

Examples of com.vaadin.data.Property$ReadOnlyStatusChangeListener


                caption = itemId.toString();
            }
            break;

        case ITEM_CAPTION_MODE_PROPERTY:
            final Property p = getContainerProperty(itemId,
                    getItemCaptionPropertyId());
            if (p != null) {
                caption = p.toString();
            }
            break;
        }

        // All items must have some captions
View Full Code Here


        if (getItemIconPropertyId() == null) {
            return null;
        }

        final Property ip = getContainerProperty(itemId,
                getItemIconPropertyId());
        if (ip == null) {
            return null;
        }
        final Object icon = ip.getValue();
        if (icon instanceof Resource) {
            return (Resource) icon;
        }

        return null;
View Full Code Here

                    captionChangeNotifiers.add(i);
                }
                Collection<?> pids = i.getItemPropertyIds();
                if (pids != null) {
                    for (Iterator<?> it = pids.iterator(); it.hasNext();) {
                        Property p = i.getItemProperty(it.next());
                        if (p != null
                                && p instanceof Property.ValueChangeNotifier) {
                            ((Property.ValueChangeNotifier) p)
                                    .addListener(getCaptionChangeListener());
                            captionChangeNotifiers.add(p);
                        }
                    }

                }
                break;
            case ITEM_CAPTION_MODE_PROPERTY:
                final Property p = getContainerProperty(itemId,
                        getItemCaptionPropertyId());
                if (p != null && p instanceof Property.ValueChangeNotifier) {
                    ((Property.ValueChangeNotifier) p)
                            .addListener(getCaptionChangeListener());
                    captionChangeNotifiers.add(p);
View Full Code Here

                caption = itemId.toString();
            }
            break;

        case ITEM_CAPTION_MODE_PROPERTY:
            final Property p = getContainerProperty(itemId,
                    getItemCaptionPropertyId());
            if (p != null) {
                caption = p.toString();
            }
            break;
        }

        // All items must have some captions
View Full Code Here

        if (getItemIconPropertyId() == null) {
            return null;
        }

        final Property ip = getContainerProperty(itemId,
                getItemIconPropertyId());
        if (ip == null) {
            return null;
        }
        final Object icon = ip.getValue();
        if (icon instanceof Resource) {
            return (Resource) icon;
        }

        return null;
View Full Code Here

                    captionChangeNotifiers.add(i);
                }
                Collection pids = i.getItemPropertyIds();
                if (pids != null) {
                    for (Iterator it = pids.iterator(); it.hasNext();) {
                        Property p = i.getItemProperty(it.next());
                        if (p != null
                                && p instanceof Property.ValueChangeNotifier) {
                            ((Property.ValueChangeNotifier) p)
                                    .addListener(getCaptionChangeListener());
                            captionChangeNotifiers.add(p);
                        }
                    }

                }
                break;
            case ITEM_CAPTION_MODE_PROPERTY:
                final Property p = getContainerProperty(itemId,
                        getItemCaptionPropertyId());
                if (p != null && p instanceof Property.ValueChangeNotifier) {
                    ((Property.ValueChangeNotifier) p)
                            .addListener(getCaptionChangeListener());
                    captionChangeNotifiers.add(p);
View Full Code Here

        return field;
    }

    public Field createField(Container container, Object itemId,
            Object propertyId, Component uiContext) {
        Property containerProperty = container.getContainerProperty(itemId,
                propertyId);
        Class<?> type = containerProperty.getType();
        Field field = createFieldByPropertyType(type);
        field.setCaption(createCaptionByPropertyId(propertyId));
        return field;
    }
View Full Code Here

      target.startTag(TAG_MARKERS);
      final Collection<?> itemIds = dataSource.getItemIds();
      for (final Iterator<?> it = itemIds.iterator(); it.hasNext();) {
        final Object itemId = it.next();
        final Item item = dataSource.getItem(itemId);
        Property p = item.getItemProperty(getItemMarkerXPropertyId());
        final Double x = (Double) (p != null ? p.getValue() : null);
        p = item.getItemProperty(getItemMarkerYPropertyId());
        final Double y = (Double) (p != null ? p.getValue() : null);
        if (x == null || y == null) {
          continue;
        }
        target.startTag(TAG_MARKER);
        target.addAttribute("x", x.doubleValue());
        target.addAttribute("y", y.doubleValue());
        p = item.getItemProperty(getItemMarkerHtmlPropertyId());
        final String h = (String) (p != null ? p.getValue() : null);
        target.addAttribute("html", h);
        target.endTag(TAG_MARKER);
      }
      target.endTag(TAG_MARKERS);
    }
View Full Code Here

    final Object markerId = dataSource.addItem();
    if (markerId == null) {
      return null;
    }
    final Item marker = dataSource.getItem(markerId);
    Property p = marker.getItemProperty(getItemMarkerXPropertyId());
    p.setValue(new Double(location.x));
    p = marker.getItemProperty(getItemMarkerYPropertyId());
    p.setValue(new Double(location.y));
    p = marker.getItemProperty(getItemMarkerHtmlPropertyId());
    p.setValue(html);

    requestRepaint();

    return markerId;
  }
View Full Code Here

        final int count = metadata.getColumnCount();
        final ArrayList list = new ArrayList(count);
        for (int i = 1; i <= count; i++) {
            final String columnName = metadata.getColumnName(i);
            list.add(columnName);
            final Property p = getContainerProperty(new Integer(1), columnName);
            propertyTypes.put(columnName, p == null ? Object.class : p
                    .getType());
        }
        propertyIds = Collections.unmodifiableCollection(list);
    }
View Full Code Here

TOP

Related Classes of com.vaadin.data.Property$ReadOnlyStatusChangeListener

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.