Adding swt and socket frontends

This commit is contained in:
2016-05-24 14:55:45 -04:00
parent 6f21c4fe0d
commit 87a668d308
15 changed files with 1320 additions and 18 deletions

View File

@@ -0,0 +1,102 @@
/*
* Copyright E. Bigeon (2015)
*
* emmanuel@bigeon.fr
*
* This software is a computer program whose purpose is to
* provide a swt window for console applications.
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*/
package fr.bigeon.gclc.swt;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
@SuppressWarnings("static-method")
public void testApp()
{
// Display display = new Display();
// final Shell shell = new Shell(display);
// shell.setLayout(new GridLayout(1, false));
// SWTConsole swtConsole = new SWTConsole(shell, SWT.NONE);
// swtConsole.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true,
// 1, 1));
// final ConsoleApplication appl = new ConsoleApplication(swtConsole,
// "exit",
// "Hello", "See you");
// shell.pack();
// shell.open();
// Thread applThread = new Thread(new Runnable() {
//
// @Override
// public void run() {
// appl.start();
// Display.getDefault().syncExec(new Runnable() {
// @Override
// public void run() {
// shell.dispose();
// }
// });
// }
// });
// applThread.start();
// while (!shell.isDisposed()) {
// if (!display.readAndDispatch()) display.sleep();
// }
// display.dispose();
assertTrue( true );
}
}