DESY ACOP Beans Home
com.cosylab.gui.components.ledder
Class DefaultLedIcon
java.lang.Object
javax.swing.ImageIcon
com.cosylab.gui.components.ledder.DefaultLedIcon
- All Implemented Interfaces:
- java.io.Serializable, javax.accessibility.Accessible, javax.swing.Icon
public class DefaultLedIcon
- extends javax.swing.ImageIcon
This is the default icon used when displaying leds. This class is
instantiated when led icon could not be loaded from the resources. It
displays filled circle of appropriate color.
- Version:
- $id$
- Author:
- Ales Pucelj
- See Also:
Led
,
LedIconFactory
,
Serialized Form
Nested classes/interfaces inherited from class javax.swing.ImageIcon |
javax.swing.ImageIcon.AccessibleImageIcon |
Field Summary |
protected int |
size
|
Fields inherited from class javax.swing.ImageIcon |
component, tracker |
Constructor Summary |
protected |
DefaultLedIcon(java.awt.Color color)
Default constructor for DefaultLedIcon. |
Methods inherited from class javax.swing.ImageIcon |
getAccessibleContext, getDescription, getImage, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
size
protected int size
DefaultLedIcon
protected DefaultLedIcon(java.awt.Color color)
- Default constructor for DefaultLedIcon. If the color parameter is null,
color will be set to
java.awt.Color.BLACK
- Parameters:
color
- Color
createDefaultParameters
protected LedPaintParameters createDefaultParameters()
- Returns default parameters to be used for rendering of leds.
- Returns:
- LedPaintParameters
getIconHeight
public final int getIconHeight()
- Returns the height of this icon. This value is set to 16.
- Specified by:
getIconHeight
in interface javax.swing.Icon
- Overrides:
getIconHeight
in class javax.swing.ImageIcon
- Returns:
- int
- See Also:
Icon.getIconHeight()
getIconWidth
public final int getIconWidth()
- Returns the width of this icon. This value is set to 16.
- Specified by:
getIconWidth
in interface javax.swing.Icon
- Overrides:
getIconWidth
in class javax.swing.ImageIcon
- Returns:
- int
- See Also:
Icon.getIconWidth()
paintIcon
public void paintIcon(java.awt.Component component,
java.awt.Graphics g,
int x,
int y)
- Renders the icon.
- Specified by:
paintIcon
in interface javax.swing.Icon
- Overrides:
paintIcon
in class javax.swing.ImageIcon
- Parameters:
component
- Componentg
- Graphicsx
- inty
- int- See Also:
Icon.paintIcon(Component, Graphics, int, int)
Copyright © 2010. All Rights Reserved.