Class LoadingIcon
- java.lang.Object
-
- com.inductiveautomation.ignition.client.util.gui.LoadingIcon
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.util.EventListener,javax.swing.Icon
- Direct Known Subclasses:
LoadingIcon.Unsafe
public class LoadingIcon extends java.lang.Object implements javax.swing.Icon, java.awt.event.ActionListenerAn icon that displays an simple animation while something is loading
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLoadingIcon.UnsafeThis class is a subclass of LoadingIcon that uses a (shared) java.util.Timer, and issues repaintImmediately commands to the parent component on non-EDT thread.
-
Constructor Summary
Constructors Constructor Description LoadingIcon()Creates a new loading icon with a default delay of 50ms between frames (initially stopped)LoadingIcon(int delay)Creates a new loading icon (initially stopped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)intgetIconHeight()intgetIconWidth()protected voidinitTimer(int delay)voidpaintIcon(java.awt.Component c, java.awt.Graphics graphics, int x, int y)protected voidrepaintParent()voidstart()Start the animationvoidstop()Stop the animation
-
-
-
Method Detail
-
initTimer
protected void initTimer(int delay)
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeightin interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfacejavax.swing.Icon
-
start
public void start()
Start the animation
-
stop
public void stop()
Stop the animation
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics graphics, int x, int y)- Specified by:
paintIconin interfacejavax.swing.Icon
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
repaintParent
protected void repaintParent()
-
-