private void convertAllAreasToNode(GraphicGroupVo voGroup, DrawingControlGroup node) { node.setName(voGroup.getGroupName()); // convert all areas to controlgroup int i; for (i = 0; i < voGroup.getAreaCollection().size(); i++) { node.add(createDrawingControlArea(voGroup.getAreaCollection().get(i))); } for (int j = 0; j < voGroup.getChildGroups().size(); j++) { GraphicGroupVo childGroup = voGroup.getChildGroups().get(j); node.add(createDrawingControlGroup(childGroup)); convertAllAreasToNode(childGroup, node.getGroup(i + j)); } }
void convertAllAreasToNode(GraphicGroupVo voGroup, DrawingControlGroup node) { node.setName(voGroup.getGroupName()); // convert all areas to controlgroup int i; for (i = 0; voGroup.getAreaCollectionIsNotNull() && i < voGroup.getAreaCollection().size(); i++) { node.add(createDrawingControlArea(voGroup.getAreaCollection().get(i))); } for (int j = 0; voGroup.getChildGroupsIsNotNull() && j < voGroup.getChildGroups().size(); j++) { GraphicGroupVo childGroup = voGroup.getChildGroups().get(j); node.add(createDrawingControlGroup(childGroup)); convertAllAreasToNode(childGroup, node.getGroup(i + j)); } }
void convertAllAreasToVO(DrawingControlGroup node, GraphicGroupVo voGroup) { voGroup.setAreaCollection(new GraphicAreaVoCollection()); voGroup.setChildGroups(new GraphicGroupVoCollection()); voGroup.setGroupName(node.getName()); voGroup.setGroupID(new Integer(node.getID())); DrawingControlAreaCollection areas = node.getAreas(); for (int i = 0; i < areas.size(); i++) { DrawingControlArea area = areas.get(i); voGroup.getAreaCollection().add(createVoArea(area)); } DrawingControlGroupCollection groups = node.getGroups(); for (int i = 0; i < groups.size(); i++) { DrawingControlGroup group = groups.get(i); voGroup.getChildGroups().add(createVoGroup(group)); convertAllAreasToVO(group, voGroup.getChildGroups().get(i)); } }
private GraphicGroupVo createVoGroup(DrawingControlGroup group) { GraphicGroupVo voGroup = new GraphicGroupVo(); voGroup.setGroupName(group.getName()); voGroup.setGroupID(new Integer(group.getID())); return voGroup; }
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { if (formName.equals(form.getForms().Admin.ImageSelectDialog)) { AppImageVo voAppImage = form.getGlobalContext().Admin.getSelectedImage(); if (voAppImage != null) { Image image = engine.getRegisteredImage(voAppImage.getID_AppImage().intValue()); form.lyrDrawing().tabImageSelect().txtImagePath().setValue(voAppImage.getImagePath()); form.lyrDrawing().tabImageSelect().imgPreview().setValue(image); DrawingGraphicImageVo voGraphicImage = form.getLocalContext().getImageRecord(); if (voGraphicImage != null) { // Set the selected image voGraphicImage.setImage(voAppImage); // Set the Default Root Group if (voGraphicImage != null && voGraphicImage.getRootGroup() == null) { GraphicGroupVo voGraphicGroup = new GraphicGroupVo(); voGraphicGroup.setGroupName(voGraphicImage.getImageName()); voGraphicImage.setRootGroup(voGraphicGroup); } setDefaultImage(voGraphicImage); form.getLocalContext().setImageRecord(voGraphicImage); enbleRegionConfigTab(true); } } } }
private DrawingControlGroup createDrawingControlGroup(GraphicGroupVo voGroup) { DrawingControlGroup group = new DrawingControlGroup(voGroup.getGroupID().intValue(), voGroup.getGroupName()); return group; }