Package org.eclipse.e4.xwt.javabean.metadata.properties

Examples of org.eclipse.e4.xwt.javabean.metadata.properties.EventProperty


      if (factory != null) {
        return factory.create(javaClass, superMetaclass, xwtLoader);
      }
    }
    boolean lazyLoading = false; // TODO Get value from preference
    return new Metaclass(javaClass, superMetaclass, lazyLoading, xwtLoader);
  }
View Full Code Here


  public void fireEvent(IObservableValueListener manager, IProperty property) {
    Object host = manager.getHost();
    IMetaclass metaclass = XWT.getMetaclass(host);

    EventProperty reaisedEventProperty = (EventProperty) property;
    String raisedName = reaisedEventProperty.getEvent().getName();
    for (String name : getEventNames()) {
      if (name.equalsIgnoreCase(raisedName)) {
        continue;
      }
      String eventPropertyName = IEventConstants.getEventPropertyName(name);
View Full Code Here

    if (controller == null) {
      controller = UserData.updateEventController(host);
    }
    IMetaclass metaclass = XWT.getMetaclass(host);

    EventProperty reaisedEventProperty = (EventProperty) property;
    String raisedName = reaisedEventProperty.getEvent().getName();
    for (String name : getEventNames()) {
      if (name.equalsIgnoreCase(raisedName)) {
        continue;
      }
      String eventPropertyName = IEventConstants.getEventPropertyName(name);
View Full Code Here

      routedEventCache.put(eventName, typedEvent);
      String eventPropertyName = IEventConstants
          .getEventPropertyName(name);
      String eventDataName = IEventConstants
          .getEventPropertyDataName(name);
      addProperty(new EventProperty(eventPropertyName, eventDataName,
          typedEvent));
    }
  }
View Full Code Here

        routedEventCache.put(name, event);
        String propertyName = IEventConstants
            .getEventPropertyName(eventSetDescriptor.getName());
        String propertyDataName = IEventConstants
            .getEventPropertyDataName(eventSetDescriptor.getName());
        addProperty(new EventProperty(propertyName, propertyDataName,
            event));
      }
      if (isWidgetType(type)) {
        routedEventCache.put(normalize(IEventConstants.XWT_LOADED),
            new LoadedEvent(IEventConstants.XWT_LOADED));
View Full Code Here

    return host;
  }
 
  public void changeValueHandle(Object object, Event event){
    // TODO the cast is not clean.
    EventProperty property = (EventProperty) object;
    IObservableValue value = map.get(property.getName());
    if (value != null) {
      Boolean oldValue = (Boolean) value.getValue();
      if (oldValue == null) {
        oldValue = false;
      }
      value.setValue(!oldValue);
    }
   
    IMetaclass metaclass = XWT.getMetaclass(host);
   
    // TODO this conversion should be simplied
    String eventName = ModelUtils.normalizePropertyName(property.getEvent().getName());
    IEventGroup eventGroup = metaclass.getEventGroup(eventName);
    if (eventGroup != null) {
      eventGroup.fireEvent(this, property);
    }
  }
View Full Code Here

    }
    map.put(property.getName(), observableValue);
   
    IMetaclass metaclass = XWT.getMetaclass(host);
    // TODO it is not clean.
    EventProperty eventProperty  = (EventProperty) property;
   
    // TODO this conversion should be simplied
    String eventName = ModelUtils.normalizePropertyName(eventProperty.getEvent().getName());   
    IEventGroup eventGroup = metaclass.getEventGroup(eventName);
    if (eventGroup != null) {
      eventGroup.registerEvent(this, property);
    }
  }
View Full Code Here

          ObservableTreeContentProvider xwtContentProvider = (ObservableTreeContentProvider) contentProvider;
          xwtContentProvider.updateContext(viewer, value);
        }
        if (contentProvider instanceof ObservableTreeContentProvider) {
          ObservableTreeContentProvider listContentProvider = (ObservableTreeContentProvider) contentProvider;
          viewer.setLabelProvider(new ObservableMapLabelProvider(
              viewer, listContentProvider.getKnownElements(),
              propertyNames));
        }
      }
      else {
        IContentProvider contentProvider = viewer.getContentProvider();
        if (value instanceof List<?> || value.getClass().isArray()) {
          if (contentProvider == null) {
            contentProvider = new ObservableListContentProvider();
            viewer.setContentProvider(contentProvider);
          }
          if (propertyNames != null && propertyNames.length > 0 && hasDefaultLabelProvider(viewer)
              && contentProvider instanceof ObservableListContentProvider) {
            ObservableListContentProvider listContentProvider = (ObservableListContentProvider) contentProvider;
            viewer.setLabelProvider(new ObservableMapLabelProvider(
                viewer, listContentProvider.getKnownElements(),
                propertyNames));
          }
        } else if (value instanceof Set<?>) {
          if (contentProvider == null) {
            contentProvider = new ObservableSetContentProvider();
            viewer.setContentProvider(contentProvider);
          }
          if (propertyNames != null && propertyNames.length > 0 && hasDefaultLabelProvider(viewer)
              && contentProvider instanceof ObservableSetContentProvider) {
            ObservableSetContentProvider setContentProvider = (ObservableSetContentProvider) contentProvider;
            viewer.setLabelProvider(new ObservableMapLabelProvider(
                viewer, setContentProvider.getKnownElements(), propertyNames));
          }
        }
      }
    }
View Full Code Here

      String[] propertyNames = JFacesHelper.getViewerProperties(viewer);
      if (target instanceof AbstractTreeViewer) {
        IContentProvider contentProvider = (IContentProvider) viewer.getContentProvider();
        if (contentProvider instanceof ObservableTreeContentProvider) {
          ObservableTreeContentProvider xwtContentProvider = (ObservableTreeContentProvider) contentProvider;
          xwtContentProvider.updateContext(viewer, value);
        }
        if (contentProvider instanceof ObservableTreeContentProvider) {
          ObservableTreeContentProvider listContentProvider = (ObservableTreeContentProvider) contentProvider;
          viewer.setLabelProvider(new ObservableMapLabelProvider(
              viewer, listContentProvider.getKnownElements(),
              propertyNames));
        }
      }
      else {
        IContentProvider contentProvider = viewer.getContentProvider();
        if (value instanceof List<?> || value.getClass().isArray()) {
          if (contentProvider == null) {
            contentProvider = new ObservableListContentProvider();
            viewer.setContentProvider(contentProvider);
          }
          if (propertyNames != null && propertyNames.length > 0 && hasDefaultLabelProvider(viewer)
              && contentProvider instanceof ObservableListContentProvider) {
            ObservableListContentProvider listContentProvider = (ObservableListContentProvider) contentProvider;
            viewer.setLabelProvider(new ObservableMapLabelProvider(
                viewer, listContentProvider.getKnownElements(),
                propertyNames));
          }
        } else if (value instanceof Set<?>) {
          if (contentProvider == null) {
            contentProvider = new ObservableSetContentProvider();
View Full Code Here

            propertyName, updateSourceTrigger, observeKind);
      }

      if (observable == null
          && dataProvider instanceof IObjectDataProvider) {
        IMetaclass mateclass = XWT.getMetaclass(type);
        IProperty property = mateclass.findProperty(propertyName);
        if (property instanceof EventProperty) {
          observable = new EventPropertyObservableValue(object,
              (EventProperty) property);
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.e4.xwt.javabean.metadata.properties.EventProperty

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.