How to use the decorator.FullBorder.FullBorder function in decorator

To help you get started, we’ve selected a few decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Relph1119 / GraphicDesignPatternByPython / src / decorator / Main.py View on Github external
from decorator.StringDisplay import StringDisplay
from decorator.SideBorder import SideBorder
from decorator.FullBorder import FullBorder

if __name__ == '__main__':
    b1 = StringDisplay("Hello, world.")
    b2 = SideBorder(b1, '#')
    b3 = FullBorder(b2)

    b1.show()
    b2.show()
    b3.show()

    b4 = SideBorder(FullBorder(FullBorder(SideBorder(FullBorder(StringDisplay("你好,世界。")), '*'))), '/')
    b4.show()
github Relph1119 / GraphicDesignPatternByPython / src / decorator / Main.py View on Github external
from decorator.StringDisplay import StringDisplay
from decorator.SideBorder import SideBorder
from decorator.FullBorder import FullBorder

if __name__ == '__main__':
    b1 = StringDisplay("Hello, world.")
    b2 = SideBorder(b1, '#')
    b3 = FullBorder(b2)

    b1.show()
    b2.show()
    b3.show()

    b4 = SideBorder(FullBorder(FullBorder(SideBorder(FullBorder(StringDisplay("你好,世界。")), '*'))), '/')
    b4.show()