Class GisElementContainerDrawer<T extends MapElement>

    • Constructor Detail

      • GisElementContainerDrawer

        public GisElementContainerDrawer()
        Constructor.
      • GisElementContainerDrawer

        public GisElementContainerDrawer​(Drawer<? super T> drawer)
        Constructor based on the given drawer.
        Parameters:
        drawer - the element drawer.
    • Method Detail

      • setDrawer

        public void setDrawer​(Drawer<? super T> drawer)
        Description copied from interface: DrawerReference
        Change the preferred drawer for this drawable object.
        Specified by:
        setDrawer in interface DrawerReference<T extends MapElement>
        Parameters:
        drawer - the drawer or null if none.
      • draw

        protected Drawer<? super T> draw​(ZoomableGraphicsContext gc,
                                         GISElementContainer<T> primitive,
                                         Drawer<? super T> drawer)
        Draw the primitive with the given drawer.
        Parameters:
        gc - the graphics context to draw with.
        primitive - the primitive to draw.
        drawer - the drawer, or null to use the default.
        Returns:
        the used drawer.
      • drawPrimitives

        protected Drawer<? super T> drawPrimitives​(ZoomableGraphicsContext gc,
                                                   GISElementContainer<T> primitive,
                                                   Drawer<? super T> drawer)
        Draw the primitives.

        This function calls the drawers on each primitive inside the given container. It is not expected to be overridden into the sub-classes.

        Parameters:
        gc - the graphics context to draw with.
        primitive - the primitive to draw.
        drawer - the drawer, or null to use the default.
        Returns:
        the used drawer.
        Since:
        16.0
      • getPrimitiveType

        @Pure
        public Class<? extends GISElementContainer> getPrimitiveType()
        Description copied from interface: Drawer
        Replies the type of the primitives that could be drawn by this drawer.
        Specified by:
        getPrimitiveType in interface Drawer<T extends MapElement>
        Returns:
        the type of the primitives.