本文整理汇总了Java中com.googlecode.lanterna.TerminalFacade.createGUIScreen方法的典型用法代码示例。如果您正苦于以下问题:Java TerminalFacade.createGUIScreen方法的具体用法?Java TerminalFacade.createGUIScreen怎么用?Java TerminalFacade.createGUIScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.googlecode.lanterna.TerminalFacade
的用法示例。
在下文中一共展示了TerminalFacade.createGUIScreen方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import com.googlecode.lanterna.TerminalFacade; //导入方法依赖的package包/类
@Override
public void run() {
LOG.debug("Running LanternaRunner");
guiScreen = TerminalFacade.createGUIScreen(terminal);
guiScreen.getScreen().startScreen();
Window mainWindow = createMainWindow();
guiScreen.showWindow(mainWindow);
guiScreen.getScreen().stopScreen();
terminal.clearScreen();
terminal.flush();
session.close(false);
LOG.debug("Finished LanternaRunner");
}
示例2: main
import com.googlecode.lanterna.TerminalFacade; //导入方法依赖的package包/类
public static void main(String... args) throws URISyntaxException, IOException, InterruptedException
{
CliConfig cliConfig = new Parser().parse(args);
if (cliConfig == null)
{
return;
}
// Create components
final HdfsScanner hdfsScanner = new HdfsScanner(cliConfig.getDir(), "hdfs");
final GUIScreen guiScreen = TerminalFacade.createGUIScreen();
final MainWindow mainWindow = new MainWindow(guiScreen);
final HelpPopup helpPopup = new HelpPopup(guiScreen);
final ScanningPopup scanningPopup = new ScanningPopup(guiScreen);
final Controller controller = new Controller();
// wire them
mainWindow.setController(controller);
scanningPopup.setController(controller);
controller.setGuiScreen(guiScreen);
controller.setMainWindow(mainWindow);
controller.setHelpPopup(helpPopup);
controller.setScanningPopup(scanningPopup);
controller.setHdfsScanner(hdfsScanner);
controller.startScan(cliConfig.getDir(), cliConfig.getFilter());
}
示例3: GuiConsoleType
import com.googlecode.lanterna.TerminalFacade; //导入方法依赖的package包/类
/**
* Instantiates a new Gui console.
*/
private GuiConsoleType() {
// Connect to MBean Server
JMXInitializer initializer = DefaultJMXInitializer.getInstance();
initializer.connect();
String os = System.getProperty("os.name").toLowerCase();
// linux or unix
UNIX = (os.contains("nix") || os.contains("nux"));
// windows
WINDOWS = os.contains("win");
if (UNIX) {
TERMINAL = TerminalFacade.createUnixTerminal(Charset.forName("UTF8"));
} else {
TERMINAL = TerminalFacade.createTerminal(Charset.forName("UTF8"));
}
// TERMINAL.enterPrivateMode();
SCREEN = TerminalFacade.createScreen(TERMINAL);
GUI_SCREEN = TerminalFacade.createGUIScreen(SCREEN);
if (getGUI_SCREEN() == null) {
System.err.println(GenericMBeanCliBootstrap.showWelcomeScreen());
DefaultConsoleIO.getInstance().run();
return;
}
GUI_SCREEN.setTheme(GenericMBeanCliGuiTheme.getInstance());
SCREEN.startScreen();
GUI_SCREEN.showWindow(PrimaryGuiWindow.getInstance(), GUIScreen.Position.FULL_SCREEN);
}
示例4: GUIScreenProvider
import com.googlecode.lanterna.TerminalFacade; //导入方法依赖的package包/类
public GUIScreenProvider() {
this.screen = TerminalFacade.createGUIScreen();
}
示例5: main
import com.googlecode.lanterna.TerminalFacade; //导入方法依赖的package包/类
public static void main(String[] args) {
logger.info("Condi " + VERSION + " startup");
GUIScreen screen = TerminalFacade.createGUIScreen();
if (screen == null) {
System.err.println("Couldn't allocate a terminal!");
return;
}
screen.getScreen().startScreen();
new CondiWindow(screen);
}