/** * Sets the svg options. * * @param comp the comp * @param boundsBehaviour the bounds behaviour */ private void setSvgOptions(MTComponent comp, int boundsBehaviour) { comp.setGestureAllowance(DragProcessor.class, false); comp.setGestureAllowance(RotateProcessor.class, false); comp.setGestureAllowance(ScaleProcessor.class, false); comp.setGestureAllowance(TapProcessor.class, true); comp.setComposite(true); // Erste group nicht behandeln, aber kinder for (MTComponent child : comp.getChildren()) { setSvgOptionsRecursive(child, boundsBehaviour); } }
/** * Sets the svg options recursive. * * @param comp the comp * @param boundsBehaviour the bounds behaviour */ private void setSvgOptionsRecursive(MTComponent comp, int boundsBehaviour) { comp.setGestureAllowance(DragProcessor.class, false); comp.setGestureAllowance(RotateProcessor.class, false); comp.setGestureAllowance(ScaleProcessor.class, false); comp.setGestureAllowance(TapProcessor.class, false); // comp.unregisterAllInputProcessors(); // /* if (comp instanceof AbstractShape) { AbstractShape shape = (AbstractShape) comp; if (!shape.isBoundingShapeSet() && !(shape.getBoundingShape() instanceof BoundsZPlaneRectangle)) { shape.setBoundingShape(new BoundsZPlaneRectangle(shape)); } shape.setBoundsBehaviour(boundsBehaviour); } // */ for (MTComponent child : comp.getChildren()) { setSvgOptionsRecursive(child, boundsBehaviour); } }