Package wprover

Class JPointEnlargeFlash

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

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

      • JPointEnlargeFlash

        public JPointEnlargeFlash​(javax.swing.JPanel p,
                                  CPoint pt)
        Constructs a new JPointEnlargeFlash with the specified JPanel and CPoint.
        Parameters:
        p - the JPanel to associate with this JPointEnlargeFlash
        pt - the CPoint to apply the flashing effect on
    • 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
      • 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 flashing effect and resets the point's radius.
        Overrides:
        stop in class JFlash