Class PropertySheetFactory
java.lang.Object
madkit.gui.PropertySheetFactory
This class is used to create a property sheet from an object's fields.
It uses the UIProperty annotation to specify which fields should be displayed.
It also uses the SliderProperty annotation to specify which fields should be
displayed as sliders.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PropertySheetGet a parameters sheet made of the objects' properties annotated withUIPropertyorSliderPropertyannotations.static TitledPanegetTitledPaneSheet(Object object) Returns a titled pane containing the object's properties annotated withUIPropertyorSliderPropertyannotations.static TitledPanegetTitledPaneSheet(String title, Object... objects) Returns a titled pane containing the objects' properties annotated withUIPropertyorSliderPropertyannotations.static VBoxgetVBoxProperties(Object... objects) Get a VBox containing the object's parameters annotated withUIPropertyorSliderPropertyannotations.
-
Method Details
-
getSheet
Get a parameters sheet made of the objects' properties annotated withUIPropertyorSliderPropertyannotations.- Parameters:
objects- the objects from which to take fields as properties to display in the sheet- Returns:
- the property sheet containing the objects properties
-
getTitledPaneSheet
Returns a titled pane containing the objects' properties annotated withUIPropertyorSliderPropertyannotations.- Parameters:
title- the title of the titled paneobjects- the objects from which to take fields as properties to display- Returns:
- a titled pane containing the objects' properties, or
nullif the property sheet is empty
-
getTitledPaneSheet
Returns a titled pane containing the object's properties annotated withUIPropertyorSliderPropertyannotations. The title is automatically set to the agent's name if the object is an agent, to the class's simple name if the object is a class, or to the object's string representation otherwise.- Parameters:
object- the object from which to take fields as properties to display- Returns:
- a titled pane containing the object's properties
-
getVBoxProperties
Get a VBox containing the object's parameters annotated withUIPropertyorSliderPropertyannotations.- Parameters:
objects- the objects from which to take fields as properties to display in the VBox- Returns:
- a VBox containing the object's parameters
-