Introducing JavaStates - a new API for state based GUI development in Swing

JavaStates partially implements the semantics of D Harel' statecharts.
It is currently hosted as source forge project:
[https://sourceforge.net/projects/javastates/]
, and has been used for several years for teaching Java Swing and the specification of man machine interfaces at ESIL
[http://www.esil.univmed.fr]
[http://laurent.henocque.com]
The project provides several demos, including a full fledged swing text editor, and is stable.
Details can be found here too:
[http://javastates.posterous.com/]
I'd be very happy to interact with both experts and users.
I claim that Javastates tremendously improve the quality and speed of GUI development.
Do you agree?
Edited by: lhenocque on Mar 4, 2010 4:18 AM

Thanks for the good practise hint, and many more thanks for your interest.
I haven't tried anything but don't you get an explosion of states?
explosion of states is controlled by concurrent regions. Two states in two concurrent regions can be active at the same time.
There can be no 'explosion' anyway since the states are programmer declared. The list is finite, and under control.
For example the program I'm working on has a table and actions are enabled based on:
-no selection/single selection/multi selection
-top/bottom row selected (move up/down action)
-user read/write permission
-properties of the object of the selected row
The situation you describe is handled by (at least) four concurrent regions.
The typical error is usually forgetting a particular one which result in action being enabled/disabled when the shouldn't. Currently solving that by having a callback method which enables all the action correctly and gets called whenever there is a selection/security/etc update.
Javastates cares for both setting the properties of the states (including the callbacks to fire) and for the cleanup. Using this allows for defect free interfaces in the sense that nothing can be left over.
Using Javastates helps you to separate your logic in the same way as object programming with virtual functions does. You should end up replacing a code with many if/thens by separate listeners, dynamically set by callbacks.
Also fluent interface method chaining is nice until it becomes a flood in my opinion - similar to how GroupLayout is better handled by Matisse GUI builder than by hand, JavaStates might benefit more from a graphical tool.
You are right. Both apis exist. The fluent api is provided for simplicity, since it prevents from declaring useless local variables.
Also for a GUI builder. I created the foundation of Javastates for an interpreted language called WIZ in the IDE Openside around 1990 (that was in C).
Then later I implemented a subset of the current Java features in C++, that were interfaced in the GUI Builder called ILOG Views.
So yes I agree a GUI can help, but anyway the Java code resulting from using states is mare more concise and structured than it would otherwise.

Similar Messages

  • Help Neede: New API for KM

    Dear All,
    I have found that com.porta.security.IUser class is deprecated in new release and it is giving error.
    I have to get <b>ResourceContext(IUser)</b> object to access KM. What is the new way to access KM docments using new API?
    Please provide some sample code if possible.
    Kind regards,
    Sreejesh.

    Hi,
    With "deprecated" you mean this class
    om.sapportals.portal.security.usermanagement.IUser
    What do you mean with "giving error"?
    As to my knowledge you currently have to live with the deprecated IUser class for using the KM API. The current
    com.sap.security.api.IUser
    will not work.
    Kind regards,
    Dominik Witte

  • Any API for XML-based JAAS Provider management

    Hi, All:
    I am working on creating a realm based on jazn-data.xml, it is a XML-based JAAS provider. the jazn.jar shell seems to provide utilities to manage a realm. I am just wondering if there is any API available for XML-based JAAS Provider management.
    The package com.evermind.security oracle.security.jazn oracle.security.jazn.realm seems to be the proper API. However, accoring to the API doc, it seems that the API can not directly work for jazn-data.xml, any body have sugguestions?
    I'd really appreciate your help.

    Hi,
    you should look towards jGuard (www.jguard.net) which enables easy JAAS integration into j2ee webapps across many applications servers(including OC4J, tomcat, jetty, jonas, jboss ...).
    it adds many features including a taglib, some convenient loginmodules(CRL, OCSP, JNDI), and so on....
    cheers,
    Charles(jGuard team).

  • Does 10g have a API for grid based development ?

    Hi,
    Does 10g provide any API for developers to interface with the GRID job submission,resource management services? There is a GRID DK for 9i that provides a way to interface GLOBUS with oracle job schedulers etc. wanted to know whether there is such an API for 10g also ( or is it compatible)? . Also does it only allow globus based interfacing?
    thanks in advance.

    Hi,
    I looked at the view v$option but there was not record fro grid related entry.But I selected enterprise option when I installed 10g.But I didnt install the enterprise manager /management agent software which is bundeled separately. Do I have to install those also inoder to get he grid development kit installed.? please advice. (Also when I installed 10g , since there was no management agent found, I selected the "database control for database management" under database management processes screen in OUI.Is it a issue?
    thanks in advance!

  • Purchasing a new PC for Adobe/Flash/Photoshop development. Suggestions?

    Hi,
    I'm new here and I'm getting ready to start some heavy Photoshop/Flash/Flex development. My current PC is is pretty slow for any sort of flash/photoshop work, but it's been so long since I've bought a new system that I'm not really sure what is available/the norm for this sort of use.
    I'm looking to spend 300-500 for just the tower; I don't need the OS (already have the OS install discs) and I don't need a monitor/mouse/keyboard. Any suggestions on a system/minimum specs for a system?
    Thanks

    The HP dv7tqe has the ability for 2 HDD and has the new Sandy Bridge 2630QM i7, but the downfall is no USB 3.0, not a huge problem till I want something that uses it,
    Which would be? Unless you plan to use an external disk as your primary working drive this is a non-issue and I'm sure you could by a PC Card USB3 exteneder, if ever needed. Following your logic, nobody should buy a notebook before 2012, just because until then Apple have exclusive rights to Thunderbolt, which of course is utter nonsense. Would an average user ever even exploit this theoretical bandwidth? Same for your USB 3. So in fairness, buy what you need now, not what you may need next year...
    and it has the Radeon HD 6570 with 1 gig of DDR5 ram.  This video card isn't that good, but I was wondering if it was good enough to use with Photoshop and illustrator.
    *LOL* You know, 10 years ago people would have killed for it. You have a completely wrong impression of how much PS uses OpenGL features. that card wil ldo just fine, as long as its driver and configuration are compatible with PS.
    Mylenium

  • Design Pattern for Role-based GUI

    Hi,
    I'm looking for a java design pattern to provide different GUI according to the user role.
    For example, If logon user has general user role, the GUI would disable some administrator related menu items...
    I think, this kind of functionality is now in use at many applications..
    Thanks in advance..
    Habin

    Hi
    I try to explain with some more detail (sorry for my bad english) :
    I write a complete hotel reservation app with Java+Bd (relational). This app is used by diferent users types.
    The administrator has all privileges (can do every action) and other users can do only some actions (make a reservation, check-in, check-out etc but not modify a
    room price for example).
    The app is a MDI app, there are a menu and menuitems
    and when a user do an actionEvent over a menuItem an InternalFrame is activated and so on. These InternalFrame make possible some actions at app level (ex. : do a check-in).
    The menuItems set is controled by the App (is the Controller in MVC design pattern) and the model is represented by a set of user possible actions; so there are a class (UserConfig) with these set of possible actions.
    the Controller ask UserConfig abouth the posible action
    set and do the enable/disable job. There are a 1 to 1
    relationship : each possible actions has a menuItem. And
    there are a M to N relationship from User/Action perspective.
    With this design (I think is an MVC design) the Controler mantain a UserConfig (via a Relational Database) and the Administrator (via the App) can create or modify the UserConfig objects.
    At implementation level, each menu item has a name, and
    for each registered user there are the name/id_user pair
    of actions. These info (stored in BD) is used to create
    the UserConfig objects (via username/password).
    Bye

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • NetBeans or Eclipse: Which is better for GUI development ?

    I am relatively new with JAVA, came from embedded software domain mostly in C.
    My interest is to learn and develop the GUI applications using Swing.
    I am currently in a process of evaluating the IDEs, Eclipse and NetBeans on Linux desktop environment (SuSE 10.3).
    My primary findings found that, NetBeans is better equipped with GUI development while Eclipse needs to have a plugin installed.
    For GUI development, I found that few of my fellow Java developer friends have mixed feelings about these two wonderful IDEs, in summary here are the comments:
    1) Developing GUI is better without any assistance from built in designers of IDEs (e.g. NetBeans or Visual Swing of Eclipse). Because, they put extra 'garbage" codes which are very much IDE specific.
    2) GUI development in NetBeans is faster and more productive than Eclipse
    3) Visual Swing for Eclipse is not a matured product and it is far inferior than NetBeans' capabaility
    Now I ask a question, what is the best practice to adopt for starting the GUI development ? NetBeans or Eclispse or IDE-less development ?
    Thanks.

    atomodachi wrote:
    Now I ask a question, what is the best practice to adopt for starting the GUI development ?
    NetBeansThis is my preference for IDE's. Please note that as I stated that is my preference. There isn't any best, some are clearly better than others for one reason or another, but once again, that boils down to personal preference.
    EclispseNot my preference.
    IDE-less development ?IMO: that is just silly. Unless you just enjoy tons of typing; why would you ever embark on doing something without a tool to speed up the process. Now that is not to say that in using your IDE you should start out by just dragging and dropping up a storm and merrily running down the road in ignorance until you hit a rough spot and have things dramatically pointed out that you've really not a clue about what is happening. Use the IDE, but learn how to do the manual processes along with it. That means that sometimes you'll not drag and drop to build your GUI, you'll actually code the entire thing. And you really should learn to do things command-line like compile. Do yourself a really big favor too, learn the debugger. The integrated debuggers is, perhaps, one of the best inventions in productivity tools that has as of yet been invented for developers.
    In any case, have fun... choose what you like, it really does come down to personal preference. I've worked in several shops over the years and most have come to the conclusion that if you can get the work done, and have projects that others can use, then to each their own preferences. The discussion rages on for and against each of the systems that you have mention--each have valid arguments--it boils down to what do you want and like.

  • API for a RMI based application

    Hi,
    We have a RMI based application wherein the business layer runs on the server and there is a Swing based client which connects to it.
    Requirement:
    To provide an API for the business layer so that any client application can connect to it.
    Approaches:
    1. Usage of CORBA
    Use CORBA layer in place of RMI between the server and client; this shall ensure that any client application can connect to server.
    2. Keeping the constraint that the API shall support only Java clients
    Keep the RMI layer as it is; add a constraint that the API shall only support Java application
    Is there any other approach that you feel can be used? Please guide.
    Thanks in advance
    -Jay

    sabre150 wrote:
    masijade. wrote:
    I'm thinking more in the terms of his
    any client applicationpart of his "requirement".
    What does that mean? Does that truely mean any client? If so, RMI, AFAIK, isn't an option. CORBA would be better, even more generic would be an XML (SOAP type stuff) based Web Service.I have an FTP client. Does he want that to be able to talk to his server? I can't think that he could possibly mean thatWho knows with some of these people these days. ;-) It's of course, not possible, but they probably assume a "within reason" clause, not that that also doesn't vary widely from person to person, but CORBA still provides a wide base beyond Java apps and an XML base even wider (although less effeciently, normally).
    so I surmise that he just wants his Swing client to be able to be run remotely talking to his server regardless of firewalls and other constraints. In which case he probably just needs RMI-over-HTTP(S).Probably, and that is then, of course, the best solution.
    Given the original post content and the fact that this is posted in the 'New To Java' forum I really do think I am missing something.Who knows, the "requirement" is more than a bit vague. ;-)

  • New MacAir error states "your Mac OSX startup disk has no more space available for application memory"  All I have added is MS Office

    My new Mac Air states that my " Mac OSX startup disk has no more space available for application memory" and wants to force quit Safari.  I have only added MS Office to the computer and Carbonite.  Any suggestions?

    Select the icon of your startup volume ("Macintosh HD," unless you renamed it) in the Finder and open the Info window. What value is shown for Available (space)?

  • I have registered a credit card for purchasing apps from the app store. My bank has issued a new chip based card and now the 16 digit numbers have changed. How do I register the new card for flowless purchases?

    I have registered a credit card for purchasing apps from the app store. My bank has issued a new chip based card and now the 16 digit numbers have changed. How do I register the new card for flowless purchases?

    Go to Apple Menu > App Store > View my account > sign in and then edit the payment details with the new card details.  
    I am assuming that your card and supporting bank are in the same country as your residential (billing) address and that you are using the App Store of that country.

  • Create new tag for selected text using API?

    Hello,
    I want to add new tag for the selected text just like 'Create Tag from selection' .
    is it possible to create tag for selected text using acrobat api?
         please,help me.

    As per sample of snippetRunner for adding tag for selected text.
    I tried below code
    PDPage pg;
    AVDoc avDoc = AVAppGetActiveDoc();
    PDDoc pd = AVDocGetPDDoc(avDoc);
        pg = PDDocAcquirePage(pd, 0);
    ASAtom theSelectionType = AVDocGetSelectionType(avDoc);
    if (theSelectionType == ASAtomFromString("Text")){
        PDTextSelect ts = static_cast<PDTextSelect>(AVDocGetSelection(avDoc));
        PDSTreeRoot pdsTreeRoot;
        CosObj pageObj = PDPageGetCosObj (pg);
        PDSElement newElem;
        PDSElementCreate(pd, &newElem);
        char buf1[64];
        strcpy (buf1, "A new structure element");
        // set its type as "Document" standard type
        PDSElementSetType(newElem, ASAtomFromString ("Document"));
        // set its title
        PDSElementSetTitle(newElem, reinterpret_cast<const ASUns8*> (buf1), strlen(buf1));
        PDSTreeRootInsertKid (pdsTreeRoot, aElem, kPDSAfterLast);
        PDSElementInsertMCAsKid // here something i have to add
    If i have PDTextSelect how i can add tag for selected text.like user add tag using "CreateTagForSelectedText" option.
    please,help me.
    thanks.

  • How do I create a new Folder for each test report based on Serial number?

    I want to be able to create a new folder for each test report based on serial number. Each time a UUT is tested, I want the report to go to the appropriate folder. What is the best way to do this?
    Thanks

    Hello Tman,
    This is a slightly tricky question. The reason being, the report options like the report path etc, are set before you see the serial number prompt when you run your UUT. There might be other ways of getting around this, but a quick solution would be modifying the process model.
    I modified the PreUUT callback to set the report options. I passed the reportOptions as a parameter to this sequence. In the PreUUT sequence, I set the following fields:
    Parameters.ReportOptions.GeneratePath=False
    Parameters.ReportOptions.ReportFilePath= "c:\\"+ Locals.SerialNumber +"\\report.xml"
    I hope this would give you an idea.
    SijinK

  • Java API for images retriveal, Create and update in New Java API for SP05 ?

    Hello Everyone,
        Does any one know Which Java API Can be used to Display an Image in main table & API to add an image to Image table and link to Main Table in new release of Java API for MDM SP05.
    Really Appreciate all help.
    Thanks
    Vinita

    Hello Everyone,
        Does any one know Which Java API Can be used to Display an Image in main table & API to add an image to Image table and link to Main Table in new release of Java API for MDM SP05.
    Really Appreciate all help.
    Thanks
    Vinita

  • Schedules for certifications based on new SAP product versions?

    Are there any schedules available that show when SAP certifications and related curriculum will be updated to newer product versions?
    I also have a current requirement from an end user to find certifications and classes based on Crystal Reports 2013.  Everything I can find is based on the older version 2011.  Is there any schedule for availability based on the newer version?
    Regards,
    Derek Ewell

    Hi Derek,
    I am afraid I could not find any such handy information.
    I would always refer to
    https://training.sap.com
    for any updates and the latest certification / curriculum details.
    Hope this helps.
    Kind Regards,
    Ravi

Maybe you are looking for