use of com.cubrid.cubridmanager.ui.replication.editor.model.ContainerNode in project cubrid-manager by CUBRID.
the class CreateContainerNodeCommand method getSize.
/**
* get the size
*
* @param name String
* @return size
*/
public int getSize(String name) {
int count = diagram.getChildNodeList().size();
int size = 0;
for (int i = 0; i < count; i++) {
ContainerNode node = (ContainerNode) diagram.getChildNodeList().get(i);
if (node.getClass().getName().equals(name)) {
size++;
}
}
return size;
}
use of com.cubrid.cubridmanager.ui.replication.editor.model.ContainerNode 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);
}
}
Aggregations