Tabnine Logo
mxGraphModel$Filter
Code IndexAdd Tabnine to your IDE (free)

How to use
mxGraphModel$Filter
in
com.mxgraph.model

Best Java code snippets using com.mxgraph.model.mxGraphModel$Filter (Showing top 4 results out of 315)

origin: com.github.vlsi.mxgraph/jgraphx

/**
 * 
 */
public static Object[] filterCells(Object[] cells, Filter filter)
{
  ArrayList<Object> result = null;
  if (cells != null)
  {
    result = new ArrayList<Object>(cells.length);
    for (int i = 0; i < cells.length; i++)
    {
      if (filter.filter(cells[i]))
      {
        result.add(cells[i]);
      }
    }
  }
  return (result != null) ? result.toArray() : null;
}
origin: org.tinyjee.jgraphx/jgraphx

/**
 * Creates a collection of cells using the visitor pattern.
 */
public static Collection<Object> filterDescendants(mxIGraphModel model,
    Filter filter, Object parent)
{
  List<Object> result = new ArrayList<Object>();
  if (filter == null || filter.filter(parent))
  {
    result.add(parent);
  }
  int childCount = model.getChildCount(parent);
  for (int i = 0; i < childCount; i++)
  {
    Object child = model.getChildAt(parent, i);
    result.addAll(filterDescendants(model, filter, child));
  }
  return result;
}
origin: org.tinyjee.jgraphx/jgraphx

/**
 * 
 */
public static Object[] filterCells(Object[] cells, Filter filter)
{
  ArrayList<Object> result = null;
  if (cells != null)
  {
    result = new ArrayList<Object>(cells.length);
    for (int i = 0; i < cells.length; i++)
    {
      if (filter.filter(cells[i]))
      {
        result.add(cells[i]);
      }
    }
  }
  return (result != null) ? result.toArray() : null;
}
origin: com.github.vlsi.mxgraph/jgraphx

/**
 * Creates a collection of cells using the visitor pattern.
 */
public static Collection<Object> filterDescendants(mxIGraphModel model,
    Filter filter, Object parent)
{
  List<Object> result = new ArrayList<Object>();
  if (filter == null || filter.filter(parent))
  {
    result.add(parent);
  }
  int childCount = model.getChildCount(parent);
  for (int i = 0; i < childCount; i++)
  {
    Object child = model.getChildAt(parent, i);
    result.addAll(filterDescendants(model, filter, child));
  }
  return result;
}
com.mxgraph.modelmxGraphModel$Filter

Most used methods

  • filter

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Sublime Text 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