!JMCS (Java Mariotti Common Software) is a collection of APIs and jar files shared by all JMMC Java GUI applications (SearchCal, [[JmmcModelFitting][ModelFitting]], ...). Its goal is to centralize all shared functionalities (e.g menubar handling, about box window, ...) in order to provide our final users with more consistent, feature-reach, desktop-class applications across all 3 main execution platforms that are Linux, Mac OS X and Windows. Its [[http://mariotti.ujf-grenoble.fr/MCS/DEVELOPMENT/doc/jmcs/index.html][DOXYGEN documentation]] is also available for implementation details. This page lists and describes each !JMCS main functionalities: %TOC% ---++ App : the main class from which !JMCS-based applications all derive This class aim is to handle applications life cycle, normalized in 3 steps : intialization, execution and destruction. For your application to benefit from !JMCS, your main class shall derive from the App class, and thus implement each of its abstract methods : =init()= and =execute()= : * Your =init()= method shall contain all your application initialization code, like specific command-line option parsing, MVC objects allocation and initialization, GUI setup, ... * Your =exec()= method shall contain no code at all in fact, as long as your application GUI fully implement the reflex approach (e.g Observer/Observable and MVC patterns, ...) and has already been initialized in =init()=. * Furthermore, you can also provide your own =finnish()= [[http://mariotti.ujf-grenoble.fr/MCS/DEVELOPMENT/doc/jmcs/api/html/classfr_1_1jmmc_1_1mcs_1_1gui_1_1App.html#60c4fae561f0b99609a287a9f77972de][method]] to appropriately handle your application life cycle end. When instantiated at execution in your main() method, your App-derived class will automatically bring your application to life by: 1 Initializing App internal mecanisms (!ApplicationData.xml file parsing, shared logger setup, command line option parsing, shared functionalities setup) when calling =super(...)=. 1 Displaying a Splash screen (for at least 2 seconds), in order to let the end user know which application is about to start. 1 Calling your =init()= method to fully setup your application GUI. 1 Discarding the Splash screen, in order to let your GUI as the frontmost window. 1 Calling your =exec()= method at last. Here is a minimal !JMCS-compliant application template <verbatim> import fr.jmmc.mcs.gui.*; public class Main extends App { public Main(String[] args) { super(args); } protected void init(String[] args) { // Add your application initialization code here... } protected void execute() { // Add your application execution code here... } public static void main(String[] args) { new Main(args); } } </verbatim> ---++ Application data : how they are stored and used ---++ Splash screen : the window automatically shown while applications launch ---++ About box : the window giving application detailled information to end user ---++ Menu bar : default handled menu items and how to provide application specific ones ---++ Preferences : standardized preference file location and version handling ---++ Help : how to harness the shared LATEX-based help browser ---++ Feedback report : how bug and user remarks are routed bak to the JMMC team ---++ Logging facilities : how you should handle execution traces in your application Here is the code you should add to each of your classes to use [[http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/Logger.html][standard java logging facilities]]. <verbatim> import java.util.logging.*; public class Complex { /** Logger */ private static final Logger _logger = Logger.getLogger(Complex.class.getName()); ... } </verbatim> ---++ Relase notes : how they are automatically generated ---++ Acknowledgement : how to provide a specific one for each application ---++ Application website : where are applications main webpage and FAQ ---++ Shared libraries : list of available third party toolkits -- Main.SylvainLafrasse - 30 Oct 2008
This topic: Jmmc/Software
>
WebHome
>
JMCS
Topic revision: r1 - 2008-10-30 - SylvainLafrasse
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback