Skip to content

Proto4j/proto4j-swing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proto4j-Swing

This project contains a new way of creating GUIs with Java-Swing. Masks are generated by processing placed annotations. By now, every component has to be declared in the class where the target component is defined. This framework can be modified with extensions and better implementations of the Entry class.

A general instruction on how to use this framework and how extensions can be created and implemented is provided here »

Example usage

This framework is built to be user-friendly when working with generated GUI instances. It is recommended to access the declared fields over a FieldReference object, because this class is thread-safe.

The way of generating a GUI instance is very simple:

Entry<MyGUI> entry = Entry.of(MyGUI.class);
// or with constructor arguments
Entry<MyGUI> entry = Entry.of(MyGui.class, "argument1", "argument2");

The GUI instance is wrapped into the Entry object, because it provides some utility methods and general information that were collected during the generation process. If nested GUIs are found and generated, they can be queried by providing the field's name:

Entry<MyGUI> entry = Entry.of(MyGUI.class);
// this method is not type safe, it s recommended to use Entry<?> instead.
Entry<MyNestedGUI> nestedEntry = entry.getNestedGUI("fieldName", MyNestedGUI.class);

Download

Download the latest JAR file from the releases tab. This framework requires a minimum of Java 8+ for developing and running.

License

MIT License

Copyright (c) 2022 Proto4j

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

A module for generating Java-Swing applications just from placing annotations on their components.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages