/** * @param obj * @return */ protected Shape getCachedShape(EnvObjectLogic obj) { if (cachedShapes.containsKey(obj.getPojo().getUUID())) { return cachedShapes.get(obj.getPojo().getUUID()); } else { return applyShapeModifiers(obj); } }
private Shape applyShapeModifiers(EnvObjectLogic object) { EnvObject obj = object.getPojo(); int x = obj.getCurrentRepresentation().getOffset().getX(); int y = obj.getCurrentRepresentation().getOffset().getY(); Shape shape = TopologyUtils.convertToAWT(obj.getShape()); shape = getTranslatedShape(shape, new Point(x, y)); shape = getRotatedShape(shape, obj.getCurrentRepresentation().getRotation()); cachedShapes.put(object.getPojo().getUUID(), shape); return shape; }