Package diva.graph

Examples of diva.graph.GraphEvent


        } catch (Exception ex) {
            MessageHandler
                    .error("Delete failed, changeRequest was:" + moml, ex);
        }

        graphModel.dispatchGraphEvent(new GraphEvent(this,
                GraphEvent.STRUCTURE_CHANGED, graphModel.getRoot()));
    }
View Full Code Here


                while (frames.hasNext()) {
                    BasicGraphFrame frame = (BasicGraphFrame) frames.next();
                    GraphModel graphModel = frame._getGraphController()
                            .getGraphModel();
                    graphModel
                            .dispatchGraphEvent(new GraphEvent(this,
                                    GraphEvent.STRUCTURE_CHANGED, graphModel
                                            .getRoot()));

                    if (frame._graphPanner != null) {
                        frame._graphPanner.repaint();
View Full Code Here

            } catch (Exception ex) {
                // The link is bad... remove it.
                _linkSet.remove(link);
                link.setHead(null);
                link.setTail(null);
                dispatchGraphEvent(new GraphEvent(ActorGraphModel.this,
                        GraphEvent.STRUCTURE_CHANGED, getRoot()));
            }

            moml.append("</group>\n");
            failmoml.append("</group>\n");
View Full Code Here

            } catch (Exception ex) {
                // The link is bad... remove it.
                _linkSet.remove(link);
                link.setHead(null);
                link.setTail(null);
                dispatchGraphEvent(new GraphEvent(ActorGraphModel.this,
                        GraphEvent.STRUCTURE_CHANGED, getRoot()));
            }

            moml.append("</group>\n");
            failmoml.append("</group>\n");
View Full Code Here

                // Note that there is no GraphEvent dispatched here
                // if the edge is not fully connected.  This is to
                // prevent rerendering while
                // an edge is being created.
                if ((_link.getHead() != null) && (_link.getTail() != null)) {
                    dispatchGraphEvent(new GraphEvent(ActorGraphModel.this,
                            GraphEvent.STRUCTURE_CHANGED, getRoot()));
                }
            }
View Full Code Here

        Object tail = model.getTail(edge);
        model.setTail(edge, null);
        model.setHead(edge, null);

        if (head != null) {
            GraphEvent e = new GraphEvent(eventSource,
                    GraphEvent.EDGE_HEAD_CHANGED, edge, head);
            dispatchGraphEvent(e);
        }

        if (tail != null) {
            GraphEvent e = new GraphEvent(eventSource,
                    GraphEvent.EDGE_TAIL_CHANGED, edge, tail);
            dispatchGraphEvent(e);
        }
    }
View Full Code Here

        // update the graph model.
        if (_update()) {
            // Notify any graph listeners
            // that the graph might have
            // completely changed.
            dispatchGraphEvent(new GraphEvent(this,
                    GraphEvent.STRUCTURE_CHANGED, getRoot()));
        }
    }
View Full Code Here

            MessageHandler.error("Change failed", exception);
        }

        // update the graph model.
        if (_update()) {
            dispatchGraphEvent(new GraphEvent(this,
                    GraphEvent.STRUCTURE_CHANGED, getRoot()));
        }
    }
View Full Code Here

        Object head = model.getHead(edge);
        Object tail = model.getTail(edge);
        model.removeEdge(edge);

        if (head != null) {
            GraphEvent e = new GraphEvent(eventSource,
                    GraphEvent.EDGE_HEAD_CHANGED, edge, head);
            dispatchGraphEvent(e);
        }

        if (tail != null) {
            GraphEvent e = new GraphEvent(eventSource,
                    GraphEvent.EDGE_TAIL_CHANGED, edge, tail);
            dispatchGraphEvent(e);
        }
    }
View Full Code Here

            request.setUndoable(true);
            request.addChangeListener(new ChangeListener() {
                public void changeFailed(ChangeRequest change,
                        Exception exception) {
                    // If we fail, then issue structureChanged.
                    dispatchGraphEvent(new GraphEvent(eventSource,
                            GraphEvent.STRUCTURE_CHANGED, getRoot()));
                }

                public void changeExecuted(ChangeRequest change) {
                    // If we succeed, then issue structureChanged, since
                    // this is likely connected to something.
                    dispatchGraphEvent(new GraphEvent(eventSource,
                            GraphEvent.STRUCTURE_CHANGED, getRoot()));
                }
            });
            request.setUndoable(true);
            container.requestChange(request);
View Full Code Here

TOP

Related Classes of diva.graph.GraphEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.