X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemoApplication.java;h=3e4cbe92d56bcde373a7c6ec1d05e2327e86c0b1;hb=e6bb1700749980e69b5e913acbfd276f129c24dc;hp=95d0a54f81d4c8e1fe9b781fcf02a07e81f32e51;hpb=0d47c5460c8e9d1198928308767a63ad35f46eb8;p=fanfix.git diff --git a/src/jexer/demos/DemoApplication.java b/src/jexer/demos/DemoApplication.java deleted file mode 100644 index 95d0a54..0000000 --- a/src/jexer/demos/DemoApplication.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Jexer - Java Text User Interface - * - * License: LGPLv3 or later - * - * This module is licensed under the GNU Lesser General Public License - * Version 3. Please see the file "COPYING" in this directory for more - * information about the GNU Lesser General Public License Version 3. - * - * Copyright (C) 2015 Kevin Lamonte - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see - * http://www.gnu.org/licenses/, or write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * - * @author Kevin Lamonte [kevin.lamonte@gmail.com] - * @version 1 - */ -package jexer.demos; - -import java.io.*; - -import jexer.*; -import jexer.menu.*; - -/** - * The demo application itself. - */ -public class DemoApplication extends TApplication { - - /** - * Add all the widgets of the demo. - */ - private void addAllWidgets() { - new DemoMainWindow(this); - - // Add the menus - addFileMenu(); - addEditMenu(); - - TMenu demoMenu = addMenu("&Demo"); - TMenuItem item = demoMenu.addItem(2000, "&Checkable"); - item.setCheckable(true); - item = demoMenu.addItem(2001, "Disabled"); - item.setEnabled(false); - item = demoMenu.addItem(2002, "&Normal"); - TSubMenu subMenu = demoMenu.addSubMenu("Sub-&Menu"); - item = demoMenu.addItem(2010, "N&ormal A&&D"); - - item = subMenu.addItem(2000, "&Checkable (sub)"); - item.setCheckable(true); - item = subMenu.addItem(2001, "Disabled (sub)"); - item.setEnabled(false); - item = subMenu.addItem(2002, "&Normal (sub)"); - - subMenu = subMenu.addSubMenu("Sub-&Menu"); - item = subMenu.addItem(2000, "&Checkable (sub)"); - item.setCheckable(true); - item = subMenu.addItem(2001, "Disabled (sub)"); - item.setEnabled(false); - item = subMenu.addItem(2002, "&Normal (sub)"); - - addWindowMenu(); - } - - /** - * Public constructor. - * - * @param input an InputStream connected to the remote user, or null for - * System.in. If System.in is used, then on non-Windows systems it will - * be put in raw mode; shutdown() will (blindly!) put System.in in cooked - * mode. input is always converted to a Reader with UTF-8 encoding. - * @param output an OutputStream connected to the remote user, or null - * for System.out. output is always converted to a Writer with UTF-8 - * encoding. - * @throws UnsupportedEncodingException if an exception is thrown when - * creating the InputStreamReader - */ - public DemoApplication(final InputStream input, - final OutputStream output) throws UnsupportedEncodingException { - super(input, output); - addAllWidgets(); - } - - /** - * Public constructor. - * - * @param backendType one of the TApplication.BackendType values - * @throws Exception if TApplication can't instantiate the Backend. - */ - public DemoApplication(BackendType backendType) throws Exception { - super(backendType); - addAllWidgets(); - } -}