GUI model

Graphical UI

class besser.BUML.metamodel.gui.graphical_ui.Button(name: str, description: str, label: str, buttonType: ButtonType, actionType: ButtonActionType, targetScreen: Screen = None, method_btn=None, entity_class: Class = None, instance_source=None, is_instance_method: bool = False, confirmation_required: bool = False, confirmation_message: str = None, timestamp: int = None, visibility: str = 'public', styling: Styling = None, method_entity: Class = None, method_entity_id=None, method_parameters: dict = None, method_class: Class = None, method_name: str = None, method=None, **kwargs)[source]

Bases: ViewComponent

Represents a button component and encapsulates specific properties of a button, such as its name and label.

Parameters:
  • name (str) – The name of the button.

  • description (str) – The description of the button.

  • label (str) – The display label of the button.

  • buttonType (ButtonType) – The visual type of the button.

  • actionType (ButtonActionType) – The action performed when clicked.

  • targetScreen (Screen | None) – Target screen for navigation actions.

  • method_btn (Method | None) – The actual Method object to execute (Run Method action).

  • entity_class (Class | None) – Target class for CRUD operations (Create/Update/Delete actions).

  • instance_source (ViewComponent | str | None) – Table/component providing instance data, or component ID.

  • is_instance_method (bool) – Whether the method is an instance method (has self parameter).

  • confirmation_required (bool) – Whether to show confirmation dialog before action.

  • confirmation_message (str | None) – Custom confirmation message text.

  • timestamp (int | None) – Creation timestamp.

  • visibility (str) – Visibility level.

  • styling (Styling | None) – Visual styling configuration.

_abc_impl = <_abc._abc_data object>
property actionType: ButtonActionType
property buttonType: ButtonType
property confirmation_message: str

Get the confirmation message text.

property confirmation_required: bool

Check if confirmation is required before executing action.

property entity_class: Class

Get the target class for CRUD operations.

property instance_source

Get the component providing instance data (ViewComponent object or string ID).

property is_instance_method: bool

Check if the method is an instance method (has self parameter).

property label: str
property method_btn

Get the actual Method object to execute.

property method_entity_id

Legacy alias for instance_source.

property targetScreen: Screen
class besser.BUML.metamodel.gui.graphical_ui.ButtonActionType(*values)[source]

Bases: Enum

Represents a button action type.

About = 'About'
Add = 'Add'
Back = 'Back'
Cancel = 'Cancel'
Confirm = 'Confirm'
Create = 'create'
Delete = 'delete'
Edit = 'Edit'
Exit = 'Exit'
Filter = 'Filter'
Help = 'Help'
Login = 'Login'
Logout = 'Sign Out'
Navigate = 'navigate'
Next = 'Next'
OpenForm = 'Open Form'
RunMethod = 'run-method'
Save = 'Save'
Search = 'Search'
Select = 'Select'
Send = 'Send'
Settings = 'Settings'
Share = 'Share'
ShowList = 'Show List'
Sort = 'Sort'
SubmitForm = 'Submit Form'
Update = 'update'
View = 'View'
class besser.BUML.metamodel.gui.graphical_ui.ButtonType(*values)[source]

Bases: Enum

Represents a button type.

CustomizableButton = 'Customizable Button'
DropdownButton = 'Dropdown Button'
FloatingActionButton = 'FloatingActionButton'
IconButton = 'Icon Button'
OutlinedButton = 'Outlined Button'
RaisedButton = 'Raised Button'
TextButton = 'Text Button'
ToggleButtons = 'Toggle Buttons'
iOSStyleButton = 'iOS-style Button'
class besser.BUML.metamodel.gui.graphical_ui.Collection(name: str, col_type: CollectionSourceType)[source]

Bases: DataSource

Represents a data source that is a collection.

Parameters:
  • name (str) – The name of the collection data source.

  • col_type (CollectionSourceType) – The type of the collection data source.

name

The name of the collection data source.

Type:

str

col_type

The type of the collection data source.

Type:

CollectionSourceType

_abc_impl = <_abc._abc_data object>
property col_type: CollectionSourceType

Get the type of the collection data source.

Type:

CollectionSourceType

class besser.BUML.metamodel.gui.graphical_ui.CollectionSourceType(*values)[source]

Bases: Enum

Represents the type of a collection source.

Array = 'Array'
Grid = 'Grid'
List = 'List'
Stack = 'Stack'
Table = 'Table'
Tree = 'Tree'
class besser.BUML.metamodel.gui.graphical_ui.DataList(name: str, description: str, list_sources: set[DataSource], visibility: str = 'public', timestamp: int = None, styling: Styling = None, **kwargs)[source]

Bases: ViewComponent

Represents a list component that encapsulates properties unique to lists, such as list sources.

Parameters:
  • name (str) – The name of the list.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • list_sources (set[DataSource]) – The set of data sources associated with the list.

  • styling (Styling, optional) – The styling configuration, which includes size, position, and color settings (default: None).

name

The name of the list.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

list_sources

The set of data sources associated with the list.

Type:

set[DataSource]

styling

The styling configuration, which includes size, position, and color settings (default: None).

Type:

Styling, optional

_abc_impl = <_abc._abc_data object>
property list_sources: set[DataSource]

Get the set of data sources associated with the list.

Type:

set[DataSource]

class besser.BUML.metamodel.gui.graphical_ui.DataSource(name: str)[source]

Bases: NamedElement

Represents a data source.

Parameters:

name (str) – The name of the data source.

name

The name of the data source.

Type:

str

_abc_impl = <_abc._abc_data object>
class besser.BUML.metamodel.gui.graphical_ui.DataSourceElement(name: str, dataSourceClass: Class | None = None, fields: set[Property] | None = None, label_field: Property | None = None, value_field: Property | None = None, field_names: List[str] | None = None, label_field_name: str | None = None, value_field_name: str | None = None)[source]

Bases: DataSource

Represents a data source associated with a model element.

Parameters:
  • name (str) – Display name of the data source.

  • dataSourceClass (Class | None) – Domain class backing the data source.

  • fields (set[Property] | None) – Subset of attributes included in the source.

  • label_field (Property | None) – Property used as label when rendering.

  • value_field (Property | None) – Property used as value when rendering.

  • field_names (list[str] | None) – Field names preserved when properties are unresolved.

  • label_field_name (str | None) – Label field name preserved when property is unresolved.

  • value_field_name (str | None) – Value field name preserved when property is unresolved.

_abc_impl = <_abc._abc_data object>
property dataSourceClass: Class | None

Get the class representing the data source.

Type:

Class | None

property domain_concept: Class | None

Alias to maintain backwards compatibility with older generators.

property field_names: List[str]

Names of fields kept when the domain model is unresolved.

Type:

List[str]

property fields: set[Property]

Get the set of properties (fields) of the model element.

Type:

set[Property]

property label_field: Property | None

Get the label field property.

Type:

Property | None

property label_field_name: str | None

Get the stored label field name.

Type:

str | None

property value_field: Property | None

Get the value field property.

Type:

Property | None

property value_field_name: str | None

Get the stored value field name.

Type:

str | None

class besser.BUML.metamodel.gui.graphical_ui.EmbeddedContent(name: str, description: str, source: str | None = None, content_type: str | None = None, visibility: str = 'public', timestamp: int = None, styling: Styling = None, extra_props: Dict[str, str] | None = None, **kwargs)[source]

Bases: ViewComponent

Represents embedded content such as iframes or maps.

_abc_impl = <_abc._abc_data object>
property content_type: str | None
property extra_props: Dict[str, str]
property source: str | None
class besser.BUML.metamodel.gui.graphical_ui.File(name: str, file_type: FileSourceType)[source]

Bases: DataSource

Represents a data source that is a file.

Parameters:
  • name (str) – The name of the file data source.

  • type (FileSourceType) – The type of the file data source.

name

The name of the file data source.

Type:

str

file_type

The type of the file data source.

Type:

FileSourceType

_abc_impl = <_abc._abc_data object>
property file_type: FileSourceType

Get the type of the file data source.

Type:

FileSourceType

class besser.BUML.metamodel.gui.graphical_ui.FileSourceType(*values)[source]

Bases: Enum

Represents the type of a file source.

