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);
}
}
Aggregations