Tabnine Logo
mxChildChangeCodec
Code IndexAdd Tabnine to your IDE (free)

How to use
mxChildChangeCodec
in
com.mxgraph.io

Best Java code snippets using com.mxgraph.io.mxChildChangeCodec (Showing top 2 results out of 315)

origin: com.github.vlsi.mxgraph/jgraphx

@Override
public Node afterEncode(mxCodec enc, Object obj, Node node)
{
  if (obj instanceof mxChildChange)
  {
    mxChildChange change = (mxChildChange) obj;
    Object child = change.getChild();
    if (isReference(obj, "child", child, true))
    {
      // Encodes as reference (id)
      mxCodec.setAttribute(node, "child", enc.getId(child));
    }
    else
    {
      // At this point, the encoder is no longer able to know which cells
      // are new, so we have to encode the complete cell hierarchy and
      // ignore the ones that are already there at decoding time. Note:
      // This can only be resolved by moving the notify event into the
      // execute of the edit.
      enc.encodeCell((mxICell) child, node, true);
    }
  }
  return node;
}
origin: org.tinyjee.jgraphx/jgraphx

@Override
public Node afterEncode(mxCodec enc, Object obj, Node node)
{
  if (obj instanceof mxChildChange)
  {
    mxChildChange change = (mxChildChange) obj;
    Object child = change.getChild();
    if (isReference(obj, "child", child, true))
    {
      // Encodes as reference (id)
      mxCodec.setAttribute(node, "child", enc.getId(child));
    }
    else
    {
      // At this point, the encoder is no longer able to know which cells
      // are new, so we have to encode the complete cell hierarchy and
      // ignore the ones that are already there at decoding time. Note:
      // This can only be resolved by moving the notify event into the
      // execute of the edit.
      enc.encodeCell((mxICell) child, node, true);
    }
  }
  return node;
}
com.mxgraph.iomxChildChangeCodec

Javadoc

Codec for mxChildChanges. This class is created and registered dynamically at load time and used implicitely via mxCodec and the mxCodecRegistry.

Most used methods

  • isReference

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Kernel (java.awt.image)
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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