public void populateListControl(MskJointVoCollection voCollJoints) { // Clear list form.grdList().getRows().clear(); if(voCollJoints != null) { for(int x = 0; x < voCollJoints.size(); x++) { if(voCollJoints.get(x) != null) { GenForm.grdListRow row = form.grdList().getRows().newRow(); row.setValue(voCollJoints.get(x)); row.setColJointName(voCollJoints.get(x).getName()); row.setColJointDescription(voCollJoints.get(x).getDescription()); row.setColJointActive(voCollJoints.get(x).getIsActive().booleanValue()); } } } }
public MskJointVoCollection listJointsForGroupType(MSKGroupType groupType) { DomainFactory factory = getDomainFactory(); String hql = " select joints from MskGroups m "; StringBuffer condStr = new StringBuffer(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); condStr.append(" where m.groupType = :groupType"); markers.add("groupType"); values.add(getDomLookup(groupType)); hql += condStr.toString(); return MskJointVoAssembler.createMskJointVoCollectionFromMskJoints(factory.find(hql, markers, values)).sort(); }
public MskJointVoCollection listJointWithGroupTypeDigit(Boolean isDigitType) { DomainFactory factory = getDomainFactory(); String strSQL = new String(); StringBuffer condStr = new StringBuffer(); String andStr = " "; strSQL = "select m2_1 from MskGroups as m1_1 left join m1_1.groupType as l1_1 join m1_1.joints as m2_1 where m1_1.isActive = 1"; if (isDigitType.equals(Boolean.TRUE)) { andStr = " and "; condStr.append(andStr + "m1_1.groupType.id = -855"); } strSQL += condStr.toString(); return ims.core.vo.domain.MskJointVoAssembler.createMskJointVoCollectionFromMskJoints(factory.find(strSQL)); }
private MskJointVoCollection populateJointDataFromScreen() { MskJointVoCollection coll = new MskJointVoCollection(); GenForm.lyrBoneJointLayer.tabJointContainer.grdJointsRow row = null; for(int i=0;i<form.lyrBoneJoint().tabJoint().grdJoints().getRows().size();i++) { row = form.lyrBoneJoint().tabJoint().grdJoints().getRows().get(i); if (row.getColJoints().getValue() != null) coll.add((MskJointVo) row.getColJoints().getValue()); } return coll; }
private void populateJointControls(MskJointVoCollection coll) { if (coll == null) return; MskJointVo item; GenForm.lyrBoneJointLayer.tabJointContainer.grdJointsRow row = null; for(int i = 0 ; i < coll.size() ; i++) { item = coll.get(i); row = form.lyrBoneJoint().tabJoint().grdJoints().getRows().newRow(); row.getColJoints().newRow(item, item.getName()); row.getColJoints().setValue(item); row.setValue(item); } }
public MskJointVoCollection listJoints(String strName) { DomainFactory factory = getDomainFactory(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String hql; hql = " from MskJoints m where m.isActive = true and upper(m.name) like :Name"; markers.add("Name"); values.add(strName.toUpperCase() + "%"); List lstJoints = factory.find(hql, markers, values); return MskJointVoAssembler.createMskJointVoCollectionFromMskJoints(lstJoints); }
public MskJointVoCollection listJointsForGroup(MskGroupsRefVo voRefMskGroup) { // WDEV-4490 - Check for null parameter if (voRefMskGroup == null || !voRefMskGroup.getID_MskGroupsIsNotNull()) return null; DomainFactory factory = getDomainFactory(); String hql = " select m.joints from MskGroups m where m.isActive = true and m.id = " + voRefMskGroup.getID_MskGroups(); return MskJointVoAssembler.createMskJointVoCollectionFromMskJoints(factory.find(hql)).sort(); }
/** * Lists all configured digit joints from the domain and sets the forms joint combo with the joints that have not been configured * */ private boolean listUnUsedJoints() { form.ctnDetails().lyrDetails().tabDetails().cmbJoint().clear(); MskJointVoCollection voCollConfiguredJoints = domain.listDigitJoints(); for (int i = 0; i < voCollConfiguredJoints.size(); i++) { boolean bFound = false; for (int j = 0; j < form.grdMovement().getSelectedRow().getRows().size(); j++) { if (form.grdMovement().getSelectedRow().getRows().get(j).getValue() instanceof MskJointVo && form.grdMovement().getSelectedRow().getRows().get(j).getValue().equals(voCollConfiguredJoints.get(i))) { bFound = true; break; } } if (bFound == false) form.ctnDetails().lyrDetails().tabDetails().cmbJoint().newRow(voCollConfiguredJoints.get(i), voCollConfiguredJoints.get(i).getName()); } if (form.ctnDetails().lyrDetails().tabDetails().cmbJoint() == null) { engine.showMessage("All joints configured for this Digit"); return false; } else return true; }
/** * WDEV-4490 Function used for listing Joints records for a Group */ private void listJointsForGroup(MskJointVoCollection joints) { // Clear joints & movements form.ctnDetails().lyrDetails().tabDetails().cmbJoint().clear(); form.ctnDetails().lyrDetails().tabDetails().cmbMovement().clear(); if (joints == null) return; for (int i = 0; i < joints.size(); i++) form.ctnDetails().lyrDetails().tabDetails().cmbJoint().newRow(joints.get(i), joints.get(i).getName()); }
private void loadAndPopulateAssessmentGrid(OPDSpasAssLimbsVoCollection limbFinding) { //load joint movements form.cntDetails().grdAssessment().getRows().clear(); MskGroupVoCollection voCollMskGroup = form.getLocalContext().getCollMskGroupVo(); if(form.getMode().equals(FormMode.VIEW)){ if (voCollMskGroup != null) { if (voCollMskGroup.size()>0) { for(int i=0;i<voCollMskGroup.size();i++) { if (voCollMskGroup.get(i).getJointsIsNotNull() && voCollMskGroup.get(i).getGroupTypeIsNotNull() //Wdev-1831 && !voCollMskGroup.get(i).getGroupType().equals(MSKGroupType.DIGIT)) //Wdev-1831 { MskJointVoCollection voCollJoints = voCollMskGroup.get(i).getJoints(); MskJointVo voMskJoint; for(int j=0;j<voCollJoints.size();j++) { voMskJoint = voCollJoints.get(j); if (voMskJoint.getMovementsIsNotNull()) { if (voMskJoint.getMovements().size()>0) { //if at least one child instantiated add joint as parent if(childInstantiated(voMskJoint, limbFinding)){ GenForm.cntDetailsContainer.grdAssessmentRow row = form.cntDetails().grdAssessment().getRows().newRow(); row.setColLimbs(voMskJoint.getName()); row.setObjectId(voMskJoint.getID_MskJoints()); row.setValue((MskJointVo)voMskJoint); row.setReadOnly(true); row.setBackColor(Color.AliceBlue); row.setColActiveLeft(null); row.setColActiveRight(null); row.setColPassiveLeft(null); row.setColPassiveRight(null); row.setColToneLeft(null); row.setColToneRight(null); row.setColLimbsReadOnly(true); MskJointsMovements voJointMovment; for(int k=0;k<voMskJoint.getMovements().size();k++) { voJointMovment = voMskJoint.getMovements().get(k); for(int l=0;l<limbFinding.size();l++) { OPDSpasAssLimbsVo voLimb = limbFinding.get(l); if (voJointMovment.getId() == voLimb.getMovement().getId() && voMskJoint.equals(voLimb.getJoint())) { //add movments as children GenForm.cntDetailsContainer.grdAssessmentRow childrow = row.getRows().newRow(); childrow.setColLimbs(voJointMovment.getText()); childrow.setColActiveLeft(voLimb.getActiveRomLeft()); childrow.setColActiveRight(voLimb.getActiveRomRight()); childrow.setColPassiveLeft(voLimb.getPassiveRomLeft()); childrow.setColPassiveRight(voLimb.getPassiveRomRight()); childrow.setColToneLeft(voLimb.getToneLeft()); childrow.setColToneRight(voLimb.getToneRight()); childrow.setValue(voJointMovment); } } } } } } } } } } } } else{ loadAssessmentGrid(form.getLocalContext().getCollMskGroupVo()); populateAssessmentGrid(limbFinding); } form.cntDetails().grdAssessment().expandAll(); }
private void loadAssessmentGrid(MskGroupVoCollection voCollMskGroup) { if (voCollMskGroup != null) { if (voCollMskGroup.size()>0) { for(int i=0;i<voCollMskGroup.size();i++) { if (voCollMskGroup.get(i).getJointsIsNotNull() && voCollMskGroup.get(i).getGroupTypeIsNotNull() //Wdev-1831 && !voCollMskGroup.get(i).getGroupType().equals(MSKGroupType.DIGIT)) //Wdev-1831 { MskJointVoCollection voCollJoints = voCollMskGroup.get(i).getJoints(); MskJointVo voMskJoint; for(int j=0;j<voCollJoints.size();j++) { voMskJoint = voCollJoints.get(j); if (voMskJoint.getMovementsIsNotNull()) { if (voMskJoint.getMovements().size()>0) { //add joint as parent GenForm.cntDetailsContainer.grdAssessmentRow row = form.cntDetails().grdAssessment().getRows().newRow(); row.setColLimbs(voMskJoint.getName()); row.setObjectId(voMskJoint.getID_MskJoints()); row.setValue((MskJointVo)voMskJoint); row.setReadOnly(true); row.setBackColor(Color.AliceBlue); row.setColActiveLeft(null); row.setColActiveRight(null); row.setColPassiveLeft(null); row.setColPassiveRight(null); row.setColToneLeft(null); row.setColToneRight(null); row.setColLimbsReadOnly(true); MskJointsMovements voJointMovment; for(int k=0;k<voMskJoint.getMovements().size();k++) { voJointMovment = voMskJoint.getMovements().get(k); //add movments as children GenForm.cntDetailsContainer.grdAssessmentRow childrow = row.getRows().newRow(); childrow.setColLimbs(voJointMovment.getText()); childrow.setReadOnly(false); childrow.setValue(voJointMovment); childrow.setColActiveLeft(null); childrow.setColActiveRight(null); childrow.setColPassiveLeft(null); childrow.setColPassiveRight(null); childrow.setColToneLeft(null); childrow.setColToneRight(null); childrow.setColLimbsReadOnly(true); } } } } } } } } }
protected void onGrdJointsGridQueryComboBoxTextSubmited(int column, grdJointsRow row, String text) throws PresentationLogicException { row.getColJoints().clear(); row.setValue(null); String strJoint = row.getColJoints().getEditedText() == null ? "" : row.getColJoints().getEditedText(); MskJointVoCollection voCollJoints = domain.listJoints(strJoint); MskJointVoCollection voCollJointsDigitType = domain.listJointWithGroupTypeDigit(Boolean.TRUE); MskJointVoCollection voCollJointAlreadyUsed = domain.listJointWithGroupTypeDigit(Boolean.FALSE); if (voCollJoints == null) return; int amountAdded = 0; MskJointVo voFirstMskJoint = new MskJointVo(); for (int x=0; x < voCollJoints.size(); x++) { boolean bFound = false; //For each joint retrieved in the list call //Check that they are not already associated with this group before adding. for (int y=0; y < voCollJointAlreadyUsed.size(); y++) { if (voCollJoints.get(x).equals(voCollJointAlreadyUsed.get(y))) { for (int i = 0; i < voCollJointsDigitType.size(); i++) { if (voCollJoints.get(x).equals(voCollJointsDigitType.get(i)) && form.lyrBoneJoint().tabJoint().cmbGroupType().getValue().equals("Digit")) { row.getColJoints().newRow(voCollJoints.get(x), voCollJoints.get(x).getName()); row.setValue(voCollJoints.get(x)); if(amountAdded == 0) voFirstMskJoint = voCollJoints.get(x); amountAdded++; } } bFound = true; break; } } if (bFound == false) { row.getColJoints().newRow(voCollJoints.get(x), voCollJoints.get(x).getName()); row.setValue(voCollJoints.get(x)); if(amountAdded == 0) voFirstMskJoint = voCollJoints.get(x); amountAdded++; } } if (amountAdded == 1) row.getColJoints().setValue(voFirstMskJoint); else if(amountAdded > 1) row.getColJoints().showOpened(); else if(amountAdded == 0) engine.showMessage("No new joints for this search criteria were configured."); }
public MskJointVoCollection listDigitJoints() { BoneJointConfiguration impl = (BoneJointConfiguration)getDomainImpl(MuscleJointConfigurationImpl.class); return impl.listJointsForGroupType(MSKGroupType.DIGIT); }