Package org.apache.cayenne.modeler.dialog

Examples of org.apache.cayenne.modeler.dialog.ConfirmRemoveDialog.shouldDelete()


    ObjRelationship[] rels = getProjectController()
        .getCurrentObjRelationships();
    if (rels != null && rels.length > 0) {
      if ((rels.length == 1 && dialog.shouldDelete("ObjRelationship",
          rels[0].getName()))
          || (rels.length > 1 && dialog
              .shouldDelete("selected ObjRelationships"))) {
        ObjEntity entity = mediator.getCurrentObjEntity();
        removeObjRelationships(entity, rels);
        Application.getInstance().getUndoManager().addEdit(
            new RemoveRelationshipUndoableEdit(entity, rels));
View Full Code Here


      }
    } else {
      DbRelationship[] dbRels = getProjectController()
          .getCurrentDbRelationships();
      if (dbRels != null && dbRels.length > 0) {
        if ((dbRels.length == 1 && dialog.shouldDelete(
            "DbRelationship", dbRels[0].getName()))
            || (dbRels.length > 1 && dialog
                .shouldDelete("selected DbRelationships"))) {
          DbEntity entity = mediator.getCurrentDbEntity();
          removeDbRelationships(entity, dbRels);
View Full Code Here

      DbRelationship[] dbRels = getProjectController()
          .getCurrentDbRelationships();
      if (dbRels != null && dbRels.length > 0) {
        if ((dbRels.length == 1 && dialog.shouldDelete(
            "DbRelationship", dbRels[0].getName()))
            || (dbRels.length > 1 && dialog
                .shouldDelete("selected DbRelationships"))) {
          DbEntity entity = mediator.getCurrentDbEntity();
          removeDbRelationships(entity, dbRels);
          Application.getInstance().getUndoManager().addEdit(
              new RemoveRelationshipUndoableEdit(entity, dbRels));
View Full Code Here

        EmbeddableAttribute[] embAttrs = getProjectController().getCurrentEmbAttrs();

        ObjAttribute[] attrs = getProjectController().getCurrentObjAttributes();

        if (embAttrs != null && embAttrs.length > 0) {
            if ((embAttrs.length == 1 && dialog.shouldDelete(
                    "Embeddable Attribute",
                    embAttrs[0].getName()))
                    || (embAttrs.length > 1 && dialog
                            .shouldDelete("selected EmbAttributes"))) {
View Full Code Here

        if (embAttrs != null && embAttrs.length > 0) {
            if ((embAttrs.length == 1 && dialog.shouldDelete(
                    "Embeddable Attribute",
                    embAttrs[0].getName()))
                    || (embAttrs.length > 1 && dialog
                            .shouldDelete("selected EmbAttributes"))) {

                Embeddable embeddable = mediator.getCurrentEmbeddable();

                EmbeddableAttribute[] eAttrs = getProjectController()
View Full Code Here

                removeEmbeddableAttributes(embeddable, eAttrs);

            }
        }
        else if (attrs != null && attrs.length > 0) {
            if ((attrs.length == 1 && dialog.shouldDelete("ObjAttribute", attrs[0]
                    .getName()))
                    || (attrs.length > 1 && dialog.shouldDelete("selected ObjAttributes"))) {

                ObjEntity entity = mediator.getCurrentObjEntity();
                ObjAttribute[] attribs = mediator.getCurrentObjAttributes();
View Full Code Here

            }
        }
        else if (attrs != null && attrs.length > 0) {
            if ((attrs.length == 1 && dialog.shouldDelete("ObjAttribute", attrs[0]
                    .getName()))
                    || (attrs.length > 1 && dialog.shouldDelete("selected ObjAttributes"))) {

                ObjEntity entity = mediator.getCurrentObjEntity();
                ObjAttribute[] attribs = mediator.getCurrentObjAttributes();

                application.getUndoManager().addEdit(
View Full Code Here

            }
        }
        else {
            DbAttribute[] dbAttrs = getProjectController().getCurrentDbAttributes();
            if (dbAttrs != null && dbAttrs.length > 0) {
                if ((dbAttrs.length == 1 && dialog.shouldDelete("DbAttribute", dbAttrs[0]
                        .getName()))
                        || (dbAttrs.length > 1 && dialog
                                .shouldDelete("selected DbAttributes"))) {

                    DbEntity entity = mediator.getCurrentDbEntity();
View Full Code Here

        else {
            DbAttribute[] dbAttrs = getProjectController().getCurrentDbAttributes();
            if (dbAttrs != null && dbAttrs.length > 0) {
                if ((dbAttrs.length == 1 && dialog.shouldDelete("DbAttribute", dbAttrs[0]
                        .getName()))
                        || (dbAttrs.length > 1 && dialog
                                .shouldDelete("selected DbAttributes"))) {

                    DbEntity entity = mediator.getCurrentDbEntity();
                    DbAttribute[] attribs = mediator.getCurrentDbAttributes();
View Full Code Here

        ConfirmRemoveDialog dialog = getConfirmDeleteDialog(allowAsking);
       
        String[] methods = getProjectController().getCurrentCallbackMethods();

        if (methods.length > 0) {
            if ((methods.length == 1 && dialog.shouldDelete("callback method", methods[0]))
                    || (methods.length > 1 && dialog.shouldDelete("selected callback methods"))) {
                removeCallbackMethods(e);
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.