/** * Sets whether this layer should be cleared before being drawn. * * @param clear * @return Layer */ public Layer setClearLayerBeforeDraw(boolean clear) { getAttributes().setClearLayerBeforeDraw(clear); return this; }
/** * Returns whether this layer is cleared before being drawn. * * @return boolean */ public boolean isClearLayerBeforeDraw() { return getAttributes().isClearLayerBeforeDraw(); }
/** * Returns whether the Layer is zoomable. * If not, changes to the (parent) Viewport's transform (probably due to zoom or pan operations) won't affect this layer. * The default value is true. * * @return boolean */ public boolean isTransformable() { return getAttributes().isTransformable(); }
/** * Sets whether the Layer is zoomable. * If not, changes to the (parent) Viewport's transform (probably due to zoom or pan operations) won't affect this layer. * The default value is true. * * @param zoomable boolean * @return */ public Layer setTransformable(boolean transformable) { getAttributes().setTransformable(transformable); return this; }
/** * Constructor. Creates an instance of a Layer. * * @param node */ protected Layer(JSONObject node) { super(NodeType.LAYER, node); if (NativeInternalType.BOOLEAN != getAttributes().typeOf(Attribute.CLEAR_LAYER_BEFORE_DRAW)) { setClearLayerBeforeDraw(true); } if (NativeInternalType.BOOLEAN != getAttributes().typeOf(Attribute.TRANSFORMABLE)) { setTransformable(true); } }
object.put("attributes", new JSONObject(getAttributes()));