DatabaseFileSystem = 'DatabaseFileSystem'
FileSystem = 'FileSystem'
LocalStorage = 'LocalStorage'
class besser.BUML.metamodel.gui.graphical_ui.Form(name: str, description: str, inputFields: set[InputField], visibility: str = 'public', timestamp: int = None, styling: Styling = None, **kwargs)[source]

Bases: ViewComponent

Represents a form component and encapsulates the specific properties of a form, such as its name.

Parameters:
  • name (str) – The name of the form.

  • description (str) – The description of the form.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • inputFields (set[InputField]) – The set of input fields contained in the form.

  • styling (Styling, optional) – The styling configuration for the view element, which includes size, position, and color settings (default: None).

name

The name of the form.

Type:

str

description

The description of the form.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

inputFields

The set of input fields contained in the form.

Type:

set[InputField]

styling

The styling configuration for the view element, which includes size, position, and color settings (default: None).

Type:

Styling, optional

_abc_impl = <_abc._abc_data object>
property inputFields: set[InputField]

Get the set of input Fields contained in the form.

Type:

set[InputField]

class besser.BUML.metamodel.gui.graphical_ui.GUIModel(name: str, package: str, versionCode: str, versionName: str, modules: set[Module], description: str, timestamp: int = None, screenCompatibility: bool = False, style_entries: list = None)[source]

Bases: Model

It is a subclass of the NamedElement class and encapsulates the properties and behavior of the GUI part of an application, including its name,

package, version code, version name, modules, description, and screen compatibility.

Parameters:
  • name (str) – The name of the model.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • package (str) – The package of the model.

  • versionCode (str) – The version code of the model.

  • versionName (str) – The version name of the model.

  • modules (set[Module]) – The set of modules contained in the model.

  • description (str) – The description of the model.

  • screenCompatibility (bool) – Indicates whether the model has screen compatibility.

name

The name of the model.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

package

The package of the model.

Type:

str

versionCode

The version code of the model.

Type:

str

versionName

The version name of the model.

Type:

str

modules

The set of modules contained in the model.

Type:

set[Module]

description

The description of the model.

Type:

str

screenCompatibility

Indicates whether the model has screen compatibility.

Type:

bool

_abc_impl = <_abc._abc_data object>
property description: str

Get the description of the model.

Type:

str

property modules: set[Module]

Get the set of modules contained in the model.

Type:

set[Module]

property package: str

Get the package of the model.

Type:

str

property screenCompatibility: bool

Get the screen compatibility of the model.

Type:

bool

style_entries: list
property versionCode: str

Get the version code of the model.

Type:

str

property versionName: str

Get the version name of the model.

Type:

str

class besser.BUML.metamodel.gui.graphical_ui.Image(name: str, description: str, timestamp: int = None, styling: Styling = None, source: str | None = None, **kwargs)[source]

Bases: ViewComponent

Represents an image component and encapsulates image-specific properties.

Parameters:
  • name (str) – The name of the image.

  • description (str) – The description of the image.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • styling (Styling, optional) – The styling configuration for the view element, which includes size, position, and color settings (default: None).

  • source (str | None) – Raw URI/base64 string representing the image source.

name

The name of the image.

Type:

str

description

The description of the image.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

styling

The styling configuration for the view element, which includes size, position, and color settings (default: None).

Type:

Styling, optional

source

Raw URI/base64 string representing the image source.

Type:

str | None

_abc_impl = <_abc._abc_data object>
property source: str | None
class besser.BUML.metamodel.gui.graphical_ui.InputField(name: str, description: str, field_type: InputFieldType, timestamp: int = None, validationRules: str = None, visibility: str = 'public', styling: Styling = None, **kwargs)[source]

Bases: ViewComponent

Represents an input field component and encapsulates specific properties of an input field, such as its type and validation rules.

Args:

name (str): The name of the input field. description (str): The description of the input field. timestamp (datetime): Object creation datetime (default is current time). field_type (InputFieldType): The type of the input field. validationRules (str): The validation rules for the input field. styling (Styling, optional): The styling configuration for the view element, which includes size, position, and color settings (default: None).

name

The name of the input field.

Type:

str

description

The description of the input field.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

field_type

The type of the input field.

Type:

InputFieldType

validationRules

The validation rules for the input field.

Type:

str

styling

The styling configuration for the view element, which includes size, position, and color settings (default: None).

Type:

Styling, optional

_abc_impl = <_abc._abc_data object>
property field_type: InputFieldType

Get the type of the input field.

Type:

InputFieldType

property validationRules: str

Get the validation rules of the input field.

Type:

str

class besser.BUML.metamodel.gui.graphical_ui.InputFieldType(*values)[source]

Bases: Enum

Represents the type of a Input Field.

Color = 'Color'
Date = 'Date'
Email = 'Email'
File = 'File'
Number = 'Number'
Password = 'Password'
Range = 'Range'
Search = 'Search'
Tel = 'Tel'
Text = 'Text'
Time = 'Time'
URL = 'URL'

Bases: ViewComponent

Represents a hyperlink component.

_abc_impl = <_abc._abc_data object>
property label: str
property rel: str | None
property target: str | None
property url: str | None
class besser.BUML.metamodel.gui.graphical_ui.Menu(name: str, description: str, menuItems: set[MenuItem], visibility: str = 'public', timestamp: int = None, styling: Styling = None, **kwargs)[source]

Bases: ViewComponent

Represents a menu component and encapsulates the specific properties of a menu, such as its name.

Parameters:
  • name (str) – The name of the menu.

  • description (str) – The description of the menu.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • menuItems (set[MenuItem]) – The set of menu items contained in the menu.

  • styling (Styling, optional) – The styling configuration for the view element, which includes size, position, and color settings (default: None).

name

The name of the menu.

Type:

str

description

The description of the menu.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

menuItems

The set of menu items contained in the menu.

Type:

set[MenuItem]

styling

The styling configuration for the view element, which includes size, position, and color settings (default: None).

Type:

Styling, optional

_abc_impl = <_abc._abc_data object>
property menuItems: set[MenuItem]

Get the set of menuItems.

Type:

set[MenuItem]

class besser.BUML.metamodel.gui.graphical_ui.MenuItem(label: str, url: str | None = None, target: str | None = None, rel: str | None = None)[source]

Bases: Element

Represents an item of a menu.

Parameters:
  • label (str) – The label of the menu item.

  • url (str | None) – Destination URL associated with the item.

  • target (str | None) – Link target behaviour (e.g., “_blank”).

  • rel (str | None) – Relationship attribute for the link.

_abc_impl = <_abc._abc_data object>
label: str
rel: str | None
target: str | None
url: str | None
class besser.BUML.metamodel.gui.graphical_ui.Module(name: str, screens: set[Screen], visibility: str = 'public', timestamp: int = None)[source]

Bases: NamedElement

Represents a module.

Parameters:
  • name (str) – name (str): The name of the module.

  • description (str) – The description of the input field.

  • screens (set[Screen]) – The set of screens contained in the module.

name

name (str): The name of the module.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

screens

The set of screens contained in the module.

Type:

set[Screen]

_abc_impl = <_abc._abc_data object>
property screens: set[Screen]

Get the set of screens contained.

Type:

set[Screen]

class besser.BUML.metamodel.gui.graphical_ui.Screen(name: str, description: str, view_elements: set[ViewElement], x_dpi: str = '', y_dpi: str = '', screen_size: str = 'Medium', timestamp: int = None, is_main_page: bool = False, layout: Layout = None, styling: Styling = None, route_path: str | None = None, **kwargs)[source]

Bases: ViewContainer

Represents a screen.

Parameters:
  • name (str) – The name of the screen.

  • description (str) – The description of the screen.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • view_elements (set[ViewElement]) – The set of view elements on the screen.

  • x_dpi (str) – The X DPI (dots per inch) of the screen.

  • y_dpi (str) – The Y DPI (dots per inch) of the screen.

  • screen_size (str) – The size of the screen.

  • is_main_page (bool) – Indicates whether this screen is the main page.

  • layout (Layout | None, optional) – The layout settings (Defaults to None).

name

The name of the screen.

Type:

str

description

The description of the screen.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

view_elements

The set of view elements on the screen.

Type:

set[ViewElement]

