*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
package jexer.demos;
+import java.util.ResourceBundle;
+
import jexer.TApplication;
import jexer.backend.*;
+import jexer.demos.DemoApplication;
/**
* This class shows off the use of MultiBackend and MultiScreen.
*/
public class Demo6 {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(Demo6.class.getName());
+
+ // ------------------------------------------------------------------------
+ // Demo6 ------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Main entry point.
*
* one demo application spanning two physical screens.
*/
multiBackend.addBackend(swingBackend);
+ multiBackend.setListener(demoApp);
/*
* Time for the second application. This one will have a single
* window menus.
*/
TApplication monitor = new TApplication(monitorBackend);
+ monitor.addToolMenu();
monitor.addFileMenu();
monitor.addWindowMenu();
* eliminate) screen tearing/artifacts.
*/
TWindowBackend windowBackend = new TWindowBackend(demoApp,
- monitor, "Monitor Window", width + 2, height + 2);
+ monitor, i18n.getString("monitorWindow"),
+ width + 2, height + 2);
windowBackend.setDrawLock(multiScreen);
+ windowBackend.setOtherApplication(demoApp);
multiBackend.addBackend(windowBackend);
/*