Package wprover

Class JRedoStepFlash


  • public class JRedoStepFlash
    extends JFlash
    JRedoStepFlash is a class that extends JFlash and is used to create a flashing effect on a JPanel when the redo step is performed in the drawing process.
    • Constructor Detail

      • JRedoStepFlash

        public JRedoStepFlash​(javax.swing.JPanel p,
                              DrawProcess dp)
        Constructs a new JRedoStepFlash with the specified JPanel and DrawProcess.
        Parameters:
        p - the JPanel to associate with this JRedoStepFlash
        dp - the DrawProcess to be used for the redo step
    • Method Detail

      • draw

        public boolean draw​(java.awt.Graphics2D g2)
        Draws the flashing effect on the specified Graphics2D context.
        Specified by:
        draw in class JFlash
        Parameters:
        g2 - the Graphics2D context to draw on
        Returns:
        true if the drawing was successful, false otherwise
      • stop

        public void stop()
        Stops the flashing effect and performs the redo step in the drawing process.
        Overrides:
        stop in class JFlash
      • start

        public void start()
        Starts the flashing effect by stopping it first.
        Overrides:
        start in class JFlash
      • isrRunning

        public boolean isrRunning()
        Checks if the flashing effect is currently running.
        Overrides:
        isrRunning in class JFlash
        Returns:
        false as the flashing effect is not running
      • isfinished

        public boolean isfinished()
        Checks if the flashing effect has finished.
        Overrides:
        isfinished in class JFlash
        Returns:
        true if the flashing effect has finished, false otherwise