Update docs
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
[#appendix-tui-catalog]
|
||||
= Catalog App
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
|
||||
|
||||
Catalog application is showing various ways how Terminal UI Framework can be used.
|
||||
In this section we discuss how this application works. It can be considered to be
|
||||
a reference application as it's using most of the features available and tries
|
||||
to follow best practices.
|
||||
|
||||
[[create-scenario]]
|
||||
== Create Scenario
|
||||
Every `Scenario` essentially is a sample code of a `View` as that's what catalog
|
||||
app demonstrates. In the sample app create a new scenario class under
|
||||
_scenario_ package and implement it as something shown below.
|
||||
|
||||
[source, java, indent=0]
|
||||
----
|
||||
include::{snippets}/CatalogSnippets.java[tag=samplescenario]
|
||||
----
|
||||
|
||||
NOTE: You need to define all fields, `name`, `description` and `category`
|
||||
with _@ScenarioComponent_.
|
||||
@@ -0,0 +1,17 @@
|
||||
[appendix]
|
||||
[#appendix-tech-intro-tui]
|
||||
= Terminal UI
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
|
||||
|
||||
This is a technical introduction to _UI Framework_.
|
||||
|
||||
_UI Framework_ is a toolkit to build rich console apps.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[#appendix-tui-eventloop]
|
||||
= View Development
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
While a _view_ just need to implement `View` it's usually convenient to just
|
||||
use `BoxView` as a parent.
|
||||
|
||||
== Register Bindings
|
||||
|
||||
In an `AbstractView` use variants of _registerKeyBinding_, _registerHotKeyBinding_
|
||||
and _registerMouseBinding_.
|
||||
Reference in New Issue
Block a user