1 56 package org.objectstyle.cayenne.modeler.dialog.validator; 57 58 import javax.swing.JFrame ; 59 60 import org.objectstyle.cayenne.access.DataDomain; 61 import org.objectstyle.cayenne.map.DataMap; 62 import org.objectstyle.cayenne.modeler.ProjectController; 63 import org.objectstyle.cayenne.modeler.event.QueryDisplayEvent; 64 import org.objectstyle.cayenne.project.ProjectPath; 65 import org.objectstyle.cayenne.project.validator.ValidationInfo; 66 import org.objectstyle.cayenne.query.Query; 67 68 72 public class QueryErrorMsg extends ValidationDisplayHandler { 73 74 public QueryErrorMsg(ValidationInfo validationInfo) { 75 super(validationInfo); 76 } 77 78 public void displayField(ProjectController mediator, JFrame frame) { 79 ProjectPath path = super.validationInfo.getPath(); 80 DataDomain domain = (DataDomain) path.firstInstanceOf(DataDomain.class); 81 DataMap map = (DataMap) path.firstInstanceOf(DataMap.class); 82 Query query = (Query) path.firstInstanceOf(Query.class); 83 84 QueryDisplayEvent event = new QueryDisplayEvent(frame, query, map, domain); 85 mediator.fireQueryDisplayEvent(event); 86 } 87 } 88 | Popular Tags |