Class ValueIcon

    • Field Detail

      • displayWidth

        public Parameter displayWidth
        The number of characters to display. This is an integer, with default value 60.
      • numberOfLines

        public Parameter numberOfLines
        The number of lines to display. This is an integer, with default value 1.
    • Constructor Detail

      • ValueIcon

        public ValueIcon​(NamedObj container,
                         java.lang.String name)
                  throws NameDuplicationException,
                         IllegalActionException
        Create a new icon with the given name in the given container. The container is required to implement Settable, or an exception will be thrown.
        Parameters:
        container - The container for this attribute.
        name - The name of this attribute.
        Throws:
        IllegalActionException - If thrown by the parent class or while setting an attribute.
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • createBackgroundFigure

        public Figure createBackgroundFigure()
        Create a background figure based on this icon, which is a text element with the name of the container, a colon, and its value.
        Overrides:
        createBackgroundFigure in class XMLIcon
        Returns:
        A figure for this icon.
      • createFigure

        public Figure createFigure()
        Create a new Diva figure that visually represents this icon. The figure will be an instance of LabelFigure that renders the container name and value, separated by a colon.
        Overrides:
        createFigure in class EditorIcon
        Returns:
        A new CompositeFigure consisting of the label.
      • _createDefaultBackgroundFigure

        protected Figure _createDefaultBackgroundFigure()
        Create a new default background figure, which is a bullet.
        Overrides:
        _createDefaultBackgroundFigure in class EditorIcon
        Returns:
        A figure representing a bullet.