java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.SubShape

public class SubShape extends Object
Wrapper around an AbstractShape within an AbstractCompositeShape, adding group membership and visibility control.

Sub-shapes can be organized into named groups so they can be shown, hidden, or removed together. This is useful for toggling parts of a composite shape, such as showing/hiding labels, highlights, or selection borders.

See Also:
  • Constructor Details

    • SubShape

      public SubShape(AbstractShape shape)
      Creates a sub-shape wrapper around the given shape.
      Parameters:
      shape - the shape to wrap
  • Method Details

    • isUngrouped

      public boolean isUngrouped()
      Returns true if this sub-shape has no group assigned.
      Returns:
      true if ungrouped
    • matchesGroup

      public boolean matchesGroup(String groupIdentifier)
      Checks whether this sub-shape belongs to the specified group.
      Parameters:
      groupIdentifier - the group identifier to match against, or null to match ungrouped shapes
      Returns:
      true if this sub-shape belongs to the specified group
    • setGroup

      public void setGroup(String groupIdentifier)
      Assigns this sub-shape to a group.
      Parameters:
      groupIdentifier - the group identifier, or null to make it ungrouped
    • getShape

      public AbstractShape getShape()
      Returns the wrapped shape.
      Returns:
      the underlying shape
    • isVisible

      public boolean isVisible()
      Returns whether this sub-shape is currently visible and will be rendered.
      Returns:
      true if visible
    • setVisible

      public void setVisible(boolean visible)
      Sets the visibility of this sub-shape.
      Parameters:
      visible - true to make the shape visible, false to hide it