1 56 57 package org.objectstyle.cayenne.modeler.dialog.validator; 58 59 import javax.swing.JFrame ; 60 61 import org.objectstyle.cayenne.access.DataDomain; 62 import org.objectstyle.cayenne.map.DataMap; 63 import org.objectstyle.cayenne.modeler.ProjectController; 64 import org.objectstyle.cayenne.modeler.event.DataMapDisplayEvent; 65 import org.objectstyle.cayenne.project.validator.ValidationInfo; 66 67 73 public class DataMapErrorMsg extends ValidationDisplayHandler { 74 protected DataMap map; 75 76 80 public DataMapErrorMsg(ValidationInfo result) { 81 super(result); 82 83 Object [] path = result.getPath().getPath(); 84 int len = path.length; 85 86 if (len >= 1) { 87 map = (DataMap) path[len - 1]; 88 } 89 90 if (len >= 2) { 91 domain = (DataDomain) path[len - 2]; 92 } 93 } 94 95 public void displayField(ProjectController mediator, JFrame frame) { 96 DataMapDisplayEvent event; 97 event = new DataMapDisplayEvent(frame, map, domain); 98 mediator.fireDataMapDisplayEvent(event); 99 } 100 101 } | Popular Tags |