Class RadioRenderer

    • Field Detail

      • DEFAULT_CHECKED_COLOR

        private static final Color DEFAULT_CHECKED_COLOR
      • DEFAULT_HORIZONTAL_ALIGNMENT

        private static final HorizontalAlignment DEFAULT_HORIZONTAL_ALIGNMENT
      • DEFAULT_VERTICAL_ALIGNMENT

        private static final VerticalAlignment DEFAULT_VERTICAL_ALIGNMENT
    • Constructor Detail

      • RadioRenderer

        public RadioRenderer​(Radio modelElement)
        Creates a new RadioRenderer instance.
        Parameters:
        modelElement - the model element
    • Method Detail

      • getNextRenderer

        public IRenderer getNextRenderer()
        Gets a new instance of this class to be used as a next renderer, after this renderer is used, if IRenderer.layout(LayoutContext) is called more than once.
        Returns:
        new renderer instance
      • drawBorder

        public void drawBorder​(DrawContext drawContext)
        Performs the drawing operation for the border of this renderer, if defined by any of the Property.BORDER values in either the layout element or this IRenderer itself.
        Overrides:
        drawBorder in class AbstractRenderer
        Parameters:
        drawContext - the context (canvas, document, etc) of this drawing operation.
      • applyBorderBox

        protected Rectangle applyBorderBox​(Rectangle rect,
                                           Border[] borders,
                                           boolean reverse)
        Applies the given border box (borders) on the given rectangle
        Overrides:
        applyBorderBox in class AbstractRenderer
        Parameters:
        rect - a rectangle paddings will be applied on.
        borders - the borders to be applied on the given rectangle
        reverse - indicates whether the border box will be applied inside (in case of false) or outside (in case of false) the rectangle.
        Returns:
        a border box of the renderer
      • isBoxChecked

        public boolean isBoxChecked()
        Defines whether the radio is checked or not.
        Returns:
        the default value of the radio field
      • isLayoutBasedOnFlatRenderer

        protected boolean isLayoutBasedOnFlatRenderer()
        Determines, whether the layout is based in the renderer itself or flat renderer.
        Overrides:
        isLayoutBasedOnFlatRenderer in class AbstractFormFieldRenderer
        Returns:
        true if layout is based on flat renderer, false otherwise.
      • isDrawCircledBorder

        private boolean isDrawCircledBorder()