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.ImageIcon
Deprecated.useIconsFactory
This 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.String
MD_ICONS_DIRECTORY
Deprecated.private javax.swing.Icon
mIcon
Deprecated.The original image icon.protected IconControlerInterface
mIconControler
Deprecated.private java.awt.Image
mIconImage
Deprecated.
-
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 void
checkIcon()
Deprecated.Changes icon according path and name if icon was not loaded from this location.int
getIconHeight()
Deprecated.Returns the icon's height.int
getIconWidth()
Deprecated.Returns the icon's width.java.awt.Image
getImage()
Deprecated.Returns image for the icon.void
paintIcon(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:
paintIcon
in interfacejavax.swing.Icon
- Overrides:
paintIcon
in 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:
getIconWidth
in interfacejavax.swing.Icon
- Overrides:
getIconWidth
in 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:
getImage
in classjavax.swing.ImageIcon
- Returns:
- the image.
-
getIconHeight
public int getIconHeight()
Deprecated.Returns the icon's height.- Specified by:
getIconHeight
in interfacejavax.swing.Icon
- Overrides:
getIconHeight
in 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.
-
-