Package simtools.diagram.undo

Examples of simtools.diagram.undo.GateDisconnectEdit


            Connection connection = cs.getConnection();

            if( cs.isFirstEndSelected() && connection.getFirstEndGate()!=null ){
                Gate firstGate = connection.getFirstEndGate()
                connection.disconnect(firstGate);
                ce.addEdit(new GateDisconnectEdit(connection, firstGate,true));  

            } else if( cs.isLastEndSelected() && connection.getLastEndGate()!=null  ){
                Gate lastGate = connection.getLastEndGate()
                connection.disconnect(lastGate);
                ce.addEdit(new GateDisconnectEdit(connection, lastGate,false));  
            }
        }

        ce.end();
        if (ce.isSignificant()){
View Full Code Here


                    List connections = gate.getConnections();

                    for(int j=0; j< connections.size(); j++){
                        Connection connection = (Connection)connections.get(j);   
                        if (connection.isConnected(gate)){
                            ce.addEdit(new GateDisconnectEdit(connection, gate, connection.getFirstEndGate()!=null && connection.getFirstEndGate().equals(gate)));
                            connection.disconnect(gate);
                        }
                    }
                }
            }


            if (ss.element instanceof Connection){
                Connection gc = (Connection)ss.element;
                if (gc.getFirstEndGate() != null){
                    ce.addEdit(new GateDisconnectEdit(gc, gc.getFirstEndGate(), true));
                    gc.disconnect(gc.getFirstEndGate());
                }
                if (gc.getLastEndGate() != null){
                    ce.addEdit(new GateDisconnectEdit(gc, gc.getLastEndGate(), false));
                    gc.disconnect(gc.getLastEndGate());
                }
            }
            deleteShape(ss.element);
        }
View Full Code Here

TOP

Related Classes of simtools.diagram.undo.GateDisconnectEdit

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.