
![]() |
MathBeans 2.0 | What's
new!
MathBeans 2.0 demo included in the Partners CD shipped with IBM's Visual Age® for Java 3.0. |
| MathBeans - a unique set of math aware Java beans, the first in the industry. | ||
| The MathBeans package consists of Java GUI components with embedded mathematical engine. The components are packaged as Java beans and can be added to any IDE that supports beans (e.g. IBM Visual Age for Java, Symantec Visual Cafe, Borland JBuilder, Sun Java Workshop, etc.) . |
| What are MathBeans |
Who are MathBeans for |
|
| MathBeans establish a new paradigm for mathematical components used within any Java applet or application. Looking as usual GUI components, the MathBeans possess smart mathematical abilities. | MathBeans are for any developer who wants to give the user of his Java application or applet the ability to compute something, to do some analysis. Instead of writing low level code, you just provide a set of formulas and MathBeans figure everything out for you. |
What is new in this releaseThe ability to treat several formulas at a time. Plus a set of custom components with modern look and feel in addition to AWT ones. Take a look at some examples of such components. Named fieldNamedField is essentially a combination of a label and a text field. In 99% of the cases when you would want to use a text field, you would use a label with it to indicate the name for the value in the field. Therefore it is natural to combine Name and Value. The resulting combination (with some additional general and mathematical capabilities) is the NamedField. Here are some of its features. |
| Math awareness | By default the NamedField is math aware, i.e. it performs operations according to a formula entered by the user (like (187.21+248.97)*1.0825) when he presses Enter. | |
| Input prompt | If the value field is empty it displays a prompt like "Enter value here". The prompt string can be set dynamically. | |
| Error message | If the field is math aware and the user presses Enter to compute an uncomputable expression (like (1 + a)), it either displays for 5 seconds a blinking error message if the value field does not have the focus or underscores the expression with a zigzag line otherwise. The error message like "Can't compute this!" can be set dynamically. |
| Rounding | By setting the number of decimal places to be displayed after the decimal dot, the programmer controls the format of the number output. | |
| Format | The user can control the general appearance of the NamedField by setting fonts and alignments for the name label and the value field. | |
| Translators | The NamedField may be assigned a translator to translate the field's text into a numerical value and a back translator to translate a numerical value into the field's text. This feature may be used with date and time fields, percentages, boolean values, etc | |
| Separator | By default the NamedField has a separator between the label and the field. This separator is adjustable. Simply drag it with the mouse to wherever you like. The label text and the field text adjust accordingly. | |
| Several Named Fields can be joined together to form a NamedFieldPanel. Each field may have its own color or colors may be alternating or they may be all the same. The NamedFieldPanel may have a title which is a read-only Named Field. Separators of the fields are connected, so that if one drags the separator, all the fields get adjusted. Of course, the fields are math aware. |
Calc Set, Calc Solve Set and Calc Graph SetA Calc Set is a mini-calculator, i.e. a set of two Named Field Panels representing respectively the input variables and the results of a set of formulas. The only thing necessary to create such a calculator is the string representing the formulas. All the rest is figured out by the bean itself. For instance, the Calc Set presented here is generated using the morgage formula. |
The only code needed
is this: import com.numobjects.mathbeans.*; |
| A Calc Solve Set is a solver (goal seeker) component that will automatically solve the equations defined by the input formulas with respect to any independent variable and any output value as a target. |
The only code needed
is this:import com.numobjects.mathbeans.*; |
|
| Similarly, the Calc Graph Set let you plot the dependencies of all output values vs each independent variable given only the formulas as input. |
|
The graph can be detached and
viewed in a separate frame so that it can be resized arbitrarily. The
graph can also be printed (printing is not likely to work when used in
an applet). Calc WindowA Calc Window is a window that combines a Calc Set, a Calc Solve Set and a Calc Graph Set, all in one. Again, the only input is the formula itself. All the components can change their appearance dynamically when a new set of formulas is provided. AWT componentsThe AWT components like CalcField, CalcPanel and CalcGraphPanel are available since version 1.0. In the current release they have been improved to treat multiple formulas. Supported formulasThe MathBeans support a wide set of formulas involving arithmetical and logical operations, elementary and special functions, integration, equation solving, optimization (extremum search), etc. You can browse the list of functions here. MathBeans API documentation is available online. You can find it here.
|
| ©2000 Numerical Objects |