Class PainterItemMine


  • public class PainterItemMine
    extends PainterItem
    Special painter for ItemMine. Paints a small red dot on active mines.
    • Constructor Detail

      • PainterItemMine

        public PainterItemMine​(PainterFactory painterFactory)
        Creates a PainterItemMine.
        Parameters:
        painterFactory - The factory.
    • Method Detail

      • paint

        public void paint​(Graphics g,
                          ThingState t,
                          GameState state,
                          int xCenter,
                          int yCenter,
                          int repaintCounter)
        Paints a small red dot on active mines.
        Overrides:
        paint in class PainterItem
        Parameters:
        g - The graphics to paint on
        t - The thing.
        state - GameState.
        xCenter - The x coordinate
        yCenter - The y coordinate
        repaintCounter - The repaint counter.
      • getFigureOverlayImageName

        public java.lang.String getFigureOverlayImageName​(int animationIndex)
        Gets an image name for painting on the figure. Returns null by default for no overlay image.
        Parameters:
        animationIndex - The animation index.
        Returns:
        The overlay image name or null for no overlay.
      • paintItemAsInfo

        public void paintItemAsInfo​(Graphics g,
                                    GameState state,
                                    ItemState itemState,
                                    int xCenter,
                                    int yCenter,
                                    double factor)
        Paints the thing on infopanels on the screen.
        Overrides:
        paintItemAsInfo in class PainterItem
        Parameters:
        g - The graphics to paint on.
        itemState - The item.
        xCenter - The x center coordinate.
        yCenter - The y center coordinate.
        factor - Scaling factor.