class AbstractBorder extends AbstractComposite<Border> implements Border {
    @Override
    public void setComponent(Component component) {
        super.setComponent(component);
        if(component != null) {
            component.setPosition(TerminalPosition.TOP_LEFT_CORNER);
        }
    }

    @Override
    public BorderRenderer getRenderer() {
        return (BorderRenderer)super.getRenderer();
    }

    @Override
    public Border setSize(TerminalSize size) {
        super.setSize(size);
        getComponent().setSize(getWrappedComponentSize(size));
        return self();
    }

    @Override
    public LayoutData getLayoutData() {
        if(getComponent() == null) {
            return super.getLayoutData();
        }
        return getComponent().getLayoutData();
    }

    @Override
    public Border setLayoutData(LayoutData ld) {
        if(getComponent() == null) {
            super.setLayoutData(ld);
        } else {
            getComponent().setLayoutData(ld);
        }
        return this;
    }

    @Override
    public TerminalPosition toBasePane(TerminalPosition position) {
        TerminalPosition terminalPosition = super.toBasePane(position);
        if(terminalPosition == null) {
            return null;
        }
        return terminalPosition.withRelative(getWrappedComponentTopLeftOffset());
    }

    @Override
    public TerminalPosition toGlobal(TerminalPosition position) {<FILL_FUNCTION_BODY>}

    private TerminalPosition getWrappedComponentTopLeftOffset() {
        return getRenderer().getWrappedComponentTopLeftOffset();
    }

    private TerminalSize getWrappedComponentSize(TerminalSize borderSize) {
        return getRenderer().getWrappedComponentSize(borderSize);
    }
}

        TerminalPosition terminalPosition = super.toGlobal(position);
        if(terminalPosition == null) {
            return null;
        }
        return terminalPosition.withRelative(getWrappedComponentTopLeftOffset());
    
<methods>public void <init>() ,public boolean containsComponent(com.googlecode.lanterna.gui2.Component) ,public int getChildCount() ,public Collection<com.googlecode.lanterna.gui2.Component> getChildren() ,public List<com.googlecode.lanterna.gui2.Component> getChildrenList() ,public com.googlecode.lanterna.gui2.Component getComponent() ,public boolean handleInput(com.googlecode.lanterna.input.KeyStroke) ,public void invalidate() ,public boolean isInvalid() ,public com.googlecode.lanterna.gui2.Interactable nextFocus(com.googlecode.lanterna.gui2.Interactable) ,public com.googlecode.lanterna.gui2.Interactable previousFocus(com.googlecode.lanterna.gui2.Interactable) ,public boolean removeComponent(com.googlecode.lanterna.gui2.Component) ,public void setComponent(com.googlecode.lanterna.gui2.Component) ,public void updateLookupMap(com.googlecode.lanterna.gui2.InteractableLookupMap) <variables>private com.googlecode.lanterna.gui2.Component component