Skip to content

Latest commit

 

History

History
476 lines (455 loc) · 14.8 KB

README.md

File metadata and controls

476 lines (455 loc) · 14.8 KB

GazeUI for Spring Boot

GazeUI lets you create front-end web applications using your server-side language of choice! No HTML, no CSS, no client-side JavaScript. This is the module that will allow you to plug GazeUI into your Spring Boot project.

Getting Started

  1. Add the GazeUI library to your project classpath;

  2. Enable GazeUI on your project adding the @EnableGazeUI annotation:

    @SpringBootApplication
    @EnableGazeUI(mainWindowClass = MainWindow.class)
    public class MySpringBootApp {
        
        public static void main(String[] args) {
            SpringApplication.run(MySpringBootApp.class, args);
        }
    }
  3. Create your application main window, with some controls and responses to user actions:

    public class MainWindow extends Window {
        private Button buttonSayHello;
        private Label labelHelloWorld;
        
        public MainWindow() {
            this.buttonSayHello = new Button("Say Hello");
            this.buttonSayHello.addOnClickHandler(this::buttonSayHello_OnClick);
            
            this.labelHelloWorld = new Label();
            
            this.getControls().add(this.buttonSayHello);
            this.getControls().add(this.labelHelloWorld);
        }
        
        private void buttonSayHello_OnClick(EventArgs e) {
            this.labelHelloWorld.setText("Hello World!");
        }
    }
  4. Voilà! Here is what you get:

    alt text

Future Plan

  • Great look and feel themes
  • More controls (TextBox, MaskedTextBox, CheckBox, ListBox, DateTimePicker, GridView, Dialog, Menu, etc.)
  • GazeUI IDE

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.

Browser Compatibility Matrix[1]

Feature Desktop Mobile Global Usage
IE Edge Firefox Chrome Safari Opera iOS (Safari) Android (WebView) Opera Mobile Android (Chrome) Android (Firefox) Android (Samsung Internet)
defer 10 12 31 8 5 15 5 3 46 78 68 4 97.39%
async - 15 52 55 10.1[2] 42 10.3[2] 76 46 78 68 6.2 91.76%
await - 14 52 55 10.1 42 10.3 76 46 78 68 6.2 89.1%
fetch() - 14 40 42 10.1 29 10.3 76 46 78 68 4 93.81%
Response .body - ? 65 52 - 39 - 76 46 78 68 6.2 73.94%
ReadableStream .getReader() - 14 65 43 ? 30 ? 76 46 78 68 4 75.3%
ReadableStreamDefaultReader .read() ? ? 65 ? ? ? ? ? ? ? 68 ? 3.86%
TextDecoder .decode() - ? 18 38 10.1 25 10.3 76 ? 78 68 ? 87.56%
let - 12 44 41[3] 11 28[3] 11 76 46 78 68 4[3] 92.83%
use strict 10 12 4 13 6 12.1 5 3 12 78 68 4 97.89%
getElementById() 6 12 2 4 3.1 10 3.2 ? 12 78 68 4 93.93%
createElement() 6 12 ? 4 ? ? ? ? ? 78 68 ? 76.28%
appendChild() 6 12 ? ? ? ? ? ? ? 78 68 ? 67.33%
remove() - ? 23 24 ? 15 7 4.4 46 78 68 4 94.69%
insertBefore() 9 12 3 4 ? ? ? 2.1 ? 78 68 ? 78.27%
document .title ? 12 ? 4 ? ? ? ? ? 78 68 ? 74.58%
textContent 9 12 2 4 ? 10 ? ? 12 78 68 4 98.74%
JSON .stringify 8 12 3.5 4 4 11.5 ? ? 12 78 68 4 84.04%
event .target ? 12 ? ? ? ? ? ? ? 78 68 ? 69.63%
event .currentTarget 9 12 ? ? 10 ? 10 ? ? 78 68 ? 80.43%
event .stopImmediatePropagation() 9 12 10 6 5 15 5 ? 46 78 68 4 93.71%
addEventListener() 9 12 7 4 3.1 10 3.2 2.1 12 78 68 4 98.74%
removeEventListener() 9 12 2 4 3.1 10 3.2 2.1 12 78 68 4 94.07%
Result - 15 65 55 11 42 11 76 46 78 68 6.2 3.86%
  1. Updated at December 10, 2019
  2. Async arrow functions are unsupported
  3. Only supported in strict mode