Class TuiClient
java.lang.Object
net.vincent.communidirect.client.tui.TuiClient
Full Lanterna TUI for CommuniDirect Client.
Key bindings
Ctrl+N Open external editor to compose a new message Ctrl+S Browse staged messages Ctrl+V Browse received messages Ctrl+X Exit ↑/↓ Navigate lists Ctrl+O Send selected staged message (staged view only) Enter Open selected message (received view only) Esc Back to log / dismiss overlay
-
Constructor Summary
ConstructorsConstructorDescriptionTuiClient(SettingsManager settings, KeyStoreManager keyStore) Constructs aTuiClientand derives the compact local identity string from the public key held inkeyStore. -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()Starts the interactive TUI, blocking until the user exits withCtrl+Xor the application is interrupted.
-
Constructor Details
-
TuiClient
Constructs aTuiClientand derives the compact local identity string from the public key held inkeyStore.- Parameters:
settings- the loaded application settings (IP, port)keyStore- the loaded key store providing the local private key and peer keys
-
-
Method Details
-
run
Starts the interactive TUI, blocking until the user exits withCtrl+Xor the application is interrupted.This method:
- Creates required data directories.
- Performs an initial directory scan.
- Initialises the Lanterna
Screen. - Schedules a 60-second auto-refresh of received messages.
- Enters the poll-based event loop.
- Throws:
IOException- if Lanterna cannot initialise the terminal
-