Package wprover

Class JCirFlash

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener

    public class JCirFlash
    extends JFlash
    implements java.awt.event.ActionListener
    JCirFlash is a class that extends JFlash and implements ActionListener. It is used to create a circular flashing effect on a JPanel.
    • Constructor Detail

      • JCirFlash

        public JCirFlash​(javax.swing.JPanel p)
        Constructs a new JCirFlash with the specified JPanel.
        Parameters:
        p - the JPanel to associate with this JCirFlash
    • Method Detail

      • draw

        public boolean draw​(java.awt.Graphics2D g2)
        Draws the circular 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
      • setCenter

        public void setCenter​(CPoint t)
        Sets the center point of the circular flashing effect.
        Parameters:
        t - the center point to set
      • addAPoint

        public void addAPoint​(CPoint pt)
        Adds a point to the list of points defining the circular flashing effect.
        Parameters:
        pt - the point to add
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Handles action events for the timer.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Parameters:
        e - the action event
      • stop

        public void stop()
        Stops the circular flashing effect.
        Overrides:
        stop in class JFlash