Add multiinput scenario

- InputView using viewcommands and has event for text change.
- Experimental way to handle tab navigation in a layout views.
- New viewcommands for tab navigation and moving cursor.
- Mouse click takes focus in AbstractView if no view command
  binding.
- MultiInputViewScenario now shows tab navigation.
- Fixes #917
This commit is contained in:
Janne Valkealahti
2023-11-07 08:25:47 +00:00
parent 21d1ce8599
commit ccf6d771d9
13 changed files with 387 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.shell.docs;
import org.springframework.shell.component.view.control.InputView;
class InputViewSnippets {
class Dump1 {
@SuppressWarnings("unused")
void dump1() {
// tag::sample[]
InputView input = new InputView();
String text = input.getInputText();
// end::sample[]
}
}
}