Package wprover
Class JSegmentMovingFlash
- java.lang.Object
-
- wprover.JFlash
-
- wprover.JSegmentMovingFlash
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.util.EventListener
public class JSegmentMovingFlash extends JFlash implements java.awt.event.ActionListener
JSegmentMovingFlash is a class that extends JFlash and implements ActionListener. It is used to create a moving flash effect on a segment defined by four points.
-
-
Constructor Summary
Constructors Constructor Description JSegmentMovingFlash(javax.swing.JPanel p, CPoint p1, CPoint p2, CPoint p3, CPoint p4, int c1, int c2)Constructs a new JSegmentMovingFlash with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)Handles the action event for the timer, updating the animation state and repainting the panel.booleandraw(java.awt.Graphics2D g2)Draws the moving flash effect on the specified Graphics2D context.-
Methods inherited from class wprover.JFlash
drawALine3, drawALine3Short, getColor, getRatioColor, getvisibleType, isfinished, isrRunning, isZero, recalculate, setColor, setDealy, setDrawDash, setDrawDashFb2, start, stop, updateTimer
-
-
-
-
Constructor Detail
-
JSegmentMovingFlash
public JSegmentMovingFlash(javax.swing.JPanel p, CPoint p1, CPoint p2, CPoint p3, CPoint p4, int c1, int c2)Constructs a new JSegmentMovingFlash with the specified parameters.- Parameters:
p- the JPanel to associate with this JSegmentMovingFlashp1- the first CPoint of the segmentp2- the second CPoint of the segmentp3- the third CPoint of the segmentp4- the fourth CPoint of the segmentc1- the first color index for the flashing effectc2- the second color index for the flashing effect
-
-
Method Detail
-
draw
public boolean draw(java.awt.Graphics2D g2)
Draws the moving flash effect on the specified Graphics2D context.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Handles the action event for the timer, updating the animation state and repainting the panel.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
e- the action event
-
-