Package wprover

Class JTLineFlash

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

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

      • JTLineFlash

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

        public JTLineFlash​(javax.swing.JPanel p,
                           CPoint p1,
                           CPoint p2,
                           CPoint p3,
                           CPoint p4)
        Constructs a new JTLineFlash with the specified JPanel and four CPoints.
        Parameters:
        p - the JPanel to associate with this JTLineFlash
        p1 - the first CPoint of the first line
        p2 - the second CPoint of the first line
        p3 - the first CPoint of the second line
        p4 - the second CPoint of the second line
    • 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
      • drawTTFoot

        public void drawTTFoot​(java.awt.Graphics2D g2,
                               double x,
                               double y,
                               CPoint p1,
                               CPoint p2)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • stop

        public void stop()
        Description copied from class: JFlash
        Stops the flash effect.
        Overrides:
        stop in class JFlash
      • containPt

        public boolean containPt​(CPoint p)