public class AnimatedActiveBox extends ActiveBox implements ActionListener
Skin
classes to animate progress bars. It takes a collection of images (stored as elements of an
ActiveBagContent
) that are used as "frames" of a
picture, and displayed one after other. It uses a Timer
to generate
the events that cause the rotation of frames.Rectangle2D.Double, Rectangle2D.Float
Modifier and Type | Field and Description |
---|---|
protected ActiveBagContent |
abc |
protected ActiveBagContent |
altAbc |
protected int |
currentFrame |
protected int |
delay |
static int |
MIN_DELAY |
protected boolean |
running |
protected int |
startDelay |
protected long |
startTime |
protected Timer |
timer |
altContent, compressImages, content, hasHostedComponent, hostedMediaPlayer, idAss, idLoc, idOrder, USE_TRANSFORM
border, shape, specialShape
height, width, x, y
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor and Description |
---|
AnimatedActiveBox(AbstractBox parent,
JComponent container,
BoxBase boxBase)
Creates new AnimatedActiveBox
|
AnimatedActiveBox(AbstractBox parent,
JComponent container,
int setIdLoc,
Rectangle2D r,
BoxBase boxBase) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
clear() |
void |
setAltContent(ActiveBagContent abc) |
void |
setContent(ActiveBagContent abc) |
void |
setDelay(int delay) |
void |
setStartDelay(int startDelay) |
void |
start() |
void |
stop(boolean toFirstFrame) |
checkAutoStartMedia, checkHostedComponent, checkOptions, copyContent, end, exchangeContent, exchangeLocation, getContent, getCurrentContent, getDescription, isAtPlace, isCurrentContentEquivalent, isEquivalent, playMedia, setAltContent, setAltContent, setBounds, setContent, setContent, setCurrentContent, setDefaultIdAss, setHostedMediaPlayer, setIdAss, setIdOrder, setTextContent, switchToAlt, updateContent
clone, contains, drawBorder, finalize, getAbsoluteLocation, getAbsoulteMiddleLocation, getBorderBounds, getBoxBaseResolve, getBoxBaseX, getContainerResolve, getContainerX, getHostedComponent, getLocation, getParent, getShape, hasBorder, isAlternative, isFocused, isInactive, isInverted, isMarked, isTemporaryHidden, isVisible, repaint, setAlternative, setBorder, setBounds, setBoxBase, setContainer, setFocused, setHostedComponent, setInactive, setInverted, setLocation, setLocation, setMarked, setParent, setShape, setSize, setSize, setTemporaryHidden, setVisible, translate, update
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, toString
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
protected ActiveBagContent abc
protected ActiveBagContent altAbc
protected Timer timer
protected int delay
protected boolean running
protected int currentFrame
protected long startTime
protected int startDelay
public static final int MIN_DELAY
public AnimatedActiveBox(AbstractBox parent, JComponent container, BoxBase boxBase)
public AnimatedActiveBox(AbstractBox parent, JComponent container, int setIdLoc, Rectangle2D r, BoxBase boxBase)
public void setStartDelay(int startDelay)
public void setDelay(int delay)
public void setContent(ActiveBagContent abc)
public void setAltContent(ActiveBagContent abc)
public void start()
public void stop(boolean toFirstFrame)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.