x_dpi

The X DPI (dots per inch) of the screen.

Type:

str

y_dpi

The Y DPI (dots per inch) of the screen.

Type:

str

screen_size

The size of the screen.

Type:

str

is_main_page

wether this screen serves as the main page.

Type:

bool

layout

The layout settings (Defaults to None)

Type:

Layout | None, optional

_abc_impl = <_abc._abc_data object>
property is_main_page: bool

Get whether the screen is main page.

Type:

bool

property route_path: str

Get the route path for the screen.

Type:

str

property screen_size: str

Get the size of the screen.

Type:

str

property x_dpi: str

Get the X DPI (dots per inch) of the screen.

Type:

str

property y_dpi: str

Get the Y DPI (dots per inch) of the screen.

Type:

str

class besser.BUML.metamodel.gui.graphical_ui.Text(name: str, content: str, description: str = '', visibility: str = 'public', timestamp: int = None, styling: Styling = None, **kwargs)[source]

Bases: ViewComponent

Represents a text component.

Parameters:
  • name (str) – The name of the text component.

  • content (str) – The content of the text component.

  • description (str) – The description of the text component.

  • visibility (str) – The visibility of the text component.

  • timestamp (int) – The timestamp of the text component.

  • styling (Styling) – The styling of the text component.

name

The name of the text component.

Type:

str

content

The content of the text component.

Type:

str

description

The description of the text component.

Type:

str

visibility

The visibility of the text component.

Type:

str

timestamp

The timestamp of the text component.

Type:

int

styling

The styling of the text component.

Type:

Styling

_abc_impl = <_abc._abc_data object>
property content: str

Get the content of the text component.

Type:

str

class besser.BUML.metamodel.gui.graphical_ui.ViewComponent(name: str, description: str = '', visibility: str = 'public', timestamp: int = None, styling: Styling = None, data_binding: DataBinding = None, **kwargs)[source]

Bases: ViewElement

Represents a view component that extends a generic ViewElement.

Parameters:
  • name (str) – The name of the view component.

  • description (str) – A brief description of the view component (optional).

  • timestamp (datetime) – Object creation datetime (default is current time).

  • visibility (str, optional) – The visibility scope (default: “public”).

  • styling (Styling, optional) – The styling configuration for the view element, which includes size, position, and color settings (default: None).

  • data_binding (DataBinding | None, optional) – The data binding configuration for the view component (if any).

name

The name of the view component.

Type:

str

description

A brief description of the view component (optional).

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

visibility

The visibility scope of the component.

Type:

str

styling

The styling configuration for the view element, which includes size, position, and color settings (default: None).

Type:

Styling, optional

data_binding

The data binding configuration for the view component (if any).

Type:

DataBinding | None

_abc_impl = <_abc._abc_data object>
property data_binding: DataBinding

Get the data binding of the view component.

Type:

DataBinding

class besser.BUML.metamodel.gui.graphical_ui.ViewContainer(name: str, description: str, view_elements: set[ViewElement], timestamp: int = None, layout: Layout = None, styling: Styling = None, **kwargs)[source]

Bases: ViewElement

Represents a view container.

Parameters:
  • name (str) – The name of the view container.

  • description (str) – The description of the view container.

  • timestamp (datetime) – Object creation datetime (default is current time).

  • layout (Layout | None, optional) – The layout settings of the container. Defaults to None.

name

The name of the view container.

Type:

str

description

The description of the view container.

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

layout

The layout settings of the container.

Type:

Layout | None

_abc_impl = <_abc._abc_data object>
property layout: Layout | None

Get the layout settings of the container.

Type:

Layout | None

property view_elements: set[ViewElement]

Get the set of view elements on the screen.

Type:

set[ViewComponent]

class besser.BUML.metamodel.gui.graphical_ui.ViewElement(name: str, description: str = '', visibility: str = 'public', timestamp: int = None, styling: Styling = None, component_id: str = None, tag_name: str = None, css_classes: list = None, custom_attributes: dict = None, display_order: float = None, **kwargs)[source]

Bases: NamedElement

Represents a view element with optional size, position, and color attributes.

Parameters:
  • name (str) – The name of the view element.

  • description (str) – A brief description of the view element (optional).

  • timestamp (datetime) – Object creation datetime (default is current time).

  • visibility (str, optional) – Visibility scope (default: “public”).

  • styling (Styling, optional) – The styling configuration for the view element, which includes size, position, and color settings (default: None).

name

The name of the view element.

Type:

str

description

A brief description of the view element (optional).

Type:

str

timestamp

Inherited from NamedElement; object creation datetime (default is current time).

Type:

datetime

visibility

Visibility scope (default: “public”).

Type:

str

styling

The styling configuration for the view element, which includes size, position, and color settings (default: None).

Type:

Styling, optional

owner

The container that owns this view element (if any).

Type:

ViewContainer | None

component_id

Original GrapesJS component ID for code generation fidelity.

Type:

str | None

component_type

Original GrapesJS component type for code generation fidelity.

Type:

str | None

tag_name

HTML tag name (e.g., “div”, “button”, “img”).

Type:

str | None

css_classes

List of CSS class names applied to the component.

Type:

list[str]

custom_attributes

Dictionary of custom HTML attributes.

Type:

dict

display_order

Order index from original JSON to preserve component sequence.

Type:

int

_abc_impl = <_abc._abc_data object>
_owner: ViewContainer
component_id: str | None
component_type: str | None
css_classes: list[str]
custom_attributes: dict
property description: str

Get the description of the view element.

Type:

str

display_order: float
property owner: ViewContainer

Get the owner of the view element.

Type:

ViewContainer

property styling: Styling

Get the styling of the view element.

Type:

Styling

tag_name: str | None

Data Binding

class besser.BUML.metamodel.gui.binding.DataAggregation(*values)[source]

Bases: Enum

Aggregation types for dashboard metrics and chart data.

AVG = 'average'
COUNT = 'count'
FIRST = 'first'
LAST = 'last'
MAX = 'maximum'
MEDIAN = 'median'
MIN = 'minimum'
SUM = 'sum'
class besser.BUML.metamodel.gui.binding.DataBinding(domain_concept: Class, name: str = None, visualization_attrs: set[Property] = None, label_field: Property = None, data_field: Property = None, data_filter: Constraint = None, label_field_path: str = None, data_field_path: str = None, filter_expression: str = None)[source]

Bases: Element

DataBinding references a domain concept (Class) to bind data to a GUI element.

Parameters:
  • name (str, optional) – Name of the data binding.

  • domain_concept (Class) – The domain concept to bind data from.

  • visualization_attrs (Property, optional) – The attribute of the GUI element to bind data to. Defaults to None.

  • label_field (Property, optional) – The field in the domain concept to use as a label. Defaults to None.

  • data_field (Property, optional) – The specific field in the domain concept to bind data from. Defaults to None.

  • data_filter (Constraint, optional) – Filter constraint for the data. Defaults to None.

  • label_field_path (str, optional) – Dot notation path for nested label field (e.g., “measure.name”). Defaults to None.

  • data_field_path (str, optional) – Dot notation path for nested data field (e.g., “measure.value”). Defaults to None.

  • filter_expression (str, optional) – Raw filter expression string. Defaults to None.

name

Name of the data binding.

Type:

str

domain_concept

The domain concept to bind data from.

Type:

Class

visualization_attrs

The attribute of the GUI element to bind data to.

Type:

Property

label_field

The field in the domain concept to use as a label.

Type:

Property

data_field

The specific field in the domain concept to bind data from.

Type:

Property

data_filter

Filter constraint for the data.

Type:

Constraint

label_field_path

Dot notation path for nested label field.

Type:

str

data_field_path

Dot notation path for nested data field.

Type:

str

filter_expression

Raw filter expression string.

Type:

str

_abc_impl = <_abc._abc_data object>
property data_field: Property

Get the data field.

Type:

Property

property data_filter: Constraint

Get the data filter constraint.

Type:

Constraint

property domain_concept: Class

Get the domain concept.

Type:

Class

property label_field: Property

Get the label field.

Type:

Property

property name: str

Get the name.

Type:

str

property visualization_attrs: set[Property]

Get the visualization attributes.

Type:

Property

Dashboard Components

