jMonkey LorisGUI

A component library for user interactions

Home Overview Visuals XML Style Model Controls Components Layouts
 

LorisGUI

The LorisGUI is a set of components used to graphically interact with the user. It is composed of panels, buttons, dropdowns, etc that the user manipulates to adjust the underlying program. Loris is built upon standard jMonkey components, configured via XML definition files, and uses a CSS-like styling mechanism to control its appearance.

This project is now BETA, operational but in need of much more testing. The documentation is on this website. Any and all comments are most appreciated. Use the SourceForge 'ticketing' system to post any comments and requests.

The .zip file contains the running test harness. Unpack the .zip and run the top level jar. You will then have the options to configure the screen and select a test to run. The "Multiple Screens" test has the most examples.

 

A few notes on the History of this code

Loris has grown out of the needs I have to support user-based setup and configuration in a jMonkey game I have been experimenting with. I initially based my GUI interactions on Nifty, which has been integrated with jMonkey. But I ran into significant coordination issues between the visual presentation and the underlying model. And I hit some basic display bugs that I could not figure out how to fix.

In searching for an alternative, I came across Lemur, which is a 'native' implementation of GUI elements built directly out of jMonkey components. But Lemur lacked the XML configuration support that is a key feature of Nifty, and it was missing a fair number of GUI constructs that I needed.

In the end, I split off the Lemur code to act as the foundation of Loris, and redeveloped it to support my XML needs. I pulled in some concepts from Nifty, and added my own extensions. If you have used Nifty, you should find the Loris XML to be somewhat familiar. If you have used Lemur, you will recognize the Loris visual design elements. But Loris is its own library with no attempt at any compatibility with Nifty or Lemur.

Many, many thanks to Paul Speed, the original author of Lemur. The approach of the layered components for the visual display is quite elegant and powerful. And the polling/versioning used to monitor Model values changes is quite beautiful in its simplicity. jMonkey and its related projects is a tribute to the power of OpenSource.

 

Code Structure

I am attempting to keep the Loris code as an independent plug-in with minimal changes needed within the jme3 core. You will find the interesting stuff in the package "net.wcomohundro.jme3.loris". Some habits die hard (well, they really do not die at all), so I work within the Eclipse IDE, using jMonkey source as provided by the latest stable jme3 SDK. As of 30May2018, that is version 3.2.1

All that being said, I do have a set of core jme3 changes posted in the Loris SVN repository. (oh, come on, you just knew that was coming) Loris uses the jMonkey Savable mechanism for its XML configuration. XML enhancements were created as part of the jMonkey CSG project, and those enhancements are needed within Loris.

Any and all source can be downloaded from SourceForge.

 

Features

  1. Standard set of common GUI controls: button/checkbox/dropdown/textentry (with more to come)
  2. Visuals provided by layered Components, providing colors/textures/text.
  3. Dynamic visual effects are determined by state (disabled, inactive, hover, focus, ... )
  4. Various DisplayAdaters that change color/alpha/texture/text according to the state.
  5. Dynamic sizing based on content/structure of the controls.
  6. Complete configuration control via XML definition files.
  7. CSS-like styling for visual appearance.
  8. Various model interactions, from simple static to dynamic polling.
 

Licensed - BSD like jMonkey

New BSD (3-clause) License. In other words, you do whatever makes you happy!

 

Download/Access the Code

jMonkeyCSG is managed via a SourceForge project which you can reference here. The .jar and .zip files can be downloaded from here. All source is available via the SourceForge repository.

 

The jMonkey IDE

As I stated earlier, I work in Eclipse, referencing the jme3 source as provided by a stable release of the jme3 SDK. I am not too familiar with the jMonkey IDE, but have gotten Loris to work by including the necessary jar file in the Libraries section of a jMonkey IDE project.