Controls 4 Java
Controls.js is fully integrated with DukeScript – a technology for creating cross-platform mobile, desktop, and web applications in Java. DukeScript applications are plain Java applications that internally use HTML5 technologies and JavaScript for UI rendering. That is where Controls.js can help. Just write an application in Java, design the application user interface in Controls.js Form Editor and run your application on iOS, Android or in a standard web browser.
Thanks to Controls.js you, a Java developer, don't need to take the trouble to use web technologies such as HTML, CSS or JavaScript.
How It Works
Connection between the GUI and Java is done by using Model-View-ViewModel design pattern. The model is defined in Java by Java annotations while the user interface is designed in Controls.js Form Editor. ViewModel defined in Java is then connected with the GUI via two-way bindings.
AppCntrl.java (ViewModel - business logic)
@Model(className = "AppModel", targetId="", properties = { @Property(name = "FirstName", type = String.class) }) public class AppCntrl { static AppModel model = null; public static void onPageLoad() throws Exception { model = new AppModel(); model.setFirstName("John"); model.applyBindings(); } }
AppCntrl.ng (GUI - Controls.js declarative UI)
{ Edit1: { Type: 'weEdit', L:20, T: 20, W: 150, DataBind: ng_Bindings({ Value: 'FirstName' }) }, }
Getting Started
How to create a new Controls 4 Java project
Licensing
The code, publicly available through Maven archetypes, is licensed under the GPLv3 for open source applications. If you need the commercial license or OEM license, feel free to contact us by e-mail: .