Class ImageComponent

    • Constructor Detail

      • ImageComponent

        public ImageComponent()
    • Method Detail

      • setTextImage

        public void setTextImage​(TextImage textImage)
      • createDefaultRenderer

        public InteractableRenderer<ImageComponent> createDefaultRenderer()
        Description copied from class: AbstractComponent
        When you create a custom component, you need to implement this method and return a Renderer which is responsible for taking care of sizing the component, rendering it and choosing where to place the cursor (if Interactable). This value is intended to be overridden by custom themes.
        Specified by:
        createDefaultRenderer in class AbstractInteractableComponent
        Returns:
        Renderer to use when sizing and drawing this component
      • handleKeyStroke

        public Interactable.Result handleKeyStroke​(KeyStroke keyStroke)
        Description copied from class: AbstractInteractableComponent
        This method can be overridden to handle various user input (mostly from the keyboard) when this component is in focus. The input method from the interface, handleInput(..) is final in AbstractInteractableComponent to ensure the input filter is properly handled. If the filter decides that this event should be processed, it will call this method.
        Overrides:
        handleKeyStroke in class AbstractInteractableComponent
        Parameters:
        keyStroke - What input was entered by the user
        Returns:
        Result of processing the key-stroke