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.map.Procedure; 63 import org.objectstyle.cayenne.map.ProcedureParameter; 64 import org.objectstyle.cayenne.modeler.ProjectController; 65 import org.objectstyle.cayenne.modeler.event.ProcedureDisplayEvent; 66 import org.objectstyle.cayenne.modeler.event.ProcedureParameterDisplayEvent; 67 import org.objectstyle.cayenne.project.ProjectPath; 68 import org.objectstyle.cayenne.project.validator.ValidationInfo; 69 70 73 public class ProcedureParameterErrorMsg extends ValidationDisplayHandler { 74 75 public ProcedureParameterErrorMsg(ValidationInfo validationInfo) { 76 super(validationInfo); 77 } 78 79 public void displayField(ProjectController mediator, JFrame frame) { 80 ProjectPath path = super.validationInfo.getPath(); 81 DataDomain domain = (DataDomain) path.firstInstanceOf(DataDomain.class); 82 DataMap map = (DataMap) path.firstInstanceOf(DataMap.class); 83 Procedure procedure = (Procedure) path.firstInstanceOf(Procedure.class); 84 ProcedureParameter procedureParameter = 85 (ProcedureParameter) path.firstInstanceOf(ProcedureParameter.class); 86 87 89 ProcedureDisplayEvent procedureEvent = 93 new ProcedureDisplayEvent(frame, procedure, map, domain); 94 procedureEvent.setTabReset(true); 95 mediator.fireProcedureDisplayEvent(procedureEvent); 96 97 ProcedureParameterDisplayEvent event = 99 new ProcedureParameterDisplayEvent( 100 frame, 101 procedureParameter, 102 procedure, 103 map, 104 domain); 105 106 event.setTabReset(true); 107 mediator.fireProcedureParameterDisplayEvent(event); 108 } 109 110 } 111 | Popular Tags |