X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemo6.java;h=db0b5c9d3f53a7083d4a47a99930ebcec9058d3b;hb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;hp=c0ec4273866ced782ec961a9ac345be32071cf5d;hpb=3e0743556d1f31723a11a6019b5c2b018b4b2104;p=fanfix.git diff --git a/src/jexer/demos/Demo6.java b/src/jexer/demos/Demo6.java index c0ec427..db0b5c9 100644 --- a/src/jexer/demos/Demo6.java +++ b/src/jexer/demos/Demo6.java @@ -3,7 +3,7 @@ * * 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"), @@ -28,14 +28,26 @@ */ 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. * @@ -84,6 +96,7 @@ public class Demo6 { * one demo application spanning two physical screens. */ multiBackend.addBackend(swingBackend); + multiBackend.setListener(demoApp); /* * Time for the second application. This one will have a single @@ -105,6 +118,7 @@ public class Demo6 { * window menus. */ TApplication monitor = new TApplication(monitorBackend); + monitor.addToolMenu(); monitor.addFileMenu(); monitor.addWindowMenu(); @@ -115,8 +129,10 @@ public class Demo6 { * 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); /*