Package diva.graph

Interface EdgeController

    • Method Detail

      • addEdge

        void addEdge​(java.lang.Object edge,
                     java.lang.Object node,
                     int end,
                     double x,
                     double y)
        Add an edge to this graph editor and render it from the given tail node to an autonomous site at the given location. Give the new edge the given semanticObject. The "end" flag is either HEAD_END or TAIL_END, from diva.canvas.connector.ConnectorEvent.
        Throws:
        GraphException - If the connector target cannot return a valid site on the node's figure.
        See Also:
        ConnectorEvent
      • addEdge

        void addEdge​(java.lang.Object edge,
                     java.lang.Object tail,
                     java.lang.Object head)
        Add an edge to this graph between the given tail and head nodes. Give the new edge the given semanticObject.
      • clearEdge

        void clearEdge​(java.lang.Object edge)
        Remove the figure for the given edge, but do not remove the edge from the graph model.
      • drawEdge

        Figure drawEdge​(java.lang.Object edge)
        Draw the edge and add it to the layer, establishing a two-way correspondence between the model and the view. If the edge already has been associated with some figure in the view, then use any information in that figure to help draw the edge.
      • getConnectorTarget

        ConnectorTarget getConnectorTarget()
        Get the target used to find sites on nodes to connect to.
      • getController

        GraphController getController()
        Get the graph controller that this controller is contained in.
      • getEdgeInteractor

        Interactor getEdgeInteractor()
        Get the interactor given to edge figures.
      • getEdgeRenderer

        EdgeRenderer getEdgeRenderer()
        Return the edge renderer for this view.
      • removeEdge

        void removeEdge​(java.lang.Object edge)
        Remove the edge.
      • setConnectorTarget

        void setConnectorTarget​(ConnectorTarget t)
        Set the target used to find sites on nodes to connect to. This sets the local connector target (which is often used to find the starting point of an edge) and the manipulator's connector target, which is used after the connector is being dragged.
      • setEdgeInteractor

        void setEdgeInteractor​(Interactor interactor)
        Set the interactor given to edge figures.
      • setEdgeRenderer

        void setEdgeRenderer​(EdgeRenderer er)
        Set the edge renderer for this view.
      • render

        Connector render​(java.lang.Object edge,
                         FigureLayer layer,
                         Site tailSite,
                         Site headSite)
        Render the edge on the given layer between the two sites.