public interface Component

Known direct subclasses
InteractableComponent

Provides access to raw input events for given Entity, so a client can implement their own interaction logic.

MovableComponent

Allows users to interactively move the Entity.

PointerCaptureComponent

Provides pointer capture capabilities for a given entity.

ResizableComponent

A Component which when attached to a PanelEntity provides a user-resize affordance.


Base interface for all components.

Components are attached to entities, to add functionality to those entities.

Summary

Public methods

abstract boolean

Called when this component is attached to the entity.

abstract void

Called when this component is detached from the entity.

Public methods

onAttach

Added in 1.0.0-alpha01
abstract boolean onAttach(@NonNull Entity entity)

Called when this component is attached to the entity.

Parameters
@NonNull Entity entity

Entity this component is being attached to.

Returns
boolean

True if the component can attach to given Entity.

onDetach

Added in 1.0.0-alpha01
abstract void onDetach(@NonNull Entity entity)

Called when this component is detached from the entity.

Parameters
@NonNull Entity entity

Entity this component is being detached from.