Codota Logo
CollectionEvent.getType
Code IndexAdd Codota to your IDE (free)

How to use
getType
method
in
com.ochafik.util.listenable.CollectionEvent

Best Java code snippets using com.ochafik.util.listenable.CollectionEvent.getType (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: com.nativelibs4java/ochafik-util

  public void collectionChanged(CollectionEvent<T> e) {
    if (listeners != null && !listeners.isEmpty()) {
      Collection<T> filteredElements = e.getElements();
      CollectionEvent<T> filteredEvent = new CollectionEvent<T>(FilteredListenableCollection.this, filteredElements, e.getType(), e.getFirstIndex(), e.getLastIndex());
      for (CollectionListener<T> listener : listeners) {
        listener.collectionChanged(filteredEvent);
      }
    }
  }
});
origin: com.nativelibs4java/ochafik-util

  public void collectionChanged(CollectionEvent<T> e) {
    switch (e.getType()) {
    case ADDED:
      fireIntervalAdded(this, e.getFirstIndex(), e.getLastIndex());
      break;
    case REMOVED:
      fireIntervalRemoved(this, e.getFirstIndex(), e.getLastIndex());
      break;
    case UPDATED:
      fireContentsChanged(this, e.getFirstIndex(), e.getLastIndex());
      break;
    }
  }
});
origin: com.nativelibs4java/ochafik-util

switch (e.getType()) {
case ADDED:
  add(t, source, recipient);
origin: com.nativelibs4java/ochafik-util

  public void collectionChanged(CollectionEvent<U> e) {
    // Do not propagate the event if we triggered it
    if (currentlyCausingChange)
      return;
    
    // Only propagate if someone is listening (CollectionSupport already tries not to fire anything when there is no listener, but here we are trying to avoid to create the wrapped elements collection)
    if (collectionSupport == null || !collectionSupport.hasListeners())
      return;
    
    // Adapt the collection of changed / added / removed elements in the event
    collectionSupport.fireEvent(
      AdaptedCollection.this, 
      new AdaptedCollection<U, V>(e.getElements(), AdaptedCollection.this.forwardAdapter, AdaptedCollection.this.backwardAdapter), 
      e.getType(), 
      e.getFirstIndex(), 
      e.getLastIndex());
  }
});
origin: jtrfp/terminal-recall

@Override
public void collectionChanged(CollectionEvent<T> e) {
  switch(e.getType()){
  case ADDED:
  ls.fireAdded(CompoundListenableCollection.this, e.getElements());
  break;
  case REMOVED:
  ls.fireRemoved(CompoundListenableCollection.this, e.getElements());
  break;
  case UPDATED:
  ls.fireUpdated(CompoundListenableCollection.this, e.getElements());
  break;
  default:
  break;
  }//end EventTypes
}};
private final CollectionListener<ListenableCollection<T>> outerListener = new CollectionListener<ListenableCollection<T>>(){
origin: jtrfp/terminal-recall

@Override
public void collectionChanged(CollectionEvent<ListenableCollection<T>> e) {
  switch(e.getType()){
  case ADDED:
  for(ListenableCollection<T> coll:e.getElements()){
    delegate.addComponent(coll);
    coll.addCollectionListener(innerListener);
    ls.fireAdded(CompoundListenableCollection.this, coll);
  }//end for(collections added)
  break;
  case REMOVED:
  for(ListenableCollection<T> coll:e.getElements()){
    delegate.removeComponent(coll);
    coll.removeCollectionListener(innerListener);
    ls.fireRemoved(CompoundListenableCollection.this, coll);
  }//end for(collections removed)
  break;
  case UPDATED:
  // ????
  break;
  default:
  break;
  }//end EventTypes
}};
com.ochafik.util.listenableCollectionEventgetType

Javadoc

Get the event type

Popular methods of CollectionEvent

  • getElements
    Get the elements affected by the event.
  • <init>
  • getFirstIndex
    Get the index of the first affected element in the source, or -1 if not applicable
  • getLastIndex
    Get the index of the last affected element in the source, or -1 if not applicable
  • getSource

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getApplicationContext (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • JTable (javax.swing)
  • Join (org.hibernate.mapping)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now