Search in sources :

Example 11 with LeafNode

use of com.cubrid.cubridmanager.ui.replication.editor.model.LeafNode in project cubrid-manager by CUBRID.

the class DeleteNodeCommand method execute.

/**
	 * @see org.eclipse.gef.commands.Command#execute()
	 */
public void execute() {
    if (parent instanceof Diagram) {
        Diagram diagram = (Diagram) parent;
        diagram.removeNode((ContainerNode) node);
    } else if (parent instanceof ContainerNode) {
        ContainerNode containerNode = (ContainerNode) parent;
        containerNode.removeChildNode((LeafNode) node);
    }
}
Also used : LeafNode(com.cubrid.cubridmanager.ui.replication.editor.model.LeafNode) ContainerNode(com.cubrid.cubridmanager.ui.replication.editor.model.ContainerNode) Diagram(com.cubrid.cubridmanager.ui.replication.editor.model.Diagram)

Aggregations

LeafNode (com.cubrid.cubridmanager.ui.replication.editor.model.LeafNode)11 ArrowConnection (com.cubrid.cubridmanager.ui.replication.editor.model.ArrowConnection)4 ContainerNode (com.cubrid.cubridmanager.ui.replication.editor.model.ContainerNode)4 DistributorNode (com.cubrid.cubridmanager.ui.replication.editor.model.DistributorNode)3 MasterNode (com.cubrid.cubridmanager.ui.replication.editor.model.MasterNode)3 SlaveNode (com.cubrid.cubridmanager.ui.replication.editor.model.SlaveNode)3 ArrayList (java.util.ArrayList)3 Point (org.eclipse.draw2d.geometry.Point)3 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)2 Diagram (com.cubrid.cubridmanager.ui.replication.editor.model.Diagram)2 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)1 CreateLeafNodeCommand (com.cubrid.cubridmanager.ui.replication.editor.commands.CreateLeafNodeCommand)1 LeafNodeFigure (com.cubrid.cubridmanager.ui.replication.editor.figures.LeafNodeFigure)1 HostNode (com.cubrid.cubridmanager.ui.replication.editor.model.HostNode)1 Node (com.cubrid.cubridmanager.ui.replication.editor.model.Node)1 List (java.util.List)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1