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 PropertySheet
Get a parameters sheet made of the objects' properties annotated withUIProperty
orSliderProperty
annotations.static TitledPane
getTitledPaneSheet
(Object object) Returns a titled pane containing the object's properties annotated withUIProperty
orSliderProperty
annotations.static TitledPane
getTitledPaneSheet
(String title, Object... objects) Returns a titled pane containing the objects' properties annotated withUIProperty
orSliderProperty
annotations.static VBox
getVBoxProperties
(Object... objects) Get a VBox containing the object's parameters annotated withUIProperty
orSliderProperty
annotations.
-
Method Details
-
getSheet
Get a parameters sheet made of the objects' properties annotated withUIProperty
orSliderProperty
annotations.- 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 withUIProperty
orSliderProperty
annotations.- 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
null
if the property sheet is empty
-
getTitledPaneSheet
Returns a titled pane containing the object's properties annotated withUIProperty
orSliderProperty
annotations. 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 withUIProperty
orSliderProperty
annotations.- Parameters:
objects
- the objects from which to take fields as properties to display in the VBox- Returns:
- a VBox containing the object's parameters
-