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.ActionListener
An icon that displays an simple animation while something is loading
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LoadingIcon.Unsafe
This 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 void
actionPerformed(java.awt.event.ActionEvent e)
int
getIconHeight()
int
getIconWidth()
protected void
initTimer(int delay)
void
paintIcon(java.awt.Component c, java.awt.Graphics graphics, int x, int y)
protected void
repaintParent()
void
start()
Start the animationvoid
stop()
Stop the animation
-
-
-
Method Detail
-
initTimer
protected void initTimer(int delay)
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in 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:
paintIcon
in interfacejavax.swing.Icon
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
repaintParent
protected void repaintParent()
-
-