| com.blogofbug.swing.components.effects.Effect
Effect | public interface Effect (Code) | | Interface to capture an animation effect for the effects panel intended to provide
data back to the core controller as to when to stop, start or refresh an animation.
author: nigel |
Method Summary | |
public boolean | isLocalEffect() This method should return true if the graphics context supplied to the
update method should be protected (a-la paintComponent()), or preserved
(a-la paint()). | public void | paintEffect(Graphics2D graphics) Causes the effect to be painted, the global context will be preserved
based on the value of the isLocalEffect() call. | public long | update() Asks the effect to update itself, returning the
delay in milli-seconds before the next required update
The number of milliseconds before the effect would like to update itself again, orEFFECT_FINISHED if there will be no further updates. |
EFFECT_FINISHED | final public static long EFFECT_FINISHED(Code) | | Returned by update() if no further animations are required
|
EFFECT_INACTIVE | final public static long EFFECT_INACTIVE(Code) | | Returned by update() if no further timer based animations are
required
|
isLocalEffect | public boolean isLocalEffect()(Code) | | This method should return true if the graphics context supplied to the
update method should be protected (a-la paintComponent()), or preserved
(a-la paint()).
True if the context should be protected during this effects updatefalse if it's fair game. |
paintEffect | public void paintEffect(Graphics2D graphics)(Code) | | Causes the effect to be painted, the global context will be preserved
based on the value of the isLocalEffect() call.
Parameters: graphics - The graphics context |
update | public long update()(Code) | | Asks the effect to update itself, returning the
delay in milli-seconds before the next required update
The number of milliseconds before the effect would like to update itself again, orEFFECT_FINISHED if there will be no further updates. To keep the effect beingpainted, but not based on timers (instead on repaint trigger only) use EFFECT_INACTIVE (effect will be drawnwhen repaint called, but not at other times). |
|
|