BoxView
BoxView 是提供绘制到有界 Rectancle 中的功能的基本实现。对它的唯一直接使用是它的 drawFunction
,它允许在不实现完全自定义 View
的情况下执行简单操作。
BoxView is a base implementation providing functionality to draw into a
bounded Rectancle. Only direct use of it is its drawFunction
which
allows to do simple things without implementing a full custom View
.
Unresolved include directive in modules/ROOT/pages/tui/views/box.adoc - include::../../../../../src/test/java/org/springframework/shell/docs/BoxViewSnippets.java[]
Customisation
BoxView 主要充当基类,包含一些有用的特性,例如它是否应该绘制边框及其填充。边框可以有标题,可以定义其颜色和焦点颜色。还可以明确设置背景颜色,这将覆盖样式中的背景颜色。
BoxView as mostly being a base class contains some useful features like if it should draw a border and what what are its paddings. Border can have a title and its color and focused color can be defined. It’s also possible to explicitely set background color which will override one from styling.