Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation / Mathematica / Add-ons & Links / J/Link / Part 2. Writing Java Programs That Use Mathematica / Overview of the Main J/Link Interfaces and Classes /

2.3.7 High-Level User Interface Classes

J/Link includes several classes that are useful for creating programs that have user interfaces. The MathCanvas and MathGraphicsJPanel classes provide an easy way to display Mathematica graphics and typeset expressions. These classes are often used from Mathematica code, as described in Section 1.2.8, but they are just as useful in Java programs. They are discussed in Section 2.10.2. The various "MathListener" classes (Section 1.2.7) can be be used from Java code to trigger evaluations in Mathematica when user interface actions occur.

New in J/Link 2.0 are the classes in the com.wolfram.jlink.ui package. These classes provide some very high-level user interface elements. There is the ConsoleWindow class, which gives you a console output window (this is the class used to implement the Mathematica function ShowJavaConsole, discussed in Section 1.2.9). The InterruptDialog class gives you an "Interrupt Evaluation" dialog similar to the one you see in the notebook front end when you choose Interrupt Evaluation from the Kernel menu. The MathSessionPane class provides an In/Out Mathematica session window complete with a full set of editing functions including cut/copy/paste/undo/redo, support for graphics, syntax coloring, and customizable font styles. The auxiliary classes SyntaxTokenizer and BracketMatcher are used by MathSessionPane but can also be used separately to provide these services in your own programs. All these classes are discussed in Section 2.17.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: