Skip to content

View

Card-like visual container embedding a header Label and a vertical VBox content area.

Overview

View extends Box to provide a ready-to-use card or panel container. It automatically initializes an internal VBox containing a header Label and a flexible content area. It is widely used in debug screens, demo panels, and HUD cards.

Styling & Structure

Because View extends Box, it inherits full visual background rendering (solid color, gradient, textures), borders, corner radiuses, and shadows. Default styling is loaded from WidgetStyles.View.DEFAULT.

Creating an Inspector Card

View card = new View("Properties");
card.addContent(new Label("Status: Active"));
card.addContent(new Button("Save"));

API

View::title(String)

Set Title

Sets the text of the header label.

Parameter Type Description
title String title text string

Returns View: this widget for fluent configuration.

View::content()

Get Content Container

Returns the internal VBox container hosting the content widgets.

Returns VBox: internal VBox container instance.

View::addContent(Widget)

Add Content Widget

Appends a widget to the internal vertical content container below the title.

Parameter Type Description
widget Widget widget to append to view content

Returns View: this widget for fluent configuration.