Search in sources :

Example 1 with WidgetPropertyCategory

use of org.csstudio.display.builder.model.WidgetPropertyCategory in project org.csstudio.display.builder by kasemir.

the class PropertyPanelSection method fill.

void fill(final UndoableActionManager undo, final Collection<WidgetProperty<?>> properties, final List<Widget> other) {
    // Add UI items for each property
    WidgetPropertyCategory category = null;
    for (final WidgetProperty<?> property : properties) {
        // Skip runtime properties
        if (property.getCategory() == WidgetPropertyCategory.RUNTIME)
            continue;
        // it's only shown for displays where classes are then applied
        if (property instanceof WidgetClassProperty && class_mode)
            continue;
        // Start of new category that needs to be shown?
        if (property.getCategory() != category) {
            category = property.getCategory();
            final Label header = new Label(category.getDescription());
            header.getStyleClass().add("property_category");
            header.setMaxWidth(Double.MAX_VALUE);
            add(header, 0, getNextGridRow(), 7, 1);
            final Separator separator = new Separator();
            separator.getStyleClass().add("property_separator");
            add(separator, 0, getNextGridRow(), 7, 1);
        }
        createPropertyUI(undo, property, other, 0, 0);
    }
}
Also used : Label(javafx.scene.control.Label) WidgetClassProperty(org.csstudio.display.builder.model.properties.WidgetClassProperty) WidgetPropertyCategory(org.csstudio.display.builder.model.WidgetPropertyCategory) Separator(javafx.scene.control.Separator)

Aggregations

Label (javafx.scene.control.Label)1 Separator (javafx.scene.control.Separator)1 WidgetPropertyCategory (org.csstudio.display.builder.model.WidgetPropertyCategory)1 WidgetClassProperty (org.csstudio.display.builder.model.properties.WidgetClassProperty)1