Package org.rssowl.core.persist.event

Examples of org.rssowl.core.persist.event.PreferenceEvent


      final boolean deletionEvents[] = new boolean[4];

      prefListener = new PreferenceListener() {
        public void entitiesAdded(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            additionEvents[0] = event.getEntity().getBoolean().booleanValue();
          else if (key2.equals(key))
            additionEvents[1] = event.getEntity().getInteger().intValue() == 1;
          else if (key3.equals(key))
            additionEvents[2] = event.getEntity().getString().equals("value");
          else if (key4.equals(key))
            additionEvents[3] = Arrays.equals(event.getEntity().getStrings(), new String[] { "1", "2", "3", "4" });
        }

        public void entitiesUpdated(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            updatedEvents[0] = !event.getEntity().getBoolean().booleanValue();
          else if (key2.equals(key))
            updatedEvents[1] = event.getEntity().getInteger().intValue() == 0;
          else if (key3.equals(key))
            updatedEvents[2] = event.getEntity().getString().equals("updated_value");
          else if (key4.equals(key))
            updatedEvents[3] = Arrays.equals(event.getEntity().getStrings(), new String[] { "4", "3", "2", "1" });
        }

        public void entitiesDeleted(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            deletionEvents[0] = true;
          else if (key2.equals(key))
            deletionEvents[1] = true;
          else if (key3.equals(key))
View Full Code Here


      final boolean deletionEvents[] = new boolean[4];

      prefListener = new PreferenceListener() {
        public void entitiesAdded(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            additionEvents[0] = event.getEntity().getBoolean().booleanValue();
          else if (key2.equals(key))
            additionEvents[1] = event.getEntity().getInteger().intValue() == 1;
          else if (key3.equals(key))
            additionEvents[2] = event.getEntity().getString().equals("value");
          else if (key4.equals(key))
            additionEvents[3] = Arrays.equals(event.getEntity().getStrings(), new String[] { "1", "2", "3", "4" });
        }

        public void entitiesUpdated(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            updatedEvents[0] = !event.getEntity().getBoolean().booleanValue();
          else if (key2.equals(key))
            updatedEvents[1] = event.getEntity().getInteger().intValue() == 0;
          else if (key3.equals(key))
            updatedEvents[2] = event.getEntity().getString().equals("updated_value");
          else if (key4.equals(key))
            updatedEvents[3] = Arrays.equals(event.getEntity().getStrings(), new String[] { "4", "3", "2", "1" });
        }

        public void entitiesDeleted(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            deletionEvents[0] = true;
          else if (key2.equals(key))
            deletionEvents[1] = true;
          else if (key3.equals(key))
View Full Code Here

      ISearchCondition searchCond = (ISearchCondition) entity;
      modelEvent = new SearchConditionEvent(searchCond, root);
    }
    else if (entity instanceof IPreference) {
      IPreference pref = (IPreference) entity;
      modelEvent = new PreferenceEvent(pref);
    }
    return modelEvent;
  }
View Full Code Here

      ISearchCondition searchCond = (ISearchCondition) entity;
      modelEvent = new SearchConditionEvent(searchCond, root);
    }
    else if (entity instanceof IPreference) {
      IPreference pref = (IPreference) entity;
      modelEvent = new PreferenceEvent(pref);
    }
    else if (entity instanceof ISearch) {
      ISearch search = (ISearch) entity;
      modelEvent = new SearchEvent(search, root);
    }
View Full Code Here

    } else if (entity instanceof ISearchCondition) {
      ISearchCondition searchCond = (ISearchCondition) entity;
      modelEvent = new SearchConditionEvent(searchCond, root);
    } else if (entity instanceof IPreference) {
      IPreference pref = (IPreference) entity;
      modelEvent = new PreferenceEvent(pref);
    } else if (entity instanceof ISearch) {
      ISearch search = (ISearch) entity;
      modelEvent = new SearchEvent(search, root);
    } else if (entity instanceof ISearchFilter) {
      ISearchFilter filter = (ISearchFilter) entity;
View Full Code Here

      final boolean deletionEvents[] = new boolean[4];

      prefListener = new PreferenceListener() {
        public void entitiesAdded(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            additionEvents[0] = event.getEntity().getBoolean().booleanValue();
          else if (key2.equals(key))
            additionEvents[1] = event.getEntity().getInteger().intValue() == 1;
          else if (key3.equals(key))
            additionEvents[2] = event.getEntity().getString().equals("value");
          else if (key4.equals(key))
            additionEvents[3] = Arrays.equals(event.getEntity().getStrings(), new String[] { "1", "2", "3", "4" });
        }

        public void entitiesUpdated(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            updatedEvents[0] = !event.getEntity().getBoolean().booleanValue();
          else if (key2.equals(key))
            updatedEvents[1] = event.getEntity().getInteger().intValue() == 0;
          else if (key3.equals(key))
            updatedEvents[2] = event.getEntity().getString().equals("updated_value");
          else if (key4.equals(key))
            updatedEvents[3] = Arrays.equals(event.getEntity().getStrings(), new String[] { "4", "3", "2", "1" });
        }

        public void entitiesDeleted(Set<PreferenceEvent> events) {
          assertEquals(1, events.size());
          PreferenceEvent event = events.iterator().next();
          String key = event.getEntity().getKey();
          if (key1.equals(key))
            deletionEvents[0] = true;
          else if (key2.equals(key))
            deletionEvents[1] = true;
          else if (key3.equals(key))
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.event.PreferenceEvent

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.