Class PickableElementPaintFunction<E,​P>

  • All Implemented Interfaces:
    Function<E,​P>

    public class PickableElementPaintFunction<E,​P>
    extends Object
    implements Function<E,​P>
    Paints each edge according to the P parameters given in the constructor, so that selected and non-selected edges can be made to look different.
    Author:
    Tom Nelson
    • Field Detail

      • drawPaint

        protected P drawPaint
      • selectedPaint

        protected P selectedPaint
    • Constructor Detail

      • PickableElementPaintFunction

        public PickableElementPaintFunction​(SelectedState<E> selectedState,
                                            P drawPaint,
                                            P selectedPaint)
        Parameters:
        selectedState - specifies which elements report as "selected"
        drawPaint - P used to draw element shapes
        selectedPaint - P used to draw selected element shapes
    • Method Detail

      • apply

        public P apply​(E element)
        Specified by:
        apply in interface Function<E,​P>