JDANCE API
Overview
Demo
GettingStarted
GUI COMPONENTS
LAYOUTS
BasicLayout
HorizontalLayout
VerticalLayout
GridLayout
StackLayout
COMPONENTS
Text
Space
Button
Checkbox
Image
Html
FIELDS
InputField
DropdownField
PANELS
LinkPanel
FormPanel
FixedPanel
StickyPanel
WindowPanel
ACTIONS
HttpAction
AjaxAction
ServerAction
CONTEXTS
HttpContext
AjaxContext
WebsocketContext
CONTROLLERS
HttpController
AjaxController
WebsocketController
STYLING
APPEARANCE
Font
Color
Border
Shadow
LAYOUT
Padding
Size
Align
RESPONSIVE
Media

JDance API

JDance is a simple component based architecture for developing web applications in Java.

The idea is to provide a consistent Java API for building the user interface, handling layout and connecting the front-end directly to server actions, while hiding much of the underlying HTML, CSS and JavaScript complexity.

What is JDance?

JDance brings component based web development to Java.

User interfaces are built from Java components such as layouts, text, buttons, fields and panels. Components can be combined and configured using ordinary Java code.

A simple layout can for example look like this:

CODE
    BasicLayout layout = new BasicLayout(BasicLayout.Direction.VERTICAL);
    layout.setGap(10);
    layout.setPadding(20);

    layout.add(new Text("Hello, world!"));
    layout.add(new Button("Continue"));

Core concepts

Components

Everything displayed by JDance is built from components.

Components include text, buttons, input fields, images, layouts and other reusable parts of the user interface.

Layouts

Layouts compose components and control how they are positioned and sized.

BasicLayout is the main layout primitive and can arrange components horizontally or vertically.

More specialized layouts are available when needed, including GridLayout and StackLayout.

Actions

Actions connect the user interface to application behavior.

HttpAction is used for normal HTTP navigation, while other action types can be used when the page should communicate with the server without replacing the complete page.

Styling

JDance exposes common web styling through Java objects and methods.

This includes fonts, colors, borders, padding, shadows, sizing, alignment and responsive media rules.

Why JDance?

The goal of JDance is to make web application development straightforward for Java developers.

- Component based user interfaces.

- Layout managers instead of manually composing page structure.

- A consistent Java API for front-end development.

- Direct integration between user interface and server actions.

- Reusable Java components.

- Less hand written HTML, CSS and JavaScript.

- Responsive layouts using the same component API.

- Straightforward extension through custom components.

API reference

Use the navigation on the left to explore JDance.

Start with the GUI Components section for layouts and user interface components, Actions for request and server interaction, and Styling for the visual properties shared by components.