Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.8 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.8 KB

Logo

Join the chat at https://gitter.im/Notelek/connect Build Status

Java-Based web interface library designed to make interfaces a snap to create. Have all the power of java, with all the simplicity of web technologies.

Easy Interface Creation

Creating an interface can be a challenging aspect of program design, and take up valuable time that could be spent working on your solution, with Connect, all you have to do is import the library, and in as little as 2 lines of code you can have your own web based interface up and running. Check out the tutorials below.

Tutorials

In two simple lines of java, you can create the base for your interface, doing away with the hassle of setting up a web server, linking imports, and referencing documentation.

WebInterface WebInterface = new WebInterface();
Layout layout = new Layout();
WebInterface.registerPage("/", layout.generateDashboard("Notelek Connect"));
PortListener server = new PortListener(80, WebInterface, true);

This example creates the basic page below: Connect Demo Page

Where more granular control is required, you can begin to use the deeper functions of connect. Below is the same layout as above, but in expanded form.

PageBuilder page = new PageBuilder();
page.addNavbar(title, new String[] {"Dashboard", "Logs", "Settings"});
page.addContent("<div style=\"font-size:32pt;text-align:center;width:500px;position:absolute;top:30%;left:50%;margin-left:-250px;\">Dashboard Demo</div>");
String pageContent = page.getPage(title);