X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemoMainWindow.java;h=5d74d7df94ae7198d83760572edb358c32201eb3;hb=e16dda65585466c8987bd1efd718431450a96605;hp=9a834645c5aa6c6176453fc6838dc452ec2b7d6f;hpb=0d47c5460c8e9d1198928308767a63ad35f46eb8;p=nikiroo-utils.git diff --git a/src/jexer/demos/DemoMainWindow.java b/src/jexer/demos/DemoMainWindow.java index 9a83464..5d74d7d 100644 --- a/src/jexer/demos/DemoMainWindow.java +++ b/src/jexer/demos/DemoMainWindow.java @@ -1,29 +1,27 @@ /* * Jexer - Java Text User Interface * - * License: LGPLv3 or later + * The MIT License (MIT) * - * 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) 2016 Kevin Lamonte * - * Copyright (C) 2015 Kevin Lamonte + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * - * 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. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * - * 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 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * @author Kevin Lamonte [kevin.lamonte@gmail.com] * @version 1 @@ -77,7 +75,7 @@ public class DemoMainWindow extends TWindow { private DemoMainWindow(final TApplication parent, final int flags) { // Construct a demo window. X and Y don't matter because it will be // centered on screen. - super(parent, "Demo Window", 0, 0, 60, 23, flags); + super(parent, "Demo Window", 0, 0, 60, 24, flags); int row = 1; @@ -113,7 +111,7 @@ public class DemoMainWindow extends TWindow { addPasswordField(35, row++, 15, false); addLabel("Fixed-width password:", 1, row); addPasswordField(35, row++, 15, true, "hunter2"); - row += 2; + row += 1; if (!isModal()) { addLabel("Radio buttons and checkboxes", 1, row); @@ -179,6 +177,18 @@ public class DemoMainWindow extends TWindow { } row += 2; + if (!isModal()) { + addLabel("Color editor", 1, row); + addButton("Co&lors", 35, row, + new TAction() { + public void DO() { + new TEditColorThemeWindow(getApplication()); + } + } + ); + } + row += 2; + progressBar = addProgressBar(1, row, 22, 0); row++; timerLabel = addLabel("Timer", 1, row);