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:
ViewComponentRepresents 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.
visibility (str) – Visibility level.
- _abc_impl = <_abc._abc_data object>¶
- property actionType: ButtonActionType¶
- property buttonType: ButtonType¶
- 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 method_btn¶
Get the actual Method object to execute.
- property method_entity_id¶
Legacy alias for instance_source.
- class besser.BUML.metamodel.gui.graphical_ui.ButtonActionType(*values)[source]¶
Bases:
EnumRepresents 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'¶
- Next = 'Next'¶
- OpenForm = 'Open Form'¶
- RunMethod = 'run-method'¶
- Save = 'Save'¶
- Search = 'Search'¶
- Select = 'Select'¶
- Send = 'Send'¶
- Settings = 'Settings'¶
- ShowList = 'Show List'¶
- Sort = 'Sort'¶
- SubmitForm = 'Submit Form'¶
- Update = 'update'¶
- View = 'View'¶
- class besser.BUML.metamodel.gui.graphical_ui.ButtonType(*values)[source]¶
Bases:
EnumRepresents 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:
DataSourceRepresents 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.
- col_type¶
The type of the collection data source.
- Type:
- _abc_impl = <_abc._abc_data object>¶
- property col_type: CollectionSourceType¶
Get the type of the collection data source.
- Type:
- class besser.BUML.metamodel.gui.graphical_ui.CollectionSourceType(*values)[source]¶
Bases:
EnumRepresents 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:
ViewComponentRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- list_sources¶
The set of data sources associated with the list.
- Type:
- 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:
- class besser.BUML.metamodel.gui.graphical_ui.DataSource(name: str)[source]¶
Bases:
NamedElementRepresents a data source.
- Parameters:
name (str) – The name of the data source.
- _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:
DataSourceRepresents 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.
- 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:
ViewComponentRepresents embedded content such as iframes or maps.
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.graphical_ui.File(name: str, file_type: FileSourceType)[source]¶
Bases:
DataSourceRepresents 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.
- file_type¶
The type of the file data source.
- Type:
- _abc_impl = <_abc._abc_data object>¶
- property file_type: FileSourceType¶
Get the type of the file data source.
- Type:
- class besser.BUML.metamodel.gui.graphical_ui.FileSourceType(*values)[source]¶
Bases:
EnumRepresents 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:
ViewComponentRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- inputFields¶
The set of input fields contained in the form.
- Type:
- 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:
- 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.
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- _abc_impl = <_abc._abc_data object>¶
- 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:
ViewComponentRepresents 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.
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- 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>¶
- 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:
ViewComponentRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- field_type¶
The type of the input field.
- Type:
- 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:
- class besser.BUML.metamodel.gui.graphical_ui.InputFieldType(*values)[source]¶
Bases:
EnumRepresents 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'¶
- class besser.BUML.metamodel.gui.graphical_ui.Link(name: str, description: str, label: str = '', url: str | None = None, target: str | None = None, rel: str | None = None, visibility: str = 'public', timestamp: int = None, styling: Styling = None, **kwargs)[source]¶
Bases:
ViewComponentRepresents a hyperlink component.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ViewComponentRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- 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>¶
- class besser.BUML.metamodel.gui.graphical_ui.MenuItem(label: str, url: str | None = None, target: str | None = None, rel: str | None = None)[source]¶
Bases:
ElementRepresents an item of a menu.
- Parameters:
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.graphical_ui.Module(name: str, screens: set[Screen], visibility: str = 'public', timestamp: int = None)[source]¶
Bases:
NamedElementRepresents a module.
- Parameters:
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- _abc_impl = <_abc._abc_data object>¶
- 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:
ViewContainerRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- view_elements¶
The set of view elements on the screen.
- Type:
- _abc_impl = <_abc._abc_data object>¶
- 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:
ViewComponentRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ViewElementRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- 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:
- _abc_impl = <_abc._abc_data object>¶
- property data_binding: DataBinding¶
Get the data binding of the view component.
- Type:
- 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:
ViewElementRepresents a view container.
- Parameters:
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- _abc_impl = <_abc._abc_data object>¶
- property view_elements: set[ViewElement]¶
Get the set of view elements on the screen.
- Type:
- 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:
NamedElementRepresents 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).
- timestamp¶
Inherited from NamedElement; object creation datetime (default is current time).
- Type:
- 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:
- _abc_impl = <_abc._abc_data object>¶
- _owner: ViewContainer¶
- property owner: ViewContainer¶
Get the owner of the view element.
- Type:
Data Binding¶
- class besser.BUML.metamodel.gui.binding.DataAggregation(*values)[source]¶
Bases:
EnumAggregation 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:
ElementDataBinding 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.
- 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
- _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
Dashboard Components¶
- class besser.BUML.metamodel.gui.dashboard.AgentComponent(name: str, agent_name: str | None = None, agent_title: str | None = None, **kwargs)[source]¶
Bases:
ViewComponentRepresents a BESSER Agent component in the GUI.
- Parameters:
- _abc_impl = <_abc._abc_data object>¶
- 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:
ChartRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ViewComponentRepresents a chart component in the dashboard.
- Parameters:
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.dashboard.Column(label: str)[source]¶
Bases:
objectRepresents a column in a table.
- Parameters:
label (str) – The display label of the column.
- class besser.BUML.metamodel.gui.dashboard.ExpressionColumn(label: str, expression: str)[source]¶
Bases:
ColumnRepresents an expression column in a table.
- Parameters:
- class besser.BUML.metamodel.gui.dashboard.FieldColumn(label: str, field: Property)[source]¶
Bases:
ColumnRepresents a field column in a table.
- Parameters:
label (str) – The display label of the column.
field (Property) – The property representing the field.
- 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:
ChartRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.dashboard.LocationMap(name: str, data: list)[source]¶
Bases:
MapRepresents a location map component in the dashboard.
- Parameters:
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.dashboard.LookupColumn(label: str, path: Property, field: Property)[source]¶
Bases:
ColumnRepresents 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.
- 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:
ViewComponentRepresents a map component in the dashboard.
- Parameters:
name (str) – The name of the map.
- _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:
ViewComponentRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ChartRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ChartRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ChartRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.dashboard.Series(name: str, label: str | None, data_binding: DataBinding, styling: Styling)[source]¶
Bases:
ViewComponentRepresents a data series in a chart.
- Parameters:
name (str) – The name of 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:
ViewComponentRepresents 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.
primary_color (str | None) – Optional primary color used for the header/background.
- _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:
ElementRepresents 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).
- triggered_by¶
The component that triggers this action.
- Type:
- _abc_impl = <_abc._abc_data object>¶
- property triggered_by: ViewComponent¶
Get the component that triggers this action.
- Type:
- 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:
ActionRepresents 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).
- target_class¶
The target class to create instances of.
- Type:
Class
- triggered_by¶
The component that triggers this action.
- Type:
- _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:
ActionRepresents 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).
- target_class¶
The target class to delete instances from.
- Type:
Class
- triggered_by¶
The component that triggers this action.
- Type:
- _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:
ViewComponentRepresents 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.
- _abc_impl = <_abc._abc_data object>¶
- class besser.BUML.metamodel.gui.events_actions.EventType(*values)[source]¶
Bases:
EnumRepresents 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:
ElementRepresents 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:
- value¶
The value of the parameter.
- _abc_impl = <_abc._abc_data object>¶
- 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:
ActionRepresents 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).
- target_class¶
The target class to read from.
- Type:
Class
- filter_constraint¶
Optional constraint to filter the data.
- Type:
Constraint
- triggered_by¶
The component that triggers this action.
- Type:
- _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:
ActionRepresents 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).
- triggered_by¶
The component that triggers this action.
- Type:
- _abc_impl = <_abc._abc_data object>¶
- 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:
ActionRepresents 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).
- target_class¶
The target class to update instances of.
- Type:
Class
- triggered_by¶
The component that triggers this action.
- Type:
- _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:
EnumDefines 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:
objectRepresents 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.
- class besser.BUML.metamodel.gui.style.JustificationType(*values)[source]¶
Bases:
EnumDefines 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:
objectDefines 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:
- alignment¶
The alignment of elements within the layout.
- Type:
- property alignment: JustificationType¶
Get the alignment of elements.
- Type:
- property layout_type: LayoutType¶
Get the layout type.
- Type:
- class besser.BUML.metamodel.gui.style.LayoutType(*values)[source]¶
Bases:
EnumDefines 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:
objectRepresents 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:
- property p_type: PositionType¶
Get the position type.
- Type:
- class besser.BUML.metamodel.gui.style.PositionType(*values)[source]¶
Bases:
EnumEnumerates 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:
objectRepresents 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.).
- class besser.BUML.metamodel.gui.style.Styling(size: Size = None, position: Position = None, color: Color = None, layout=None)[source]¶
Bases:
objectRepresents 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).