Interface Layer

All Superinterfaces:
Figure, PropertyBean, StyleableBean, StyleablePropertyBean, TreeNode<Figure>
All Known Implementing Classes:
LayerFigure

public interface Layer extends Figure
Defines a layer of a Drawing.

The parent of a Layer must be a Drawing or a Clipping . Method isSuitableParent(Figure) must be implementend accordingly.

A layer does not have handles and is not selectable.

Author:
Werner Randelshofer
  • Field Details

    • TYPE_SELECTOR

      static final String TYPE_SELECTOR
      The CSS type selector for a label object is "Layer".
      See Also:
  • Method Details

    • isSelectable

      default boolean isSelectable()
      Layer figures always return false for isSelectable.
      Specified by:
      isSelectable in interface Figure
      Returns:
      true if the user may select the figure
    • getTypeSelector

      default String getTypeSelector()
      Specified by:
      getTypeSelector in interface StyleableBean
    • isAllowsChildren

      default boolean isAllowsChildren()
      Description copied from interface: Figure
      Whether children may be added to this figure.
      Specified by:
      isAllowsChildren in interface Figure
      Returns:
      true if getChildren are allowed
    • isSuitableParent

      default boolean isSuitableParent(Figure newParent)
      Description copied from interface: Figure
      This method returns whether the provided figure is a suitable parent for this figure.
      Specified by:
      isSuitableParent in interface Figure
      Specified by:
      isSuitableParent in interface TreeNode<Figure>
      Parameters:
      newParent - The new parent figure.
      Returns:
      true if newParent is an acceptable parent