All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jhotdraw8.draw.figure.Layer Maven / Gradle / Ivy

/*
 * @(#)Layer.java
 * Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
 */
package org.jhotdraw8.draw.figure;


/**
 * Defines a layer of a {@link Drawing}.
 * 

* The parent of a {@code Layer} must be a {@code Drawing} or a {@code Clipping} . Method * {@link #isSuitableParent(Figure)} must be * implementend accordingly. *

* A layer does not have handles and is not selectable. * * @author Werner Randelshofer */ public interface Layer extends Figure { /** * The CSS type selector for a label object is {@value #TYPE_SELECTOR}. */ String TYPE_SELECTOR = "Layer"; /** * Layer figures always return false for isSelectable. */ @Override default boolean isSelectable() { return false; } @Override default String getTypeSelector() { return TYPE_SELECTOR; } @Override default boolean isAllowsChildren() { return true; } @Override default boolean isSuitableParent(Figure newParent) { return (newParent instanceof LayeredDrawing) || (newParent instanceof Clipping); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy