|
Project Information
|
GUI Creating Language (GCL) is a DSL (Domain Specific Language) for creating Graphical User Interfaces. It utilizes a simple language for creating forms with a set of widgets. Currently the GCL works with the Java Swing library. Basic assumptions of the GCL:
// Both syntaxes are valid and yields to exactly the same result JFrame frame1 = create. frame. usingOnly(person); JFrame frame2 = create. frame. using(person). containing();
JFrame frame = create.
frame.
using(person).
containing(
attribute("firstName").as("First name"),
attribute("lastName").validate(new ValidatorNotEmpty()),
attribute("higherEducation"),
method("getAge").as("Age"));
frame = create.
frame.
using(emp).
containing(
attribute("firstName").as("First name"),
attribute("lastName").validate(new ValidatorNotEmpty()),
attribute("higherEducation"),
attribute("company").as("Company").asComplex( // nested (complex) object description
attribute("name").as("Company name"),
attribute("income").as("Company income")),
method("getAge").as("Age"));A default frame showing automatically generated content for the given instance of the Company class (containing a multi-valued type - Employees): JFrame frame = create.
frame.
using(company).
containing(
attribute("name").as("Name"),
attribute("income"),
attribute("employees"));More samples could be found in the attached source code. |



