本文整理匯總了Java中com.googlecode.lanterna.gui2.MultiWindowTextGUI類的典型用法代碼示例。如果您正苦於以下問題:Java MultiWindowTextGUI類的具體用法?Java MultiWindowTextGUI怎麽用?Java MultiWindowTextGUI使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MultiWindowTextGUI類屬於com.googlecode.lanterna.gui2包,在下文中一共展示了MultiWindowTextGUI類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LanternaDialog
import com.googlecode.lanterna.gui2.MultiWindowTextGUI; //導入依賴的package包/類
public LanternaDialog(MultiWindowTextGUI gui, IContent content, String title, final Action closeAction, Action[] actions) {
Component component = new LanternaEditorLayout(content, actions);
window = new BasicWindow(title);
window.setComponent(component);
gui.addWindow(window);
}
示例2: main
import com.googlecode.lanterna.gui2.MultiWindowTextGUI; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
Terminal terminal = new DefaultTerminalFactory().createTerminal();
Screen screen = new TerminalScreen(terminal);
screen.startScreen();
Panel panel = new Panel(new BorderLayout());
Table<String> table = new Table<>("- Quotation -");
table.getTableModel().addRow("135.09");
table.getTableModel().addRow("134.56");
table.getTableModel().addRow("134.27");
table.getTableModel().addRow("133.90");
table.getTableModel().addRow("132.81");
table.setLayoutData(BorderLayout.Location.RIGHT);
panel.addComponent(table);
TextBox textBox = new TextBox("EMPTY", TextBox.Style.MULTI_LINE);
textBox.setLayoutData(BorderLayout.Location.CENTER);
panel.addComponent(textBox);
// Create window to hold the panel
BasicWindow window = new BasicWindow();
window.setComponent(panel);
window.setHints(Arrays.asList(Window.Hint.FULL_SCREEN));
// Create gui and start gui
MultiWindowTextGUI gui = new MultiWindowTextGUI(screen, new DefaultWindowManager(),
new EmptySpace(TextColor.ANSI.BLUE));
gui.addWindowAndWait(window);
}