Documentation of 'org.jgraph.graph.GraphContext' Java class
GraphContext
org.jgraph.graph

Class GraphContext

  • All Implemented Interfaces:
    CellMapper


    public class GraphContext
    extends java.lang.Object
    implements CellMapper
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static boolean PREVIEW_EDGE_GROUPS
      Switch to enable the preview of edge groups, that is, edges that 1 or more children, as part of the context cells.
    • Constructor Summary

      Constructors 
      Constructor and Description
      GraphContext(JGraph graph, java.lang.Object[] cells)
      Constructs a graph context for cells with respect to the connections defined in the model, and the views in the view of graph.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean contains(java.lang.Object node)
      Returns true if node or one of its ancestors is contained in this object and visible in the original graph.
      CellView createMapping(java.lang.Object cell) 
      CellView[] createTemporaryCellViews()
      Returns an new consistent array of views for cells.
      CellView[] createTemporaryContextViews()
      Returns an new consistent array of views for the edges that are connected to and not contained in cells.
      CellView[] createTemporaryContextViews(java.util.Set cellSet)
      Returns an new consistent array of views for the edges that are connected to and not contained in cellSet.
      CellView[] createTemporaryPortViews()
      Returns an new consistent array of views for the ports.
      ConnectionSet disconnect(CellView[] cells)
      Disconnects the edges in cells from the sources and targets that are not in this context and returns a ConnectionSet that defines the disconnection.
      java.lang.Object[] getCells()
      Returns the array that was passed to the constructor.
      int getDescendantCount()
      Returns the number of all objects (cells and children) in this object.
      JGraph getGraph()
      Returns the graph that was passed to the constructor.
      CellView getMapping(java.lang.Object cell, boolean create)
      Returns the CellView that is mapped to cell in the graph context.
      boolean isEmpty()
      Returns true if this object contains no cells.
      void putMapping(java.lang.Object cell, CellView view)
      Associates cell with view in the graph context.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PREVIEW_EDGE_GROUPS

        public static boolean PREVIEW_EDGE_GROUPS
        Switch to enable the preview of edge groups, that is, edges that 1 or more children, as part of the context cells.
    • Constructor Detail

      • GraphContext

        public GraphContext(JGraph graph,
                            java.lang.Object[] cells)
        Constructs a graph context for cells with respect to the connections defined in the model, and the views in the view of graph.
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Returns true if this object contains no cells.
      • getDescendantCount

        public int getDescendantCount()
        Returns the number of all objects (cells and children) in this object.
      • getGraph

        public JGraph getGraph()
        Returns the graph that was passed to the constructor.
      • getCells

        public java.lang.Object[] getCells()
        Returns the array that was passed to the constructor.
      • contains

        public boolean contains(java.lang.Object node)
        Returns true if node or one of its ancestors is contained in this object and visible in the original graph.
      • createTemporaryCellViews

        public CellView[] createTemporaryCellViews()
        Returns an new consistent array of views for cells.
      • createTemporaryPortViews

        public CellView[] createTemporaryPortViews()
        Returns an new consistent array of views for the ports.
      • createTemporaryContextViews

        public CellView[] createTemporaryContextViews()
        Returns an new consistent array of views for the edges that are connected to and not contained in cells.
      • createTemporaryContextViews

        public CellView[] createTemporaryContextViews(java.util.Set cellSet)
        Returns an new consistent array of views for the edges that are connected to and not contained in cellSet.
      • getMapping

        public CellView getMapping(java.lang.Object cell,
                                   boolean create)
        Returns the CellView that is mapped to cell in the graph context. New views are created based on whether cell is contained in the context. The create-flag is ignored.
        Specified by:
        getMapping in interface CellMapper
        create - whether a new view should created if a view does not already exist
      • createMapping

        public CellView createMapping(java.lang.Object cell)
      • disconnect

        public ConnectionSet disconnect(CellView[] cells)
        Disconnects the edges in cells from the sources and targets that are not in this context and returns a ConnectionSet that defines the disconnection.
      • putMapping

        public void putMapping(java.lang.Object cell,
                               CellView view)
        Associates cell with view in the graph context.
        Specified by:
        putMapping in interface CellMapper
        Parameters:
        cell - the cell that constitutes the model element
        view - the view that constitutes the view element

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.