Class AbstractBorder

    • Constructor Detail

      • AbstractBorder

        public AbstractBorder()
    • Method Detail

      • setComponent

        public void setComponent​(Component component)
        Description copied from interface: Composite
        Sets the component which is inside this Composite. If you call this method with null, it removes the component wrapped by this Composite.
        Specified by:
        setComponent in interface Composite
        Overrides:
        setComponent in class AbstractComposite<Border>
        Parameters:
        component - Component to wrap
      • getRenderer

        public Border.BorderRenderer getRenderer()
        Description copied from interface: Component
        Returns the renderer used to draw this component and measure its preferred size. You probably won't need to call this method unless you know exactly which ComponentRenderer implementation is used and you need to customize it.
        Specified by:
        getRenderer in interface Component
        Overrides:
        getRenderer in class AbstractComponent<Border>
        Returns:
        Renderer this component is using
      • setSize

        public Border setSize​(TerminalSize size)
        Description copied from interface: Component
        This method will be called by the layout manager when it has decided how large the component will be. If you call this method yourself, prepare for unexpected results.
        Specified by:
        setSize in interface Component
        Overrides:
        setSize in class AbstractComponent<Border>
        Parameters:
        size - Current size of the component
        Returns:
        Itself
      • getLayoutData

        public LayoutData getLayoutData()
        Description copied from interface: Component
        Returns the layout data associated with this component. This data will optionally be used by the layout manager, see the documentation for each layout manager for more details on valid values and their meaning.
        Specified by:
        getLayoutData in interface Component
        Overrides:
        getLayoutData in class AbstractComponent<Border>
        Returns:
        This component's layout data
      • setLayoutData

        public Border setLayoutData​(LayoutData ld)
        Description copied from interface: Component
        Sets optional layout data associated with this component. This meaning of this data is up to the layout manager to figure out, see each layout manager for examples of how to use it.
        Specified by:
        setLayoutData in interface Component
        Overrides:
        setLayoutData in class AbstractComponent<Border>
        Parameters:
        ld - Layout data associated with this component
        Returns:
        Itself
      • toBasePane

        public TerminalPosition toBasePane​(TerminalPosition position)
        Description copied from interface: Component
        Translates a position local to the container to the base pane's coordinate space. For a window-based GUI, this be a coordinate in the window's coordinate space. If the component belongs to no base pane, it will return null.
        Specified by:
        toBasePane in interface Component
        Overrides:
        toBasePane in class AbstractComponent<Border>
        Parameters:
        position - Position to translate (relative to the container's top-left corner)
        Returns:
        Position in base pane space, or null if the component is an orphan
      • toGlobal

        public TerminalPosition toGlobal​(TerminalPosition position)
        Description copied from interface: Component
        Translates a position local to the container to global coordinate space. This should be the absolute coordinate in the terminal screen, taking no windows or containers into account. If the component belongs to no base pane, it will return null.
        Specified by:
        toGlobal in interface Component
        Overrides:
        toGlobal in class AbstractComponent<Border>
        Parameters:
        position - Position to translate (relative to the container's top-left corner)
        Returns:
        Position in global (or absolute) coordinates, or null if the component is an orphan
      • getWrappedComponentTopLeftOffset

        private TerminalPosition getWrappedComponentTopLeftOffset()