/* * @(#)SimpleFunctionBuilderWithIO.java 2.5.0 2 September 2006 * * Copyright 2006 * College of Computer and Information Science * Northeastern University * Boston, MA 02115 * * The Java Power Tools software may be used for educational * purposes as long as this copyright notice is retained intact * at the top of all source files. * * To discuss possible commercial use of this software, * contact Richard Rasala at Northeastern University, * College of Computer and Information Science, * 617-373-2462 or rasala@ccs.neu.edu. * * The Java Power Tools software has been designed and built * in collaboration with Viera Proulx and Jeff Raab. * * Should this software be modified, the words "Modified from * Original" must be included as a comment below this notice. * * All publication rights are retained. This software or its * documentation may not be published in any media either * in whole or in part without explicit permission. * * This software was created with support from Northeastern * University and from NSF grant DUE-9950829. */ package edu.neu.ccs.gui; /** *
Class SimpleFunctionBuilderWithIO
* builds a panel that combines
* a SimpleFunctionPaneWithIO with
* an ExpressionEvaluationPane so
* that a user can both interactively define
* simple functions and then test them in an
* evaluation scenario immediately.
This panel may be used by applications * that work with functions and wish to permit * users to define such functions on the fly.
* * @author Richard Rasala * @version 2.5.0 */ public class SimpleFunctionBuilderWithIO extends DisplayPanel { /** The gap between the two panes in this panel. */ protected int gap = 12; /** The simple function definition pane. */ protected DisplayPanel defPane = new SimpleFunctionPaneWithIO(); /** The expression-evaluation pane. */ protected DisplayPanel expPane = new ExpressionEvaluationPane(); /** The array with the two panes. */ protected Object[] vStuff = { defPane, expPane }; /** The table with the two panes. */ protected VTable vTable = new VTable(vStuff, gap, gap, CENTER); /** * The constructor for a simple function builder panel. */ public SimpleFunctionBuilderWithIO() { add(vTable); } /** *The main method launches * a simple function builder panel * in its own GUI frame.
* *Use the call:
* *SimpleFunctionBuilderWithIO.main(null)* * @param args ignored and may be
null
*/
public static void main(String[] args) {
new SimpleFunctionBuilderWithIO().
frame("Simple Function Builder With IO");
}
}