The JEasy Runtime Library
The JEasy Repository stores all GUI components and its properties in an xml file.
To get your program work with it, you need the JEasy Library jeasy.jar.
The jeasy.jar contains classes with a correspondance to a Swing component.
As an example for the JPanel in Swing there is a JEPanel in JEasy. The JEPanel gets its
properties out of an xml, implements some enhancements (GradientPaint, TexturePaint, ...), and builds its children
using the defined LayoutManager. The id of this JEPanel is stored together with the JEPanel object in a Hashmap,
from where the programmer may get it by (JEPanel)JEUtil.getJO(myPanel).
Every JEasy object is build out of one or more Swing objects. They all are referenced to the jeasy object and the
programmer may get it. So, you have full control and acces to all jeasy and Swing objects.
For everey GUI component all of the necessary event handler are registered inside jeasy. All events are given forward
to the programm including the jeasy id.
The Object Hierarchy
With JEasy 3.0 a new object hierarchy was established.

All object extends JEObject. Components are separated by one who may have children (JEParentComponent) and
otherones (JEComponent).
A JEasy component allways contains a label propertie. JEasy use is to build a JLabel out of it and places it in front
of the Swing component.
You may define application specific rules, constraints, colors and fonts in the global object.
If there is no other entry defined as a JEasy component property, these default values are set.
Special JEasy Objects
Some objects are not part of Swing but useful amd necessary for a comfortable programming model:
JEDataType
JEDatafields are used for user input. They have a refence to a JEDataType. this object defines
whether the input can be num or char, how the field is formatted if the field is lost
or what is the minimal and maximal values.
New in JEasy 3.0 is to define a regular expression for validiating data.
JEMessage
A JEMessage allways references panels or fields. Its method getMessage() serializes
all values of fields, checkboxes, tables or comboboxes into in xml structure.
The method putMessage(String xml) fills all data out of xml into the form.
JEMethodinvocation
Somtimes it is required to to something at the client what is defined by the business rules at the server.
For instance you called a web service and it returns with an error message. To prepare these message
and show them at the client can be done by a methodinvocation. The method and its parameter
are send as an xml string to the client where it is interpreted.
/*
* Ths callBack is called by the server,
* when a asynchron http-call is used.
*/
public void callBackInvoke(String xml) {
...
JEUtil.XMLMethodInvocation(this, xml);
...
}
The method JEUtil.XMLMethodInvocation(this, xmi) interprets the xml string an call the
mehod described in xml.
JEGlobal
Parameters like fonts. constraints, colors or format, used by nearly every component are defined
once in the JEGlobal object. When a component needs to hav a propertie but it is notz defined,
the global parameters are used.
|