Class SubShape
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.SubShape
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 Summary
ConstructorsConstructorDescriptionSubShape(AbstractShape shape) Creates a sub-shape wrapper around the given shape. -
Method Summary
Modifier and TypeMethodDescriptiongetShape()Returns the wrapped shape.booleanReturnstrueif this sub-shape has no group assigned.booleanReturns whether this sub-shape is currently visible and will be rendered.booleanmatchesGroup(String groupIdentifier) Checks whether this sub-shape belongs to the specified group.voidAssigns this sub-shape to a group.voidsetVisible(boolean visible) Sets the visibility of this sub-shape.
-
Constructor Details
-
SubShape
Creates a sub-shape wrapper around the given shape.- Parameters:
shape- the shape to wrap
-
-
Method Details
-
isUngrouped
public boolean isUngrouped()Returnstrueif this sub-shape has no group assigned.- Returns:
trueif ungrouped
-
matchesGroup
Checks whether this sub-shape belongs to the specified group.- Parameters:
groupIdentifier- the group identifier to match against, ornullto match ungrouped shapes- Returns:
trueif this sub-shape belongs to the specified group
-
setGroup
Assigns this sub-shape to a group.- Parameters:
groupIdentifier- the group identifier, ornullto make it ungrouped
-
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:
trueif visible
-
setVisible
public void setVisible(boolean visible) Sets the visibility of this sub-shape.- Parameters:
visible-trueto make the shape visible,falseto hide it
-