• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TerminalScreen类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.googlecode.lanterna.screen.TerminalScreen的典型用法代码示例。如果您正苦于以下问题:Java TerminalScreen类的具体用法?Java TerminalScreen怎么用?Java TerminalScreen使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TerminalScreen类属于com.googlecode.lanterna.screen包,在下文中一共展示了TerminalScreen类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: main

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public static void main(String[] args) throws InterruptedException, IOException {
    SwingTerminalFrame terminal = new SwingTerminalFrame(SwingTerminalFrame.AutoCloseTrigger.CloseOnExitPrivateMode);
    terminal.setCursorVisible(false);

    Screen screen = new TerminalScreen(terminal);
    screen.startScreen();
    
    terminal.setTitle("Freedom: An arena-battle roguelike");
    terminal.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    terminal.setResizable(false);
    terminal.setVisible(true);

    while(screen.pollInput() == null) {
        if(screen.doResizeIfNecessary() != null) {
            screen.refresh();
        }
        Thread.sleep(100);
    }
    screen.stopScreen();
}
 
开发者ID:Truth0906,项目名称:lanterna,代码行数:21,代码来源:Issue95.java


示例2: FrontEnd

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public FrontEnd(TelnetTerminal terminal) throws IOException {
    System.out.println("Creating a new frontEnd");
    this.terminal = terminal;
    this.screen = new TerminalScreen(terminal);
    screen.startScreen();
    this.gui = new MultiWindowTextGUI(this.screen, new DefaultWindowManager(), new EmptySpace(TextColor.ANSI.BLUE));
    lang = ResourceBundle.getBundle("cnvtgTelnet/zh_CN");
}
 
开发者ID:cnVintage,项目名称:cnVintage-Telnet,代码行数:9,代码来源:FrontEnd.java


示例3: main

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
    Terminal t = new TestTerminalFactory(args).createTerminal();
    t.enterPrivateMode();
    TerminalScreen s = new TerminalScreen(t);
    s.startScreen();
    try {
        Thread.sleep(1000);
    }
    catch(InterruptedException e) {}
    s.stopScreen();
    t.exitPrivateMode();
}
 
开发者ID:Truth0906,项目名称:lanterna,代码行数:13,代码来源:Issue78.java


示例4: createScreen

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public Screen createScreen() throws IOException {
    return new TerminalScreen(createTerminal());
}
 
开发者ID:Truth0906,项目名称:lanterna,代码行数:4,代码来源:TestTerminalFactory.java


示例5: LanternaToolkit

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public LanternaToolkit(final Terminal terminal) throws IOException {
    screen = new TerminalScreen(terminal);
    eventWorker = new EventWorker();

    setDefaultToolkit(this);
}
 
开发者ID:viktor-podzigun,项目名称:charva-lanterna,代码行数:7,代码来源:LanternaToolkit.java


示例6: SessionStatePrinter

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public SessionStatePrinter() {
    try {
        Terminal terminal = new DefaultTerminalFactory(System.out, System.in,
                 Charset.forName("UTF-8")).createTerminal();
        terminal.setCursorVisible(false);

        screen = new TerminalScreen(terminal);
        graphics = screen.newTextGraphics();
        screen.startScreen();
        screen.clear();

        started = System.currentTimeMillis();

        this.torrent = Optional.empty();
        printTorrentInfo();
    } catch (IOException e) {
        throw new RuntimeException("Failed to create terminal", e);
    }
}
 
开发者ID:atomashpolskiy,项目名称:bt,代码行数:20,代码来源:SessionStatePrinter.java


示例7: main

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的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


示例8: main

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public static void main(String... args) throws IOException {
    Terminal term = new DefaultTerminalFactory().createTerminal();
    Screen screen = new TerminalScreen(term);
    WindowManager windowManager = new DefaultWindowManager();
    Component background = new EmptySpace(TextColor.ANSI.DEFAULT);
    final WindowBasedTextGUI gui = new MultiWindowTextGUI(screen, windowManager, background);
    screen.startScreen();
    gui.addWindowAndWait(new BasicWindow("Issue155") {{
        setComponent(createUi(gui, this));
    }});
    screen.stopScreen();
}
 
开发者ID:Truth0906,项目名称:lanterna,代码行数:13,代码来源:Issue155.java


示例9: main

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public static void main(String... args) throws IOException {
    Terminal term = new DefaultTerminalFactory().createTerminal();
    Screen screen = new TerminalScreen(term);
    WindowManager windowManager = new DefaultWindowManager();
    Component background = new EmptySpace(TextColor.ANSI.DEFAULT);
    final WindowBasedTextGUI gui = new MultiWindowTextGUI(screen, windowManager, background);
    screen.startScreen();
    gui.addWindowAndWait(new BasicWindow("Issue150") {{
        setComponent(createUi());
    }});
    screen.stopScreen();
}
 
开发者ID:Truth0906,项目名称:lanterna,代码行数:13,代码来源:Issue150.java


示例10: BasicTerminal

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public BasicTerminal(PredictionGenerator predictionGenerator, CommandExecutor commandExecutor) throws IOException {
    this.predictionGenerator = predictionGenerator;
    this.commandExecutor = commandExecutor;

    TerminalFactory factory = new DefaultTerminalFactory();
    screen = new TerminalScreen(factory.createTerminal());
}
 
开发者ID:oserban,项目名称:simple-terminal,代码行数:8,代码来源:BasicTerminal.java


示例11: start

import com.googlecode.lanterna.screen.TerminalScreen; //导入依赖的package包/类
public static void start() {
	ModelTest.exitIfProblems();
	Frontend.setInstance(new LanternaFrontend());
	try {
		Terminal terminal = new DefaultTerminalFactory().createTerminal();
		Screen screen = new TerminalScreen(terminal);
		screen.startScreen();
		
		new Lanterna(screen);
	} catch (Exception x) {
		throw new RuntimeException(x);
	}		
}
 
开发者ID:BrunoEberhard,项目名称:minimal-j,代码行数:14,代码来源:Lanterna.java



注:本文中的com.googlecode.lanterna.screen.TerminalScreen类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FailJob类代码示例发布时间:2022-05-22
下一篇:
Java HASH类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap