Package wprover

Class JAreaFlash

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

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

      • JAreaFlash

        public JAreaFlash​(javax.swing.JPanel p,
                          int cindex)
        Constructs a new JAreaFlash with the specified JPanel and color index.
        Parameters:
        p - the JPanel to associate with this JAreaFlash
        cindex - the color index to use for the flashing area
    • Method Detail

      • draw

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

        public void addAPoint​(CPoint p)
        Adds a point to the list of points defining the flashing area.
        Parameters:
        p - 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