Class GroupWidget


  • public class GroupWidget
    extends MacroWidget
    A Group Widget contains child widgets.

    In the editor, moving the group will move all the widgets inside the group. Groups are also a convenient way to copy and paste a collection of widgets.

    Model Widgets within the group use coordinates relative to the group, i.e. a child at (x, y) = (0, 0) would be in the left upper corner of the group and not in the left upper corner of the display.

    At runtime, the group may add a labeled border to visually frame its child widgets, which further offsets the child widgets by the width of the border.

    • Field Detail

      • WIDGET_DESCRIPTOR

        public static final org.csstudio.display.builder.model.WidgetDescriptor WIDGET_DESCRIPTOR
        Widget descriptor
    • Constructor Detail

      • GroupWidget

        public GroupWidget()
    • Method Detail

      • getProperty

        public WidgetProperty<?> getProperty​(java.lang.String name)
                                      throws java.lang.IllegalArgumentException,
                                             java.lang.IndexOutOfBoundsException
        Description copied from class: Widget
        Get widget property.

        Meant for rules, scripts and similar code which does not know the exact widget type and thus fetches properties by name.

        Supports access to complex properties by path name, for example "y_axes[1].minimum" to get the minimum property of the second Y axis of a plot.

        To allow use of legacy scripts and rules, the widget implementation may override to handle deprecated property names.

        Caller presumes that the widget actually has the requested property, otherwise throwing Exception.

        Overrides:
        getProperty in class Widget
        Parameters:
        name - Property name
        Returns:
        WidgetProperty
        Throws:
        java.lang.IllegalArgumentException - if property is unknown
        java.lang.IndexOutOfBoundsException
        See Also:
        Widget.checkProperty(String)
      • getConfigurator

        public org.csstudio.display.builder.model.WidgetConfigurator getConfigurator​(org.csstudio.display.builder.model.Version persisted_version)
                                                                              throws java.lang.Exception
        Description copied from class: Widget
        Obtain configurator.

        While typically using the default WidgetConfigurator, widget may provide a different configurator for reading older persisted date.

        Overrides:
        getConfigurator in class Widget
        Parameters:
        persisted_version - Version of the persisted data.
        Returns:
        Widget configurator for that version
        Throws:
        java.lang.Exception - if persisted version cannot be handled
      • runtimeChildren

        public org.csstudio.display.builder.model.ChildrenProperty runtimeChildren()
        Returns:
        Runtime 'children' property
      • propForegroundColor

        public WidgetProperty<org.csstudio.display.builder.model.properties.WidgetColor> propForegroundColor()
        Returns:
        'foreground_color' property
      • propBackgroundColor

        public WidgetProperty<org.csstudio.display.builder.model.properties.WidgetColor> propBackgroundColor()
        Returns:
        'background_color' property
      • propTransparent

        public WidgetProperty<java.lang.Boolean> propTransparent()
        Returns:
        'transparent' property
      • propFont

        public WidgetProperty<org.csstudio.display.builder.model.properties.WidgetFont> propFont()
        Returns:
        'font' property
      • runtimePropInsets

        public WidgetProperty<int[]> runtimePropInsets()
        Returns:
        'insets' property