Tabnine Logo
ActivityIconManager.getInstances
Code IndexAdd Tabnine to your IDE (free)

How to use
getInstances
method
in
net.sf.taverna.t2.workbench.activityicons.ActivityIconManager

Best Java code snippets using net.sf.taverna.t2.workbench.activityicons.ActivityIconManager.getInstances (Showing top 2 results out of 315)

origin: net.sf.taverna.t2.ui-api/activity-icons-api

/** Returns an icon for the Activity. */
public Icon iconForActivity(Activity<?> activity) {
  Icon icon = iconsMap.get(activity);
  if (icon == null) {
    int bestScore = ActivityIconSPI.NO_ICON;
    ActivityIconSPI bestSPI = null;
    for (ActivityIconSPI spi : getInstances()) {
      int spiScore = spi.canProvideIconScore(activity);
      if (spiScore > bestScore) {
        bestSPI = spi;
        bestScore = spiScore;
      }
    }
    if (bestSPI != null) {
      icon = bestSPI.getIcon(activity);
      iconsMap.put(activity, icon);
      return icon;
    }
    else{
      return null;
    }
  } else {
    return icon;
  }
}
origin: net.sf.taverna.t2.workbench/activity-icons

/** Returns an icon for the Activity. */
public Icon iconForActivity(Activity<?> activity) {
  Icon icon = iconsMap.get(activity);
  if (icon == null) {
    int bestScore = ActivityIconSPI.NO_ICON;
    ActivityIconSPI bestSPI = null;
    for (ActivityIconSPI spi : getInstances()) {
      int spiScore = spi.canProvideIconScore(activity);
      if (spiScore > bestScore) {
        bestSPI = spi;
        bestScore = spiScore;
      }
    }
    if (bestSPI != null) {
      icon = bestSPI.getIcon(activity);
      iconsMap.put(activity, icon);
      return icon;
    }
    else{
      return null;
    }
  } else {
    return icon;
  }
}
net.sf.taverna.t2.workbench.activityiconsActivityIconManagergetInstances

Popular methods of ActivityIconManager

  • iconForActivity
    Returns an icon for the Activity.
  • getInstance
    Get the singleton instance of this registry.
  • resetIcon

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now