X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemo6.java;h=41d1f2c3f323b84a4feaa583534a34c793f06344;hb=c4cefaa04ec122fc02efb6542451a31fdf722c32;hp=9f949131caf5f764f0e5c472cd56c648cb2f07ca;hpb=be72cb5ccbd42fe304c0acafc380c5636f0d03a2;p=nikiroo-utils.git diff --git a/src/jexer/demos/Demo6.java b/src/jexer/demos/Demo6.java index 9f94913..41d1f2c 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. * @@ -99,13 +111,14 @@ public class Demo6 { * Make a new Swing window for the second application. */ SwingBackend monitorBackend = new SwingBackend(width + 5, - height + 5, 16); + height + 5, 20); /* * Setup the second application, give it the basic file and * window menus. */ TApplication monitor = new TApplication(monitorBackend); + monitor.addToolMenu(); monitor.addFileMenu(); monitor.addWindowMenu(); @@ -116,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); /*