Package dev.prozilla.pine.core.component
Interface ComponentsContext
- All Known Subinterfaces:
ComponentsProvider
- All Known Implementing Classes:
AnimationData,AudioEffectPlayer,AudioPlayer,BorderImage,ButtonNode,CameraControlData,CameraData,Component,DevConsoleData,DynamicText,Entity,FrameNode,GridGroup,ImageNode,LayoutNode,LayoutNodeStyle,MultiTileRenderer,Node,NodeRoot,NodeStyle,NodeStyleBase,ParticleBurstEmitter,ParticleEmitter,ParticleFlowEmitter,ParticleRenderer,RectRenderer,SpriteRenderer,TextInputNode,TextNode,TileRenderer,TooltipNode,Transform
public interface ComponentsContext
-
Method Summary
Modifier and TypeMethodDescription<ComponentType extends Component>
ComponentTypegetComponent(Class<ComponentType> componentClass) Gets a component of a given class.<ComponentType extends Component>
ComponentTypegetComponentInParent(Class<ComponentType> componentClass) <ComponentType extends Component>
ComponentTypegetComponentInParent(Class<ComponentType> componentClass, boolean recursive) getComponents(Class<ComponentType> componentClass) Gets all components of a given class.getComponentsInChildren(Class<ComponentType> componentClass)
-
Method Details
-
getComponentInParent
-
getComponentInParent
-
getComponentsInChildren
-
getComponent
Gets a component of a given class.- Parameters:
componentClass- Class of the component- Returns:
- Component of the given class, or null if there isn't one.
-
getComponents
<ComponentType extends Component> List<ComponentType> getComponents(Class<ComponentType> componentClass) Gets all components of a given class.- Parameters:
componentClass- Class of the components- Returns:
- Components of the given class.
-