Package com.nomagic.magicdraw.ui
Class ImageIconProxy
- java.lang.Object
-
- javax.swing.ImageIcon
-
- com.nomagic.magicdraw.ui.ImageIconProxy
-
- All Implemented Interfaces:
java.io.Serializable,javax.accessibility.Accessible,javax.swing.Icon
@OpenApi @Deprecated public class ImageIconProxy extends javax.swing.ImageIconDeprecated.useIconsFactoryThis class is used only for reloading icons after image path is changed.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringMD_ICONS_DIRECTORYDeprecated.private javax.swing.IconmIconDeprecated.The original image icon.protected IconControlerInterfacemIconControlerDeprecated.private java.awt.ImagemIconImageDeprecated.
-
Constructor Summary
Constructors Constructor Description ImageIconProxy(IconControlerInterface iconControler)Deprecated.The proxy constructor with given controllerImageIconProxy(java.lang.Class clazz, java.lang.String name)Deprecated.Constructs a new ImageIcon instance.ImageIconProxy(java.lang.Class clazz, java.lang.String name, java.lang.String pathToIcons)Deprecated.Constructs a new ImageIcon instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private voidcheckIcon()Deprecated.Changes icon according path and name if icon was not loaded from this location.intgetIconHeight()Deprecated.Returns the icon's height.intgetIconWidth()Deprecated.Returns the icon's width.java.awt.ImagegetImage()Deprecated.Returns image for the icon.voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)Deprecated.Draw the icon at the specified location.
-
-
-
Field Detail
-
MD_ICONS_DIRECTORY
private static final java.lang.String MD_ICONS_DIRECTORY
Deprecated.
-
mIconControler
protected IconControlerInterface mIconControler
Deprecated.
-
mIcon
private javax.swing.Icon mIcon
Deprecated.The original image icon.
-
mIconImage
private java.awt.Image mIconImage
Deprecated.
-
-
Constructor Detail
-
ImageIconProxy
@OpenApi public ImageIconProxy(java.lang.Class clazz, java.lang.String name)Deprecated.Constructs a new ImageIcon instance.- Parameters:
clazz- the class to identify resources.name- the name of the icon in the map.
-
ImageIconProxy
@OpenApi public ImageIconProxy(java.lang.Class clazz, java.lang.String name, java.lang.String pathToIcons)Deprecated.Constructs a new ImageIcon instance. For icons directory uses given path- Parameters:
clazz- the class to indentify resources.name- the name of the icon in the map.pathToIcons- path to icons directory, this directory must contain subdirs icons32 and icons24. Can be empty string In this case it means same dir as clazz.
-
ImageIconProxy
@OpenApi public ImageIconProxy(IconControlerInterface iconControler)
Deprecated.The proxy constructor with given controller- Parameters:
iconControler-
-
-
Method Detail
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)Deprecated.Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIconin interfacejavax.swing.Icon- Overrides:
paintIconin classjavax.swing.ImageIcon- Parameters:
c- the component.g- the graphics.x- X coordinate.y- Y coordinate.
-
getIconWidth
public int getIconWidth()
Deprecated.Returns the icon's width.- Specified by:
getIconWidthin interfacejavax.swing.Icon- Overrides:
getIconWidthin classjavax.swing.ImageIcon- Returns:
- an int specifying the fixed width of the icon.
-
getImage
public java.awt.Image getImage()
Deprecated.Returns image for the icon.- Overrides:
getImagein classjavax.swing.ImageIcon- Returns:
- the image.
-
getIconHeight
public int getIconHeight()
Deprecated.Returns the icon's height.- Specified by:
getIconHeightin interfacejavax.swing.Icon- Overrides:
getIconHeightin classjavax.swing.ImageIcon- Returns:
- an int specifying the fixed height of the icon.
-
checkIcon
private void checkIcon()
Deprecated.Changes icon according path and name if icon was not loaded from this location.
-
-