當前位置: 首頁>>代碼示例>>Java>>正文


Java MultiWindowTextGUI類代碼示例

本文整理匯總了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);
}
 
開發者ID:BrunoEberhard,項目名稱:minimal-j,代碼行數:9,代碼來源:LanternaDialog.java

示例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);
}
 
開發者ID:michaelliao,項目名稱:crypto-exchange,代碼行數:31,代碼來源:AgentClient.java


注:本文中的com.googlecode.lanterna.gui2.MultiWindowTextGUI類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。