class besser.BUML.metamodel.gui.dashboard.AgentComponent(name: str, agent_name: str | None = None, agent_title: str | None = None, **kwargs)[source]

Bases: ViewComponent

Represents a BESSER Agent component in the GUI.

Parameters:
  • name (str) – The name of the agent component.

  • agent_name (str | None) – The name of the agent diagram to reference.

  • agent_title (str | None) – Display title for the agent component.

_abc_impl = <_abc._abc_data object>
property agent_name: str | None

Name of the agent diagram to reference.

Type:

Optional[str]

property agent_title: str | None

Display title for the agent component.

Type:

Optional[str]

class besser.BUML.metamodel.gui.dashboard.BarChart(name: str, bar_width: int = 30, orientation: str = 'vertical', show_grid: bool = True, show_legend: bool = True, show_tooltip: bool = True, stacked: bool = False, animate: bool = True, legend_position: str = 'top', grid_color: str = '#e0e0e0', bar_gap: int = 4, title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: Chart

Represents a bar chart component in the dashboard.

Parameters:
  • name (str) – The name of the bar chart.

  • bar_width (int) – The width of the bars in the chart.

  • orientation (str) – Orientation of bars (‘vertical’ or ‘horizontal’).

  • show_grid (bool) – Whether to show the grid.

  • show_legend (bool) – Whether to show the legend.

  • show_tooltip (bool) – Whether to show tooltips.

  • stacked (bool) – Whether to stack bars.

  • animate (bool) – Whether to animate the chart.

  • legend_position (str) – Position of the legend.

  • grid_color (str) – Color of the grid lines.

  • bar_gap (int) – Gap between bars.

name

The name of the bar chart.

Type:

str

bar_width

The width of the bars in the chart.

Type:

int

orientation

Orientation of bars.

Type:

str

show_grid

Whether to show the grid.

Type:

bool

show_legend

Whether to show the legend.

Type:

bool

show_tooltip

Whether to show tooltips.

Type:

bool

stacked

Whether to stack bars.

Type:

bool

animate

Whether to animate.

Type:

bool

legend_position

Position of the legend.

Type:

str

grid_color

Color of the grid.

Type:

str

bar_gap

Gap between bars.

Type:

int

_abc_impl = <_abc._abc_data object>
property animate: bool

Get whether to animate.

Type:

Property

property bar_gap: int

Get bar gap.

Type:

Property

property bar_width: int

Get the bar width of the bar chart.

Type:

Property

property grid_color: str

Get grid color.

Type:

Property

property legend_position: str

Get legend position.

Type:

Property

property orientation: str

Get orientation.

Type:

Property

property show_grid: bool

Get whether to show grid.

Type:

Property

property show_legend: bool

Get whether to show legend.

Type:

Property

property show_tooltip: bool

Get whether to show tooltip.

Type:

Property

property stacked: bool

Get whether bars are stacked.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.Chart(name: str, series: Sequence[Series] | None = None, title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: ViewComponent

Represents a chart component in the dashboard.

Parameters:
  • name (str) – The name of the chart.

  • title (str | None) – Optional display title of the chart.

  • primary_color (str | None) – Optional primary color used by the chart.

  • series (list[Series]) – List of data series in the chart.

_abc_impl = <_abc._abc_data object>
property primary_color: str | None

Main color used by the chart.

Type:

Optional[str]

property series: list[Series]

List of data series in the chart.

Type:

list[Series]

property title: str | None

Display title for the chart.

Type:

Optional[str]

class besser.BUML.metamodel.gui.dashboard.Column(label: str)[source]

Bases: object

Represents a column in a table.

Parameters:

label (str) – The display label of the column.

label

The display label of the column.

Type:

str

property label: str

Get the label of the column.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.ExpressionColumn(label: str, expression: str)[source]

Bases: Column

Represents an expression column in a table.

Parameters:
  • label (str) – The display label of the column.

  • expression (str) – The expression used to compute the column value.

label

The display label of the column.

Type:

str

expression

The expression used to compute the column value.

Type:

str

property expression: str

Get the expression of the column.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.FieldColumn(label: str, field: Property)[source]

Bases: Column

Represents a field column in a table.

Parameters:
  • label (str) – The display label of the column.

  • field (Property) – The property representing the field.

label

The display label of the column.

Type:

str

field

The property representing the field.

Type:

Property

property field: Property

Get the field property of the column.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.LineChart(name: str, line_width: int = 2, show_grid: bool = True, show_legend: bool = True, show_tooltip: bool = True, curve_type: str = 'monotone', animate: bool = True, legend_position: str = 'top', grid_color: str = '#e0e0e0', dot_size: int = 5, title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: Chart

Represents a line chart component in the dashboard.

Parameters:
  • name (str) – The name of the line chart.

  • line_width (int) – The width of the line in the chart.

  • show_grid (bool) – Whether to show the grid in the chart.

  • show_legend (bool) – Whether to show the legend in the chart.

  • show_tooltip (bool) – Whether to show tooltips.

  • curve_type (str) – The curve type (‘linear’, ‘monotone’, ‘step’).

  • animate (bool) – Whether to animate the chart.

  • legend_position (str) – Position of the legend (‘top’, ‘right’, ‘bottom’, ‘left’).

  • grid_color (str) – Color of the grid lines.

  • dot_size (int) – Size of the data point dots.

name

The name of the line chart.

Type:

str

line_width

The width of the line in the chart.

Type:

int

show_grid

Whether to show the grid.

Type:

bool

show_legend

Whether to show the legend.

Type:

bool

show_tooltip

Whether to show tooltips.

Type:

bool

curve_type

The curve type.

Type:

str

animate

Whether to animate the chart.

Type:

bool

legend_position

Position of the legend.

Type:

str

grid_color

Color of the grid lines.

Type:

str

dot_size

Size of the data point dots.

Type:

int

_abc_impl = <_abc._abc_data object>
property animate: bool

Get whether to animate.

Type:

Property

property curve_type: str

Get the curve type.

Type:

Property

property dot_size: int

Get dot size.

Type:

Property

property grid_color: str

Get grid color.

Type:

Property

property legend_position: str

Get legend position.

Type:

Property

property line_width: int

Get the line width of the line chart.

Type:

Property

property show_grid: bool

Get whether to show grid.

Type:

Property

property show_legend: bool

Get whether to show legend.

Type:

Property

property show_tooltip: bool

Get whether to show tooltip.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.LocationMap(name: str, data: list)[source]

Bases: Map

Represents a location map component in the dashboard.

Parameters:
  • name (str) – The name of the location map.

  • data (list) – The data to be displayed on the location map.

name

The name of the location map.

Type:

str

data

The data to be displayed on the location map.

Type:

list

_abc_impl = <_abc._abc_data object>
class besser.BUML.metamodel.gui.dashboard.LookupColumn(label: str, path: Property, field: Property)[source]

Bases: Column

Represents a lookup column in a table.

Parameters:
  • label (str) – The display label of the column.

  • path (Property) – The property representing the lookup path.

  • field (Property) – The property representing the lookup field.

label

The display label of the column.

Type:

str

path

The property representing the lookup path.

Type:

Property

field

The property representing the lookup field.

Type:

Property

property field: Property

Get the field property of the lookup column.

Type:

Property

property path: Property

Get the path property of the lookup column.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.Map(name: str, data: list)[source]

Bases: ViewComponent

Represents a map component in the dashboard.

Parameters:

name (str) – The name of the map.

name

The name of the map.

Type:

str

_abc_impl = <_abc._abc_data object>
class besser.BUML.metamodel.gui.dashboard.MetricCard(name: str, metric_title: str = 'Metric Title', format: str = 'number', value_color: str = '#2c3e50', value_size: int = 32, show_trend: bool = True, positive_color: str = '#27ae60', negative_color: str = '#e74c3c', title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: ViewComponent

Represents a metric card / KPI card component in the dashboard.

Parameters:
  • name (str) – The name of the metric card.

  • metric_title (str) – The title displayed on the metric card.

  • format (str) – The format for displaying the value (‘number’, ‘currency’, ‘percentage’, ‘time’).

  • value_color (str) – The color of the value text.

  • value_size (int) – The font size of the value text.

  • show_trend (bool) – Whether to show the trend indicator.

  • positive_color (str) – Color for positive trends.

  • negative_color (str) – Color for negative trends.

  • title (str | None) – Optional title for the metric card container.

  • primary_color (str | None) – Optional primary color.

metric_title

The title displayed on the metric card.

Type:

str

format

The format for displaying the value.

Type:

str

value_color

The color of the value text.

Type:

str

value_size

The font size of the value text.

Type:

int

show_trend

Whether to show the trend indicator.

Type:

bool

positive_color

Color for positive trends.

Type:

str

negative_color

Color for negative trends.

Type:

str

_abc_impl = <_abc._abc_data object>
property format: str

Get the display format.

Type:

Property

property metric_title: str

Get the metric title.

Type:

Property

property negative_color: str

Get the negative trend color.

Type:

Property

property positive_color: str

Get the positive trend color.

Type:

Property

property primary_color: str | None

Optional primary color.

Type:

Optional[str]

property show_trend: bool

Get whether to show trend.

Type:

Property

property title: str | None

Optional title for the metric card container.

Type:

Optional[str]

property value_color: str

Get the value color.

Type:

Property

property value_size: int

Get the value font size.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.PieChart(name: str, show_legend: bool = True, legend_position: Alignment = Alignment.LEFT, show_labels: bool = True, label_position: Alignment = Alignment.INSIDE, padding_angle: int = 0, inner_radius: int = 0, outer_radius: int = 80, start_angle: int = 0, end_angle: int = 360, title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: Chart

Represents a pie chart component in the dashboard.

Parameters:
  • name (str) – The name of the pie chart.

  • show_legend (bool) – Whether to show the legend in the pie chart.

  • legend_position (Alignment) – The position of the legend in the pie chart.

  • show_labels (bool) – Whether to show labels in the pie chart.

  • label_position (Alignment) – The position of the labels in the pie chart.

  • padding_angle (int) – The padding angle between slices in the pie chart.

  • inner_radius (int) – Inner radius for donut charts (0-100).

  • outer_radius (int) – Outer radius percentage (0-100).

  • start_angle (int) – Start angle in degrees.

  • end_angle (int) – End angle in degrees.

name

The name of the pie chart.

Type:

str

show_legend

Whether to show the legend in the pie chart.

Type:

bool

legend_position

The position of the legend in the pie chart.

Type:

Alignment

show_labels

Whether to show labels in the pie chart.

Type:

bool

label_position

The position of the labels in the pie chart.

Type:

Alignment

padding_angle

The padding angle between slices in the pie chart.

Type:

int

inner_radius

Inner radius for donut charts.

Type:

int

outer_radius

Outer radius percentage.

Type:

int

start_angle

Start angle in degrees.

Type:

int

end_angle

End angle in degrees.

Type:

int

_abc_impl = <_abc._abc_data object>
property end_angle: int

Get the end angle.

Type:

Property

property inner_radius: int

Get the inner radius.

Type:

Property

property label_position: Alignment

Get the label position of the pie chart.

Type:

Property

property legend_position: Alignment

Get the legend position of the pie chart.

Type:

Property

property outer_radius: int

Get the outer radius.

Type:

Property

property padding_angle: int

Get the padding angle of the pie chart.

Type:

Property

property show_labels: bool

Get whether to show the labels of the pie chart.

Type:

Property

property show_legend: bool

Get whether to show the legend of the pie chart.

Type:

Property

property start_angle: int

Get the start angle.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.RadarChart(name: str, show_grid: bool = True, show_tooltip: bool = True, show_radius_axis: bool = True, show_legend: bool = True, legend_position: str = 'top', dot_size: int = 3, grid_type: str = 'polygon', stroke_width: int = 2, title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: Chart

Represents a radar chart component in the dashboard.

Parameters:
  • name (str) – The name of the radar chart.

  • show_grid (bool) – Whether to show the grid in the radar chart.

  • show_tooltip (bool) – Whether to show the tooltip in the radar chart.

  • show_radius_axis (bool) – Whether to show the radius axis in the radar chart.

  • show_legend (bool) – Whether to show the legend.

  • legend_position (str) – Position of the legend.

  • dot_size (int) – Size of data point dots.

  • grid_type (str) – Type of grid (‘polygon’ or ‘circle’).

  • stroke_width (int) – Width of the stroke lines.

name

The name of the radar chart.

Type:

str

show_grid

Whether to show the grid in the radar chart.

Type:

bool

show_tooltip

Whether to show the tooltip in the radar chart.

Type:

bool

show_radius_axis

Whether to show the radius axis in the radar chart.

Type:

bool

show_legend

Whether to show the legend.

Type:

bool

legend_position

Position of the legend.

Type:

str

dot_size

Size of data point dots.

Type:

int

grid_type

Type of grid.

Type:

str

stroke_width

Width of the stroke lines.

Type:

int

_abc_impl = <_abc._abc_data object>
property dot_size: int

Get dot size.

Type:

Property

property grid_type: str

Get grid type.

Type:

Property

property legend_position: str

Get legend position.

Type:

Property

property show_grid: bool

Get the show_grid option of the radar chart.

Type:

Property

property show_legend: bool

Get whether to show legend.

Type:

Property

property show_radius_axis: bool

Get the show_radius_axis option of the radar chart.

Type:

Property

property show_tooltip: bool

Get the show_tooltip option of the radar chart.

Type:

Property

property stroke_width: int

Get stroke width.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.RadialBarChart(name: str, start_angle: int = 0, end_angle: int = 360, inner_radius: int = 30, outer_radius: int = 80, show_legend: bool = True, legend_position: str = 'top', show_tooltip: bool = True, title: str | None = None, primary_color: str | None = None, **kwargs)[source]

Bases: Chart

Represents a radial bar chart component in the dashboard.

Parameters:
  • name (str) – The name of the radial bar chart.

  • start_angle (int) – The start angle of the radial bar chart.

  • end_angle (int) – The end angle of the radial bar chart.

  • inner_radius (int) – Inner radius percentage (0-100).

  • outer_radius (int) – Outer radius percentage (0-100).

  • show_legend (bool) – Whether to show the legend.

  • legend_position (str) – Position of the legend.

  • show_tooltip (bool) – Whether to show tooltips.

name

The name of the radial bar chart.

Type:

str

start_angle

The start angle of the radial bar chart.

Type:

int

end_angle

The end angle of the radial bar chart.

Type:

int

inner_radius

Inner radius percentage.

Type:

int

outer_radius

Outer radius percentage.

Type:

int

show_legend

Whether to show the legend.

Type:

bool

legend_position

Position of the legend.

Type:

str

show_tooltip

Whether to show tooltips.

Type:

bool

_abc_impl = <_abc._abc_data object>
property end_angle: int

Get the end angle of the radial bar chart.

Type:

Property

property inner_radius: int

Get the inner radius.

Type:

Property

property legend_position: str

Get legend position.

Type:

Property

property outer_radius: int

Get the outer radius.

Type:

Property

property show_legend: bool

Get whether to show legend.

Type:

Property

property show_tooltip: bool

Get whether to show tooltip.

Type:

Property

property start_angle: int

Get the start angle of the radial bar chart.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.Series(name: str, label: str | None, data_binding: DataBinding, styling: Styling)[source]

Bases: ViewComponent

Represents a data series in a chart.

Parameters:
  • name (str) – The name of the series.

  • label (str | None) – Label for the series.

  • data_binding (DataBinding) – The data binding for the series.

  • styling (Styling) – The styling for the series.

_abc_impl = <_abc._abc_data object>
class besser.BUML.metamodel.gui.dashboard.Table(name: str, show_header: bool = True, striped_rows: bool = False, show_pagination: bool = False, rows_per_page: int = 5, title: str | None = None, primary_color: str | None = None, columns: Sequence[Column] | None = None, action_buttons: bool = False, **kwargs)[source]

Bases: ViewComponent

Represents a table component in the dashboard.

Parameters:
  • name (str) – The name of the table.

  • show_header (bool) – Whether to render the table header.

  • striped_rows (bool) – Whether to alternate row background colors.

  • show_pagination (bool) – Whether to display pagination information.

  • rows_per_page (int) – Number of rows shown per page.

  • title (str | None) – Optional title of the table.

  • primary_color (str | None) – Optional primary color used for the header/background.

show_header

Whether to render the table header.

Type:

bool

striped_rows

Whether to alternate row backgrounds.

Type:

bool

show_pagination

Whether to display pagination controls.

Type:

bool

rows_per_page

Number of rows per page when pagination is enabled.

Type:

int

_abc_impl = <_abc._abc_data object>
property action_buttons: bool

Get whether action buttons are displayed.

Type:

Property

property columns: list[Column]

Get the configured column names.

Type:

Property

property primary_color: str | None

Get the primary color of the table.

Type:

Property

property rows_per_page: int

Get the number of rows per page.

Type:

Property

property show_header: bool

Get whether the table header is displayed.

Type:

Property

property show_pagination: bool

Get whether pagination info is displayed.

Type:

Property

property striped_rows: bool

Get whether striped rows are enabled.

Type:

Property

property title: str | None

Get the title of the table.

Type:

Property

class besser.BUML.metamodel.gui.dashboard.WorldMap(name: str, data: list)[source]

Bases: Map

Represents a world map component in the dashboard.

Parameters:
  • name (str) – The name of the world map.

  • data (list) – The data to be displayed on the world map.

name

The name of the world map.

Type:

str

data

The data to be displayed on the world map.

Type:

list

_abc_impl = <_abc._abc_data object>

Events and Actions

class besser.BUML.metamodel.gui.events_actions.Action(name: str, description: str = '', parameters: set[Parameter] = None, triggered_by: ViewComponent = None)[source]

Bases: Element

Represents an action that can be triggered in the GUI.

Actions represent behavior/logic in the application. They are NOT visual components, but rather operations that can be performed (CRUD operations, navigation, etc.).

Parameters:
  • name (str) – The name of the action.

  • description (str) – The description of the action.

  • parameters (set[Parameter]) – The set of parameters for the action (optional).

  • triggered_by (ViewComponent) – The component that triggers this action (optional).

name

The name of the action.

Type:

str

description

The description of the action.

Type:

str

parameters

The set of parameters for the action.

Type:

set[Parameter]

triggered_by

The component that triggers this action.

Type:

ViewComponent

_abc_impl = <_abc._abc_data object>
property description: str

Get the description of the action.

Type:

str

property name: str

Get the name of the action.

Type:

str

property parameters: set[Parameter]

Get the set of parameters for the action.

Type:

set[Parameter]

property triggered_by: ViewComponent

Get the component that triggers this action.

Type:

ViewComponent

class besser.BUML.metamodel.gui.events_actions.Create(name: str, target_class: Class = None, description: str = '', parameters: set[Parameter] = None, triggered_by: ViewComponent = None)[source]

Bases: Action

Represents a CREATE action (CRUD operation).

Creates a new instance of a domain class, typically used with forms to add new entities to the system.

Parameters:
  • name (str) – The name of the create action.

  • description (str) – The description of the create action.

  • target_class (Class) – The target class to create instances of.

  • parameters (set[Parameter]) – The set of parameters for the action (optional).

  • triggered_by (ViewComponent) – The component that triggers this action (optional).

name

The name of the create action.

Type:

str

description

The description of the create action.

Type:

str

target_class

The target class to create instances of.

Type:

Class

parameters

The set of parameters for the action.

Type:

set[Parameter]

triggered_by

The component that triggers this action.

Type:

ViewComponent

_abc_impl = <_abc._abc_data object>
property target_class: Class

Get the target class to create.

Type:

Class

class besser.BUML.metamodel.gui.events_actions.Delete(name: str, target_class: Class = None, description: str = '', parameters: set[Parameter] = None, triggered_by: ViewComponent = None)[source]

Bases: Action

Represents a DELETE action (CRUD operation).

Deletes an existing instance of a domain class, typically triggered by delete buttons or confirmation dialogs.

Parameters:
  • name (str) – The name of the delete action.

  • description (str) – The description of the delete action.

  • target_class (Class) – The target class to delete instances from.

  • parameters (set[Parameter]) – The set of parameters for the action (optional).

  • triggered_by (ViewComponent) – The component that triggers this action (optional).

name

The name of the delete action.

Type:

str

description

The description of the delete action.

Type:

str

target_class

The target class to delete instances from.

Type:

Class

parameters

The set of parameters for the action.

Type:

set[Parameter]

triggered_by

The component that triggers this action.

Type:

ViewComponent

_abc_impl = <_abc._abc_data object>
property target_class: Class

Get the target class to delete from.

Type:

Class

class besser.BUML.metamodel.gui.events_actions.Event(name: str, event_type: EventType = EventType.OnClick, description: str = '', actions: set[Action] = None, visibility: str = 'public', timestamp: int = None, styling: Styling = None)[source]

Bases: ViewComponent

Represents an event that can trigger one or more actions.

Events are the bridge between user interactions and application behavior. When an event fires (e.g., onClick, onSubmit), it triggers its associated actions.

Parameters:
  • name (str) – The name of the event.

  • event_type (EventType) – The type of event (onClick, onSubmit, etc.).

  • description (str) – The description of the event.

  • actions (set[Action]) – The set of actions triggered by this event.

  • visibility (str) – The visibility of the event.

  • timestamp (int) – The timestamp of the event.

  • styling (Styling) – The styling of the event.

name

The name of the event.

Type:

str

event_type

The type of event.

Type:

EventType

description

The description of the event.

Type:

str

actions

The set of actions triggered by this event (1..* relationship).

Type:

set[Action]

visibility

The visibility of the event.

Type:

str

timestamp

The timestamp of the event.

Type:

int

styling

The styling of the event.

Type:

Styling

_abc_impl = <_abc._abc_data object>
property actions: set[Action]

Get the set of actions triggered by this event.

Type:

set[Action]

add_action(action: Action)[source]

Add an action to this event.

Parameters:

action (Action) – The action to add.

property event_type: EventType

Get the type of the event.

Type:

EventType

remove_action(action_name: str)[source]

Remove an action from this event by name.

Parameters:

action_name (str) – The name of the action to remove.

class besser.BUML.metamodel.gui.events_actions.EventType(*values)[source]

Bases: Enum

Represents the type of event that can be triggered in the GUI.

OnClick = 'onClick'
OnHover = 'onHover'
OnKeyPress = 'onKeyPress'
OnScroll = 'onScroll'
OnSubmit = 'onSubmit'
class besser.BUML.metamodel.gui.events_actions.Parameter(name: str, param_type: str, value=None, required: bool = False)[source]

Bases: Element

Represents a parameter for an action.

Parameters are essential for passing data between screens and actions, such as entity IDs, filter values, or form data.

Parameters:
  • name (str) – The name of the parameter.

  • param_type (str) – The type of the parameter (e.g., ‘string’, ‘int’, ‘Property’).

  • value – The value of the parameter (optional).

  • required (bool) – Whether this parameter is required (default: False).

name

The name of the parameter.

Type:

str

param_type

The type of the parameter.

Type:

str

value

The value of the parameter.

required

Whether this parameter is required.

Type:

bool

_abc_impl = <_abc._abc_data object>
property name: str

Get the name of the parameter.

Type:

str

property param_type: str

Get the type of the parameter.

Type:

str

property required: bool

Get whether the parameter is required.

Type:

bool

class besser.BUML.metamodel.gui.events_actions.Read(name: str, target_class: Class = None, description: str = '', filter_constraint: Constraint = None, parameters: set[Parameter] = None, triggered_by: ViewComponent = None)[source]

Bases: Action

Represents a READ action (CRUD operation).

Reads/queries data from a domain class, typically used to display lists, tables, or detailed views of entities.

Parameters:
  • name (str) – The name of the read action.

  • description (str) – The description of the read action.

  • target_class (Class) – The target class to read from.

  • filter_constraint (Constraint) – Optional constraint to filter the data.

  • parameters (set[Parameter]) – The set of parameters for the action (optional).

  • triggered_by (ViewComponent) – The component that triggers this action (optional).

name

The name of the read action.

Type:

str

description

The description of the read action.

Type:

str

target_class

The target class to read from.

Type:

Class

filter_constraint

Optional constraint to filter the data.

Type:

Constraint

parameters

The set of parameters for the action.

Type:

set[Parameter]

triggered_by

The component that triggers this action.

Type:

ViewComponent

_abc_impl = <_abc._abc_data object>
property filter_constraint: Constraint

Get the filter constraint.

Type:

Constraint

property target_class: Class

Get the target class to read from.

Type:

Class

class besser.BUML.metamodel.gui.events_actions.Transition(name: str, target_screen: Screen = None, description: str = '', parameters: set[Parameter] = None, triggered_by: ViewComponent = None)[source]

Bases: Action

Represents a TRANSITION action for navigation between screens.

Handles navigation logic, including passing parameters between screens for data flow (e.g., passing an entity ID to a detail screen).

Parameters:
  • name (str) – The name of the transition.

  • description (str) – The description of the transition.

  • target_screen (Screen) – The target screen to navigate to.

  • parameters (set[Parameter]) – Parameters to pass to the target screen (optional).

  • triggered_by (ViewComponent) – The component that triggers this action (optional).

name

The name of the transition.

Type:

str

description

The description of the transition.

Type:

str

target_screen

The target screen to navigate to.

Type:

Screen

parameters

Parameters to pass to the target screen.

Type:

set[Parameter]

triggered_by

The component that triggers this action.

Type:

ViewComponent

_abc_impl = <_abc._abc_data object>
property target_screen: Screen

Get the target screen to navigate to.

Type:

Screen

class besser.BUML.metamodel.gui.events_actions.Update(name: str, target_class: Class = None, description: str = '', parameters: set[Parameter] = None, triggered_by: ViewComponent = None)[source]

Bases: Action

Represents an UPDATE action (CRUD operation).

Updates an existing instance of a domain class, typically used with edit forms to modify existing entities.

Parameters:
  • name (str) – The name of the update action.

  • description (str) – The description of the update action.

  • target_class (Class) – The target class to update instances of.

  • parameters (set[Parameter]) – The set of parameters for the action (optional).

  • triggered_by (ViewComponent) – The component that triggers this action (optional).

name

The name of the update action.

Type:

str

description

The description of the update action.

Type:

str

target_class

The target class to update instances of.

Type:

Class

parameters

The set of parameters for the action.

Type:

set[Parameter]

triggered_by

The component that triggers this action.

Type:

ViewComponent

_abc_impl = <_abc._abc_data object>
property target_class: Class

Get the target class to update.

Type:

Class

Styling

class besser.BUML.metamodel.gui.style.Alignment(*values)[source]

Bases: Enum

Defines alignment options

BOTTOM = 'bottom'
CENTER = 'center'
END = 'end'
INSIDE = 'inside'
LEFT = 'left'
OUTSIDE = 'outside'
RIGHT = 'right'
START = 'start'
STRETCH = 'stretch'
TOP = 'top'
class besser.BUML.metamodel.gui.style.Color(background_color: str = None, text_color: str = None, border_color: str = None, line_color: str = None, grid_color: str = None, axis_color: str = None, bar_color: str = None, label_color: str = None, fill_color: str = None, opacity: str = None, color_palette: str = 'default', primary_color: str = None, border_radius: str = None, border_width: str = None, border_style: str = None, border: str = None, border_top: str = None, border_right: str = None, border_bottom: str = None, border_left: str = None, box_shadow: str = None, text_shadow: str = None, background_image: str = None, background_size: str = None, background_position: str = None, background_repeat: str = None)[source]

Bases: object

Represents the color properties of a ViewElement.

Parameters:
  • background_color (str) – The background color (#FFFFFF as default).

  • text_color (str) – The text color (#000000 as default).

  • border_color (str) – The border color (#CCCCCC as default).

  • line_color (str) – The line color (#000000 as default).

  • grid_color (str) – The grid color (#CCCCCC as default).

  • axis_color (str) – The axis color (#CCCCCC as default).

  • bar_color (str) – The bar color (#CCCCCC as default).

  • fill_color (str) – The fill color (#CCCCCC as default).

  • opacity (str) – The opacity of the element (0.0 to 1.0, or percentage).

  • color_palette (str) – The color palette used for charts.

  • primary_color (str) – The primary/main color for charts and series.

background_color

The background color.

Type:

str

text_color

The text color.

Type:

str

border_color

The border color.

Type:

str

line_color

The line color.

Type:

str

grid_color

The grid color.

Type:

str

axis_color

The axis color.

Type:

str

bar_color

The bar color.

Type:

str

fill_color

The fill color.

Type:

str

opacity

The opacity of the element.

Type:

str

color_palette

The color palette used for charts.

Type:

str

primary_color

The primary/main color for charts and series.

Type:

str

property axis_color: str

Get the axis color.

Type:

str

property background_color: str

Get the background color.

Type:

str

background_image: str
background_position: str
background_repeat: str
background_size: str
property bar_color: str

Get the bar color.

Type:

str

border: str
border_bottom: str
property border_color: str

Get the border color.

Type:

str

border_left: str
border_radius: str
border_right: str
border_style: str
border_top: str
border_width: str
box_shadow: str
property color_palette: str

Get the color palette of the radial bar chart.

Type:

Property

property fill_color: str

Get the fill color.

Type:

str

property grid_color: str

Get the grid color.

Type:

str

property label_color: str

Get the label color.

Type:

str

property line_color: str

Get the line color.

Type:

str

property opacity: str

Get the opacity of the element.

Type:

str

property primary_color: str

Get the primary/main color for charts and series.

Type:

str

property text_color: str

Get the text color.

Type:

str

text_shadow: str
class besser.BUML.metamodel.gui.style.JustificationType(*values)[source]

Bases: Enum

Defines justification options

CENTER = 'center'
LEFT = 'left'
RIGHT = 'right'
SPACE_AROUND = 'space-around'
SPACE_BETWEEN = 'space-between'
class besser.BUML.metamodel.gui.style.Layout(layout_type=None, orientation: str = None, padding: str = None, margin: str = None, gap: str = None, alignment: JustificationType = None, wrap: bool = None, flex_direction: str = None, justify_content: str = None, align_items: str = None, flex_wrap: str = None, grid_template_columns: str = None, grid_template_rows: str = None, grid_gap: str = None, justify_items: str = None, flex: str = None, flex_grow: str = None, flex_shrink: str = None, flex_basis: str = None, order: str = None, align_self: str = None)[source]

Bases: object

Defines layout properties of a UI container.

Parameters:
  • layout_type (LayoutType) – The type of layout (e.g., Flex, Grid). Defaults to Flex.

  • orientation (str) – The layout direction (‘horizontal’ or ‘vertical’). Defaults to ‘vertical’.

  • padding (str) – Space inside the container (e.g., “10px”, “1em”). Defaults to “10px”.

  • margin (str) – Space outside the container (e.g., “10px”, “1em”). Defaults to “10px”.

  • gap (str) – Space between elements (e.g., “5px”, “0.5em”). Defaults to “5px”.

  • alignment (JustificationType) – Justification of elements. Defaults to CENTER.

  • wrap (bool) – Whether elements wrap in a flex/grid container. Defaults to True.

  • flex_direction (str) – Flex direction (‘row’, ‘column’, ‘row-reverse’, ‘column-reverse’).

  • justify_content (str) – How to justify content (‘flex-start’, ‘flex-end’, ‘center’, ‘space-between’, etc.).

  • align_items (str) – How to align items (‘flex-start’, ‘flex-end’, ‘center’, ‘stretch’, ‘baseline’).

  • flex_wrap (str) – Flex wrap value (‘nowrap’, ‘wrap’, ‘wrap-reverse’).

  • grid_template_columns (str) – Grid column template (e.g., ‘repeat(3, 1fr)’).

  • grid_template_rows (str) – Grid row template (e.g., ‘auto 100px’).

  • grid_gap (str) – Gap in grid layout.

  • justify_items (str) – How to justify grid items.

  • align_items – How to align grid items.

layout_type

The type of layout.

Type:

LayoutType

orientation

The direction of the layout.

Type:

str

padding

The padding inside the container.

Type:

str

margin

The margin outside the container.

Type:

str

gap

The gap between elements.

Type:

str

alignment

The alignment of elements within the layout.

Type:

JustificationType

wrap

Whether elements wrap in flex/grid layout.

Type:

bool

flex_direction

Flex direction.

Type:

str

justify_content

Justify content value.

Type:

str

align_items

Align items value.

Type:

str

flex_wrap

Flex wrap value.

Type:

str

grid_template_columns

Grid columns template.

Type:

str

grid_template_rows

Grid rows template.

Type:

str

grid_gap

Grid gap value.

Type:

str

justify_items

Grid justify items.

Type:

str

property align_items: str

Get align items.

Type:

str

align_self: str
property alignment: JustificationType

Get the alignment of elements.

Type:

JustificationType

flex: str
flex_basis: str
property flex_direction: str

Get flex direction.

Type:

str

flex_grow: str
flex_shrink: str
property flex_wrap: str

Get flex wrap.

Type:

str

property gap: str

Get the gap value.

Type:

str

property grid_gap: str

Get grid gap.

Type:

str

property grid_template_columns: str

Get grid template columns.

Type:

str

property grid_template_rows: str

Get grid template rows.

Type:

str

property justify_content: str

Get justify content.

Type:

str

property justify_items: str

Get justify items.

Type:

str

property layout_type: LayoutType

Get the layout type.

Type:

LayoutType

property margin: str

Get the margin value.

Type:

str

order: str
property orientation: str

Get the layout orientation (‘horizontal’ or ‘vertical’).

Type:

str

property padding: str

Get the padding value.

Type:

str

property wrap: bool

Get whether elements wrap in a flex/grid container.

Type:

bool

class besser.BUML.metamodel.gui.style.LayoutType(*values)[source]

Bases: Enum

Defines different layout types

ABSOLUTE = 'absolute'
COLUMN = 'column'
FLEX = 'flex'
GRID = 'grid'
ROW = 'row'
STACK = 'stack'
class besser.BUML.metamodel.gui.style.Position(p_type: PositionType = None, top: str = None, left: str = None, right: str = None, bottom: str = None, alignment: Alignment = None, z_index: int = None, display: str = None, overflow: str = None, overflow_x: str = None, overflow_y: str = None, visibility: str = None, cursor: str = None, box_sizing: str = None, transform: str = None, transition: str = None, animation: str = None, filter: str = None)[source]

Bases: object

Represents the positioning properties of a UI element.

This class allows defining an element’s placement in a UI layout, supporting different positioning types (static, absolute, etc.), offsets (top, left, right, bottom), alignment, and stacking order (z-index).

Parameters:
  • p_type (PositionType) – The positioning type (e.g., STATIC, ABSOLUTE, RELATIVE).

  • top (str, optional) – Distance from the top (e.g., ‘10px’, ‘10%’, None).

  • left (str, optional) – Distance from the left (e.g., ‘10px’, ‘10%’, None).

  • right (str, optional) – Distance from the right (e.g., ‘10px’, ‘10%’, None).

  • bottom (str, optional) – Distance from the bottom (e.g., ‘10px’, ‘10%’, None).

  • alignment (str, optional) – Defines how the element aligns within its container (e.g., “CENTER”, “LEFT”).

  • z_index (int, optional) – Determines the stacking order; higher values appear above lower ones.

p_type

The positioning type (e.g., STATIC, ABSOLUTE, RELATIVE).

Type:

PositionType

top

Distance from the top (e.g., ‘10px’, ‘10%’, None).

Type:

str

left

Distance from the left (e.g., ‘10px’, ‘10%’, None).

Type:

str

right

Distance from the right (e.g., ‘10px’, ‘10%’, None).

Type:

str

bottom

Distance from the bottom (e.g., ‘10px’, ‘10%’, None).

Type:

str

alignment

Defines how the element aligns within its container (e.g., “CENTER”, “LEFT”).

Type:

str

z_index

Determines the stacking order; higher values appear above lower ones.

Type:

int

property alignment: str

Get the alignment of the element.

Type:

str

animation: str
property bottom: str

Get the distance from the bottom.

Type:

str

box_sizing: str
cursor: str
display: str
filter: str
property left: str

Get the distance from the left.

Type:

str

overflow: str
overflow_x: str
overflow_y: str
property p_type: PositionType

Get the position type.

Type:

PositionType

property right: str

Get the distance from the right.

Type:

str

property top: str

Get the distance from the top.

Type:

str

transform: str
transition: str
visibility: str
property z_index: int

Get the z-index value.

Type:

int

class besser.BUML.metamodel.gui.style.PositionType(*values)[source]

Bases: Enum

Enumerates the types of positioning for a UI element.

ABSOLUTE = 'absolute'
FIXED = 'fixed'
INLINE = 'Inline'
RELATIVE = 'relative'
STATIC = 'static'
STICKY = 'sticky'
class besser.BUML.metamodel.gui.style.Size(width: str = None, height: str = None, padding: str = None, margin: str = None, font_size: str = None, line_height: str = None, icon_size: str = None, unit_size: UnitSize = None, font_weight: str = None, font_family: str = None, font_style: str = None, text_decoration: str = None, text_transform: str = None, letter_spacing: str = None, word_spacing: str = None, white_space: str = None, word_break: str = None, min_width: str = None, max_width: str = None, min_height: str = None, max_height: str = None, padding_top: str = None, padding_right: str = None, padding_bottom: str = None, padding_left: str = None, margin_top: str = None, margin_right: str = None, margin_bottom: str = None, margin_left: str = None)[source]

Bases: object

Represents the size properties of a UI element.

Parameters:
  • width (str) – The width of the element (e.g., “100px”, “80%”, “auto”).

  • height (str) – The height of the element.

  • padding (str, optional) – The padding inside the element.

  • margin (str, optional) – The margin outside the element.

  • font_size (str, optional) – The font size for text-based elements.

  • line_height (str, optional) – The line height for text elements (e.g., “1.6”, “24px”).

  • icon_size (str, optional) – The size of icons inside elements.

  • unit_size (UnitSize) – The unit of measurement (px, %, em, etc.).

width

The width of the element.

Type:

str

height

The height of the element.

Type:

str

padding

The padding inside the element.

Type:

str, optional

margin

The margin outside the element.

Type:

str, optional

font_size

The font size for text-based elements.

Type:

str, optional

line_height

The line height for text elements.

Type:

str, optional

icon_size

The size of icons inside elements.

Type:

str, optional

unit_size

The unit of measurement.

Type:

UnitSize

font_family: str
font_size: str
font_style: str
font_weight: str
property height: str

Get the height of the element.

Type:

str

icon_size: str
letter_spacing: str
property line_height: str

Get the line height of the element.

Type:

str

property margin: str

Get the margin of the element.

Type:

str

margin_bottom: str
margin_left: str
margin_right: str
margin_top: str
max_height: str
max_width: str
min_height: str
min_width: str
property padding: str

Get the padding of the element.

Type:

str

padding_bottom: str
padding_left: str
padding_right: str
padding_top: str
text_decoration: str
text_transform: str
white_space: str
property width: str

Get the width of the element.

Type:

str

word_break: str
word_spacing: str
class besser.BUML.metamodel.gui.style.Styling(size: Size = None, position: Position = None, color: Color = None, layout=None)[source]

Bases: object

Represents the general styling properties of a UI element.

Parameters:
  • size (Size, optional) – The size settings of the UI element (default: None).

  • position (Position, optional) – The position settings of the UI element (default: None).

  • color (Color, optional) – The color settings of the UI element (default: None).

  • layout (Layout, optional) – The layout settings for containers (default: None).

size

The size settings of the UI element.

Type:

Size | None

position

The position settings of the UI element.

Type:

Position | None

color

The color settings of the UI element.

Type:

Color | None

layout

The layout settings for containers.

Type:

Layout | None

property color: Color | None

Get the color settings of the styling.

Type:

Color | None

property layout

Get the layout settings.

Type:

Layout | None

property position: Position | None

Get the position settings of the styling.

Type:

Position | None

property size: Size | None

Get the size settings of the styling.

Type:

Size | None

class besser.BUML.metamodel.gui.style.UnitSize(*values)[source]

Bases: Enum

Defines unit types for size measurements

AUTO = 'auto'
EM = 'em'
PERCENTAGE = '%'
PIXELS = 'px'
REM = 'rem'
VH = 'vh'
VW = 'vw'